/kind bug
Creating an Azure Service Principal where the randomly generated secret contains a ".
This secret then goes into AZURE_CLIENT_SECRET and creates issues, because the output into /etc/kubernetes/azure.json will not properly escape the ", resulting in kubelet failures:
Jun 03 00:03:26 capi-quickstart-control-plane-pvzh4 kubelet[76379]: F0603 00:03:26.581514 76379 server.go:274] failed to run Kubelet: could not init cloud provider "azure": error converting YAML to JSON: yaml: line 5: did not find expected ',' or '}'
What did you expect to happen:
There should be some sort of logic to escape the quotes prior to them going into /etc/kubernetes/azure.json or Azure should stop using " in its randomly generated passwords.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version): /etc/os-release): There should be some sort of logic to escape the quotes prior to them going into /etc/kubernetes/azure.json or Azure should stop using " in its randomly generated passwords.
We won't be able to make "Azure should stop using " in its randomly generated passwords" happen so let's focus on ways we can document escaping special quotes in the CAPZ documentation about SPs or even better, automate escaping special chars.
/help
@CecileRobertMichon:
This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
There should be some sort of logic to escape the quotes prior to them going into /etc/kubernetes/azure.json or Azure should stop using " in its randomly generated passwords.
We won't be able to make "Azure should stop using " in its randomly generated passwords" happen so let's focus on ways we can document escaping special quotes in the CAPZ documentation about SPs or even better, automate escaping special chars.
/help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
We won't be able to make "Azure should stop using " in its randomly generated passwords" happen
https://github.com/Azure/azure-cli/issues/13625#issuecomment-632667687
https://github.com/Azure/azure-cli/pull/13643
it's fixed in new CLI versions
It's reasonable to escape these, but IMO the CLI introducing it was the real problem
Awesome, I think we can close this then. For anyone running into this, please update to the latest Azure CLI.
/close
@CecileRobertMichon: Closing this issue.
In response to this:
Awesome, I think we can close this then. For anyone running into this, please update to the latest Azure CLI.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.