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

Introduce secret to track hash version used by OperatingSystemConfig #9846

Merged
merged 14 commits into from
Jun 5, 2024

Conversation

MichaelEischer
Copy link
Contributor

@MichaelEischer MichaelEischer commented May 24, 2024

How to categorize this PR?

/area control-plane
/kind enhancement

What this PR does / why we need it:

This PR implements the pool-hashes secret, proposed in #9699, that is stored in the shoot namespaces on each seed cluster. The secret contains information on which hash version is used for the OperatingSystemConfig as well as the calculated hash values. If the calculated and stored hash values differ, then the hash is upgraded to the latest version.

Currently, only hash version 1 exists. Version 2 will be introduced in a follow-up PR.

The PR includes migration code, that creates a placeholder secret in each shoot namespace. As a small difference to the proposal in #9699, that secret only contains a "migrated" field. This field causes the normal reconcile for the secret to bootstrap the secret with version 1 instead of the latest version (which currently is still 1, but version 2 will be added in a follow-up PR). This minimizes the complexity of the migration code, but might require keeping a part of it around for some time.

Which issue(s) this PR fixes:
Part of #9699

Special notes for your reviewer:

I'm somewhat unsure what the best approach is to check that the pool-hashes secret properly survives a control plane migration. I've extended the corresponding e2e test to add a special label to the secret, which will be checked by the existing test code.

Release note:

gardenlet now creates a secret called `worker-pools-operatingsystemconfig-hashes` in the shoot namespace on seed clusters. This secret will be used to upgrade the operating system config key calculation in the future.

@gardener-prow gardener-prow bot added area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels May 24, 2024
@gardener-prow gardener-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2024
Copy link
Contributor

gardener-prow bot commented May 24, 2024

Hi @MichaelEischer. Thanks for your PR.

I'm waiting for a gardener member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@gardener-prow gardener-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 24, 2024
@rfranzke
Copy link
Member

/assign
/ok-to-test

@gardener-prow gardener-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 31, 2024
Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

Thank you for the nice PR 🎉

@MichaelEischer MichaelEischer force-pushed the osc-key-versioning branch 2 times, most recently from eca1aeb to 51c87c2 Compare June 3, 2024 14:04
@MichaelEischer
Copy link
Contributor Author

@rfranzke I've addressed the review comment. However, some E2E tests still fail, and I don't have a clue why. pull-gardener-e2e-kind now yields an HTTP 401 error which seems to be unrelated. And in pull-gardener-e2e-kind-ha-single-zone-upgrade it looks like the old API server keeps getting contacted, which looks like a flake. At least during the previous attempts, that error caused pull-gardener-e2e-kind-upgrade to fail which passes now.

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

Minor nits left :)

@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2024
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 5, 2024
@rfranzke
Copy link
Member

rfranzke commented Jun 5, 2024

Cool, looks good @MichaelEischer. Please fix the tests so that we can get this PR merged.

@MichaelEischer
Copy link
Contributor Author

Please fix the tests so that we can get this PR merged.

I forgot to run make check once again 🙈 , sorry, for the PR update spam.

/retest

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
Copy link
Contributor

gardener-prow bot commented Jun 5, 2024

LGTM label has been added.

Git tree hash: 0502dcf3985fa2ab99400799bf0747093bbd382d

Copy link
Contributor

gardener-prow bot commented Jun 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfranzke

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

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2024
@gardener-prow gardener-prow bot merged commit 7d419a3 into gardener:master Jun 5, 2024
18 checks passed
@MichaelEischer MichaelEischer deleted the osc-key-versioning branch June 5, 2024 14:26
rfranzke added a commit to rfranzke/gardener that referenced this pull request Jul 29, 2024
(part of gardener#9846, released with `v1.97.0`)
rfranzke added a commit to rfranzke/gardener that referenced this pull request Jul 29, 2024
(part of gardener#9846, released with `v1.97.0`)
rfranzke added a commit to rfranzke/gardener that referenced this pull request Jul 31, 2024
(part of gardener#9846, released with `v1.97.0`)
gardener-prow bot pushed a commit that referenced this pull request Jul 31, 2024
* Drop deletion of deprecated `allow-to-shoot-networks` `NetworkPolicy`

(part of #9752, released with `v1.96.0`)

* Drop fetching extension observability configs with deprecated/legacy method

(part of #9695, released with `v1.95.0`)

* Drop Prometheus/Alertmanager migration coding

(part of #9695, released with `v1.95.0`)

* Drop deprecated `.spec.pools[].userData` from `extensions.gardener.cloud/v1alpha1.Worker` API

(part of #9722, released with `v1.95.0`)

* Drop OSC hash migration `Secret` creation

(part of #9846, released with `v1.97.0`)

* Drop OSC hash assertion from upgrade tests

(part of #9865, released with `v1.98.0`)

* Drop removal code of `HVPA` resources

(part of #9698, released with `v1.95.0`)

* Address PR review feedback
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. area/control-plane Control plane related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants