Skip to content

Add validation webhook for shoot object in logging mode#203

Merged
ske-prow[bot] merged 6 commits into
mainfrom
addAddmissionWebhook
Jul 14, 2026
Merged

Add validation webhook for shoot object in logging mode#203
ske-prow[bot] merged 6 commits into
mainfrom
addAddmissionWebhook

Conversation

@dergeberl

@dergeberl dergeberl commented Jul 8, 2026

Copy link
Copy Markdown
Member

How to categorize this PR?

/kind enhancement
/cc @stackitcloud/ske-infrastructure

What this PR does / why we need it:

We already have validation functions for the ControlPlaneConfig and InfrastructureConfig but we had no validation webhook for the shoot object. This PR adds the webhook.

It also fixes the InfrastructureConfig as this was not working, as it is possible to habe no InfrastructureConfig.Networks.Workers if InfrastructureConfig.Networks.ID is set.

I created a cluster with and without SNA via the ske-api.

We want to use this for the ALB integration #54

Special notes for your reviewer:

Please also check the validation itself as this was not used before and needed already adoption in the InfrastructureConfig part.

@ske-prow
ske-prow Bot requested a review from a team July 8, 2026 14:40
@ske-prow ske-prow Bot added kind/enhancement Enhancement, improvement, extension size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 8, 2026
@dergeberl
dergeberl force-pushed the addAddmissionWebhook branch from 04177a8 to 9b8a7b5 Compare July 8, 2026 14:52
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/apis/stackit/validation/controlplane.go
Comment thread pkg/apis/stackit/validation/infrastructure.go
@dergeberl

Copy link
Copy Markdown
Member Author

/hold
needs more testing

@ske-prow ske-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2026
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/apis/stackit/validation/infrastructure.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
Comment thread pkg/admission/validator/shoot.go Outdated
@breuerfelix

Copy link
Copy Markdown
Member

Just for the record: all current PROD shoots are not violating the current validation.

… add ValidateControlPlaneConfigUpdate; add basic unit tests that the webhook works (not testing the actual validation)
@dergeberl
dergeberl force-pushed the addAddmissionWebhook branch from dbf70e7 to 7a68d5f Compare July 14, 2026 08:55
Comment thread pkg/admission/validator/shoot.go Outdated
@dergeberl dergeberl changed the title Add addmission webhook for shoot object Add validation webhook for shoot object in logging mode Jul 14, 2026
@ske-prow ske-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2026
@ske-prow

ske-prow Bot commented Jul 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: breuerfelix

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@ske-prow ske-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2026
@ske-prow

ske-prow Bot commented Jul 14, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: d9920f65bd93db33d5dab9b995248891284c12bf

@breuerfelix

Copy link
Copy Markdown
Member

/retest

1 similar comment
@dergeberl

Copy link
Copy Markdown
Member Author

/retest

@breuerfelix

Copy link
Copy Markdown
Member

/override pull-gardener-extension-provider-stackit-integration-tests

@ske-prow

ske-prow Bot commented Jul 14, 2026

Copy link
Copy Markdown

@breuerfelix: Overrode contexts on behalf of breuerfelix: pull-gardener-extension-provider-stackit-integration-tests

Details

In response to this:

/override pull-gardener-extension-provider-stackit-integration-tests

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.

@dergeberl

Copy link
Copy Markdown
Member Author

/unhold
was tested and we only do logging for now

@ske-prow ske-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 14, 2026
@ske-prow
ske-prow Bot merged commit fb02642 into main Jul 14, 2026
4 checks passed
@ske-prow
ske-prow Bot deleted the addAddmissionWebhook branch July 14, 2026 14:50
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. kind/enhancement Enhancement, improvement, extension 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.

3 participants