Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Change YAML style of scheduler-kubeconfig from human to compact JSON #523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 22, 2023

  1. 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.
    omertuc committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    d06b23e View commit details
    Browse the repository at this point in the history