Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Change YAML style of scheduler-kubeconfig from human to compact …
…JSON (This is currently a WIP PR suggestion) # Background The `scheduler-kubeconfig` configmap managed by this operator contains a YAML formatted `kubeconfig` string. As part of a particular novel form of OCP deployment (image based upgrade/installation), we have to programmatically modify the `server:` entry in that kubeconfig. This is easily done by parsing the YAML, editing the server entry and serializing the YAML back into the configmap. # Issue Every YAML serializer has its own opinions of what YAML should look like. When we perform the procedure described above, we get a kubeconfig that's slightly different then what this operator outputs (different indentation, different quoting decisions). As a result, it eventually causes the kube-scheduler-operator to issue a new revision of the scheduler. Rolling out the new revision takes a few minutes, which we would prefer to avoid. # Solution In order to solve this we suggest the change in this commit which would be to format this kubeconfig as unopinionated compact JSON as opposed to human readable YAML # Alternative solutions We could have a textual "search-and-replace" for the `server:` entry in our code, but we would prefer to do it right by properly parsing, editing then serializing it.
- Loading branch information