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

addons controller: hetzner CSI: redeploy CSIDriver to allow upgrade from v2.22 to v2.23 #12432

Merged

Conversation

wozniakjan
Copy link
Contributor

What this PR does / why we need it:
Before reconciling hetzner CSI addon, delete the CSIDriver resource if it has a mismatch in fsGroupPolicy, so the addon can be applied. Between KKP v2.22 and v2.23 #11968 introduced a change to an immutable field fsGroupPolicy, the upstream recommends recreating the CSIDriver:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1682-csi-driver-skip-permission#risks-and-mitigations

Which issue(s) this PR fixes:

fixes: #12429

What type of PR is this?
/kind bug

Special notes for your reviewer:
Should we add docs too to instruct users for the manual remediation of deleting the CSIDriver resource?

Does this PR introduce a user-facing change? Then add your Release Note here:

hetzner CSI: recreate CSIDriver to allow upgrade from 1.6.0 to 2.2.0

Documentation:

NONE

@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Jun 30, 2023
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@wozniakjan wozniakjan self-assigned this Jun 30, 2023
@kubermatic-bot kubermatic-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. labels Jun 30, 2023
@wozniakjan wozniakjan added the backport-needed Denotes a PR or issue that has not been fully backported. label Jun 30, 2023
@wozniakjan
Copy link
Contributor Author

/cherry-pick release/v2.23

@kubermatic-bot
Copy link
Contributor

@wozniakjan: once the present PR merges, I will cherry-pick it on top of release/v2.23 in a new PR and assign it to you.

In response to this:

/cherry-pick release/v2.23

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.

@wozniakjan wozniakjan force-pushed the hetzner_fsgrouppolicy_reconcile branch 3 times, most recently from 379a161 to eb46bbe Compare June 30, 2023 12:01
@wozniakjan
Copy link
Contributor Author

/test all

@wozniakjan wozniakjan force-pushed the hetzner_fsgrouppolicy_reconcile branch 7 times, most recently from ec536cd to 281d2bb Compare June 30, 2023 13:53
@@ -532,6 +562,14 @@ func (r *Reconciler) ensureIsInstalled(ctx context.Context, log *zap.SugaredLogg

cmdLog := log.With("cmd", strings.Join(cmd.Args, " "))

if addon.Name == "csi" && cluster.Spec.Cloud.Hetzner != nil && cluster.Spec.Features[kubermaticv1.ClusterFeatureExternalCloudProvider] {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

otherwise the addon will not deploy CSIDriver

{{ if .Cluster.Features.Has "externalCloudProvider" }}

@wozniakjan wozniakjan marked this pull request as ready for review June 30, 2023 13:55
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2023
@wozniakjan
Copy link
Contributor Author

following log line appears exactly once

2023-06-30T15:54:44.422+0200    debug   kkp-addon-controller    addon/addon_controller.go:530   deleting hetzner CSIDriver to allow upgrade {"worker-name": "jwozniak", "cluster": "dmsjc899ln", "addon": "csi"}

…rom v2.22 to v2.23

fixes: kubermatic#12429

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
@wozniakjan wozniakjan force-pushed the hetzner_fsgrouppolicy_reconcile branch from 281d2bb to 136a8e7 Compare June 30, 2023 14:33
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e051dd434cba698c59c5d4da6cac7da4e80ea934

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik, wozniakjan

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 3, 2023
@kubermatic-bot kubermatic-bot merged commit 91d9227 into kubermatic:main Jul 3, 2023
19 of 20 checks passed
@kubermatic-bot kubermatic-bot added this to the KKP 2.24 milestone Jul 3, 2023
@kubermatic-bot
Copy link
Contributor

@wozniakjan: new pull request created: #12439

In response to this:

/cherry-pick release/v2.23

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.

@embik embik added backport-complete Denotes a PR or issue which has been fully backported to all required release branches. and removed backport-needed Denotes a PR or issue that has not been fully backported. labels Jul 10, 2023
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. backport-complete Denotes a PR or issue which has been fully backported to all required release branches. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSIDriver csi.hetzner.cloud is invalid: spec.fsGroupPolicy - field is immutable
5 participants