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

[release-4.10] WINC-687: Windows instances react to kubelet CA rotation #1036

Conversation

jrvaldes
Copy link
Contributor

This is a manual cherry-pick of #1013

This commit changes the transfer function for the SSH connectivity to accept
an io.Reader interface instead of the path to a file, which requires expensive
IO operation.

(cherry picked from commit 9b8e4aa)
This commit consolidates the file checksum validation into the
FileExists function, making it an optional functionality that
can be re-used.

(cherry picked from commit 3c97bbd)
- Adds a function to update the kubelet CA file in a Windows instance. The
location and name of the file is fixed to `C:\k\kubelet-ca.crt` by WMCB while
setting the kubelet configuration.
- Introduces the certificates package with common operations and constants
- Adds a new watcher to the ConfigMap controller to react on changes in the
serving CA ConfigMap from the Kube API Server
- Extends the instanceReconciler with a new capability to reconcile the
kubelet CA rotation

The proposed implementation does not require node drain or node reboot. When
the new CA bundle (kubelet-ca.crt) is updated in the worker node, kubelet
detects the change in the file system, reads the certificates from the file,
and updates the client configuration.

(cherry picked from commit babaf41)
This commit adds an e2e test to cover the kubelet CA rotation. In this case,
the rotation is triggered on-demand by setting the annotation
`auth.openshift.io/certificate-not-after` to null, the resulting CA bundle is
copied to the Windows node, so that the kubelet-ca.crt file must contain the
new certificate.

(cherry picked from commit d127c21)
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 28, 2022

@jrvaldes: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.10] WINC-687: Windows instances react to kubelet CA rotation

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.

@jrvaldes
Copy link
Contributor Author

/test vsphere-e2e-operator

@jrvaldes
Copy link
Contributor Author

/test platform-none-vsphere-e2e-operator

@alinaryan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2022
Copy link
Contributor

@selansen selansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jrvaldes, selansen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 28, 2022
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 29, 2022

@jrvaldes: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 7efaecc into openshift:release-4.10 Apr 29, 2022
@jrvaldes jrvaldes deleted the cherry-pick-1013-to-release-4.10 branch June 7, 2022 02:34
mansikulkarni96 pushed a commit to mansikulkarni96/windows-machine-config-operator that referenced this pull request Aug 7, 2023
…jrvaldes/cherry-pick-1013-to-release-4.10

Updated upstream source commit.
Commit details follow:

Signed-off-by: OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>
Project: https://github.com/openshift/windows-machine-config-operator.git
Branch:  release-4.10
Commit:  7efaecc
Author:  OpenShift Merge Robot
Date:    Fri, 29 Apr 2022 00:00:05 -0400

    Merge pull request openshift#1036 from jrvaldes/cherry-pick-1013-to-release-4.10

    [release-4.10] WINC-687: Windows instances react to kubelet CA rotation

Additional included commits:
  c87a7ff, 41db44f, f29fa4e, 51127f6, d21d5dd, 7743720

Referenced RedHat JIRA issues: WINC-687, WINC-799

automerge: yes
x-md5: 8a2334bd91a991b5f05db22b862b0f51
Change-Id: I68dda22563675fd54b7d542cbf3927567826b3c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants