/kind bug
What steps did you take and what happened:
I think its pretty typical to use 'B64' for paramaters that need to be B64 encoded, and not use B64 when something isnt b64 encoded...
AWS_B64ENCODED_CREDENTIALS (cluster-api-provider-vsphere)VSPHERE_SSH_AUTHORIZED_KEY (cluster-api-provider-aws)However
looks like AZURE_SSH_PUBLIC_KEY is an exception ~
seems trivial - but If a user doesnt b64 encode this variable, its pretty tricky to see where this occurs -- they won't know they made a mistake until they look in the logs of the CAPI core containers (this isn't noticeable by capz-controller-manager, bc it isn't a VM issue, but rather an issue of events upstream from the VM creation phase.
What did you expect to happen:
Environment:
/help
/good-first-issue
@jayunit100 I'm surprised about "If a user doesnt b64 encode this variable, its pretty tricky to see where this occurs -- they won't know they made a mistake until they look in the logs of the CAPI core containers", https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/f8ca63979c28b5bc4d2d53c7a2cffd4d7edcbda4/api/v1alpha3/azuremachine_validation.go#L34 should catch that at create time.
Let's
1) change all occurrences of AZURE_SSH_PUBLIC_KEY to AZURE_SSH_PUBLIC_KEY_B64 in docs and templates
2) Validate if the azure machine webhook validation throws an error when sshKey is not b64 encoded and if not, fix it
I will take that!
/assign
/remove-help
thanks @CecileRobertMichon ! that sounds good
Most helpful comment
I will take that!
/assign
/remove-help