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

Fix reconciliation of hibernated clusters. #226

Conversation

ScheererJ
Copy link
Member

How to categorize this PR?

/area networking
/kind bug

What this PR does / why we need it:
Fix reconciliation of hibernated clusters.

In the past, the extension library utilized a lazy kubernetes client instantiation. However, this changed recently with gardener v1.80 and its controller-runtime update. Now, the kubernetes client creation will fail if the api-server is not available. In case a shoot cluster is hibernated, the api-server is not available. Hence, the reconciliation will run into a corresponding error. This was handled previously by discarding the error returned from the GET call. Now, we check first if the cluster is hibernated and only create the client if it is not.

Which issue(s) this PR fixes:
None.

Special notes for your reviewer:
Previously, this caused the following error:

error during reconciliation: Error reconciling Network: error getting cilium configMap: could not create shoot client: failed to create new DynamicRESTMapper: Get "https://kube-apiserver.shoot--project--shootname.svc/api?timeout=32s": dial tcp 1.2.3.4:443: i/o timeout]

Release note:

Reconciliation of hibernated cilium clusters now works again.

In the past, the extension library utilized a lazy kubernetes client instantiation.
However, this changed recently with gardener v1.80 and its controller-runtime update.
Now, the kubernetes client creation will fail if the api-server is not available.
In case a shoot cluster is hibernated, the api-server is not available. Hence, the
reconciliation will run into a corresponding error. This was handled previously by
discarding the error returned from the GET call. Now, we check first if the cluster
is hibernated and only create the client if it is not.
@ScheererJ ScheererJ requested review from a team as code owners October 30, 2023 14:36
@gardener-robot gardener-robot added needs/review Needs review area/networking Networking related kind/bug Bug size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Oct 30, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 30, 2023
Copy link
Member

@DockToFuture DockToFuture left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Oct 30, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 30, 2023
@gardener-prow
Copy link

gardener-prow bot commented Oct 30, 2023

@ScheererJ: 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-extension-networking-cilium-e2e-kind 4ad3413 link true /test pull-extension-networking-cilium-e2e-kind

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.

@ScheererJ ScheererJ merged commit b072476 into gardener:master Oct 30, 2023
1 check passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking Networking related kind/bug Bug needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants