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

Sync cluster CA to ConfigMap and use it in shoots/{admin,viewer}kubeconfig subresource #9123

Merged
merged 7 commits into from
Feb 8, 2024

Conversation

petersutter
Copy link
Contributor

@petersutter petersutter commented Feb 5, 2024

How to categorize this PR?

/area usability
/area security
/kind enhancement

What this PR does / why we need it:
With this PR the cluster CA is synced to a <shoot-name>.ca-cluster ConfigMap in the project namespace of the garden cluster. The shoots/{admin,viewer}kubeconfig subresource retrieves it from there instead of using the Secret resource.
It falls back to the Secret if the ConfigMap has not been synced yet.

Which issue(s) this PR fixes:
Fixes #9091

Special notes for your reviewer:

Release note:

The util function `pkg/utils/gardener.ComputeShootProjectSecretName` has been renamed to `pkg/utils/gardener.ComputeShootProjectResourceName`.
The shoot cluster CA bundle is now stored in a `ConfigMap` in the project namespace of the garden cluster, in addition to storing it in a `Secret`. This `ConfigMap` shares the same name as the pre-existing `Secret`, which is `<shoot-name>.ca-cluster`. The `Secret` will be removed in a future Gardener release. Therefore, if your tooling relies on this `Secret`, you should update it to fetch the `ConfigMap` instead.

@gardener-prow gardener-prow bot added area/usability Usability related area/security Security related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Feb 5, 2024
@gardener-prow gardener-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 5, 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.

Impressive PR @petersutter, nice! Thanks for the great commit structure!

Could you please also adapt the occurrences in test/e2e (example)?

pkg/operation/botanist/secrets.go Outdated Show resolved Hide resolved
pkg/registry/core/shoot/storage/kubeconfig.go Outdated Show resolved Hide resolved
pkg/registry/core/shoot/storage/kubeconfig.go Show resolved Hide resolved
@gardener-prow gardener-prow bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 6, 2024
@rfranzke
Copy link
Member

rfranzke commented Feb 6, 2024

Thanks, let's get this merged after you rebased and the tests are fixed.

@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 6, 2024
Copy link
Contributor

gardener-prow bot commented Feb 6, 2024

@petersutter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gardener-apidiff 8f9f531 link false /test pull-gardener-apidiff

Full PR test history. Your PR dashboard. Command help for this repository.
Please help us cut down on flakes by linking this test failure to an open flake report or filing a new flake report if you can't find an existing one. Also see our testing guideline for how to avoid and hunt flakes.

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.

@petersutter
Copy link
Contributor Author

/retest-required

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 Feb 8, 2024
Copy link
Contributor

gardener-prow bot commented Feb 8, 2024

LGTM label has been added.

Git tree hash: fb80533f2df808c1516752ee9233ce83c819b6ae

Copy link
Contributor

gardener-prow bot commented Feb 8, 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 Feb 8, 2024
@gardener-prow gardener-prow bot merged commit ee96eec into gardener:master Feb 8, 2024
15 of 16 checks passed
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/security Security related area/usability Usability 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. 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.

Store Shoot cluster CA bundle as ConfigMap
2 participants