-
Notifications
You must be signed in to change notification settings - Fork 55
[release-4.19] Use kubelet rotation 4.19 #1085
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
base: release-4.19
Are you sure you want to change the base?
[release-4.19] Use kubelet rotation 4.19 #1085
Conversation
This is cherrypick from 6b4b26a Till now we didn't face any issue for cert rotation but recently when we faced the issue and asked about cert dev, he pointed out that this step is still required and should be part of script if you stop your cluster before 24 hour and do time skew for cert rotation. - https://issues.redhat.com/browse/OCPBUGS-56551 - https://blog.openshift.com/enabling-openshift-4-clusters-to-stop-and-resume-cluster-vms/
Reviewer's GuideThis PR backports the Kubelet certificate rotation workflow for release-4.19 by updating mirror URLs to production repos, embedding inline rotation steps in the SNC script to bypass the 24h wait, and adding a DaemonSet manifest to automate kubeconfig rotation. Sequence Diagram for SNC Script Certificate Rotation StepssequenceDiagram
actor UserCI as "User/CI"
participant snc_sh as "snc.sh script"
participant oc_cli as "oc CLI"
participant K8sAPI as "Kubernetes API Server"
participant KBM_DS as "Kubelet Bootstrap Cred Manager DS"
UserCI->>snc_sh: Execute script
snc_sh->>oc_cli: apply -f kubelet-bootstrap-cred-manager-ds.yaml
oc_cli->>K8sAPI: Apply DaemonSet (KBM_DS)
K8sAPI-->>KBM_DS: Create/Schedule Pods
activate KBM_DS
note right of KBM_DS: KBM_DS pods start rotating kubeconfigs on nodes
snc_sh->>oc_cli: delete secrets csr-signer-signer, csr-signer
oc_cli->>K8sAPI: Delete Secrets
K8sAPI-->>oc_cli: Secrets Deleted Response
snc_sh->>oc_cli: adm wait-for-stable-cluster
oc_cli->>K8sAPI: Monitor cluster stability
K8sAPI-->>oc_cli: Cluster Stable Response
oc_cli-->>snc_sh: Cluster is stable
snc_sh->>snc_sh: Potentially renew_certificates() (existing step)
snc_sh->>oc_cli: wait-for install-complete (existing step)
oc_cli->>K8sAPI: Monitor install completion
K8sAPI-->>oc_cli: Install Complete Response
oc_cli-->>snc_sh: Install is complete
snc_sh->>oc_cli: delete daemonset kubelet-bootstrap-cred-manager
oc_cli->>K8sAPI: Delete DaemonSet (KBM_DS)
K8sAPI-->>KBM_DS: Terminate Pods
deactivate KBM_DS
K8sAPI-->>oc_cli: DaemonSet Deleted Response
snc_sh->>oc_cli: wait --for=delete daemonset KBM_DS
oc_cli->>K8sAPI: Check KBM_DS deletion status
K8sAPI-->>oc_cli: Deletion Confirmed Response
oc_cli-->>snc_sh: KBM_DS deletion confirmed
Class Diagram:
|
Change | Details | Files |
---|---|---|
Updated default mirror URLs and aligned MicroShift version |
|
snc.sh microshift.sh |
Integrated inline Kubelet cert rotation steps in SNC |
|
snc.sh |
Added DaemonSet manifest for kubelet-bootstrap credential management |
|
kubelet-bootstrap-cred-manager-ds.yaml |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai review
on the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issue
to create an issue from it. - Generate a pull request title: Write
@sourcery-ai
anywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai title
on the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summary
anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summary
on the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guide
on the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolve
on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismiss
on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai review
to trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Since now ocp-4.19 is available as rc so latest build now available `ocp` landing page instead `ocp-dev-preview` one.
17ae3bc
to
d2c0059
Compare
/retest |
Summary by Sourcery
Enable kubelet certificate auto-rotation for OpenShift 4.19 by deploying a bootstrap credential manager and integrate its workflow into the snc.sh and microshift.sh scripts while updating default mirror URLs.
New Features:
Enhancements: