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

Added checks for non-gardener managed seed clusters to ensure correct seed configurations. #6782

Conversation

ScheererJ
Copy link
Contributor

@ScheererJ ScheererJ commented Oct 7, 2022

How to categorize this PR?

/area networking
/area quality
/kind technical-debt

What this PR does / why we need it:
Added checks for non-gardener managed seed clusters to ensure correct seed configurations.

Clusters managed by gardener embed information about the node, pod and service networks inside the cluster as a config map. Other kubernetes clusters do not offer this information in a standard way.
To ensure that the seed configuration fits to the reality of the seed cluster this change introduces a heuristic check that the configured node network is valid for the nodes seen in the cluster. The same applies to the pods and services. (The amount of entities being checked is limited so that large clusters do not delay the gardenlet start-up too much.)

Which issue(s) this PR fixes:
None.

Special notes for your reviewer:
Having the seed configuration diverge from the seed cluster reality can lead to hard to track down issues with network policies as some of the ranges are taken from the seed configuration.

Release note:

Gardenlet will not start in case the seed configuration is incorrect, i.e. if the node, pod or service network specified in the Seed resource do not match to the cluster reality.

… seed configurations.

Clusters managed by gardener embed information about the node, pod and service networks
inside the cluster as a config map. Other kubernetes clusters do not offer this information
in a standard way.
To ensure that the seed configuration fits to the reality of the seed cluster this change
introduces a heuristic check that the configured node network is valid for the nodes seen
in the cluster. The same applies to the pods and services.
(The amount of entities being checked is limited so that large clusters do not delay the
gardenlet start-up too much.)
@gardener-prow gardener-prow bot added area/networking Networking related area/quality Output qualification (tests, checks, scans, automation in general, etc.) related labels Oct 7, 2022
@gardener-prow gardener-prow bot added kind/technical-debt Something that is only solved on the surface, but requires more (re)work to be done properly cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 7, 2022
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.

/assign

Thanks, looks good, just a few nits

cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
cmd/gardenlet/app/bootstrappers/seed_config.go Outdated Show resolved Hide resolved
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 7, 2022

@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-gardener-check-vulnerabilities 113755b link false /test pull-gardener-check-vulnerabilities

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.

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 Oct 10, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 10, 2022

[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 Oct 10, 2022
@gardener-prow gardener-prow bot merged commit e311758 into gardener:master Oct 10, 2022
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/networking Networking related area/quality Output qualification (tests, checks, scans, automation in general, etc.) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/technical-debt Something that is only solved on the surface, but requires more (re)work to be done properly lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants