Skip to content

Exclude base image validation in kube-system #9174

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cluster/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ kubelet_image_gc_low_threshold: 40
{{if eq .Cluster.Environment "production"}}
teapot_admission_controller_validate_application_label: "true"
teapot_admission_controller_validate_base_images: "true"
teapot_admission_controller_validate_base_images_namespaces: "^kube-system$"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@linki linki Apr 8, 2025

Choose a reason for hiding this comment

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

I don't think we did base image checks in kube-system before. Looks like it's excluded here (as a protected namespace): https://github.bus.zalan.do/teapot/admission-controller/blob/6de653566e2674a442397f983a895829274a2711/pkg/podfactory/resource_validator.go#L194

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I realized this is at least wrong.

Will try to replicate the prod issue in a pet cluster to better think about a solution.


# Check container image compliance in production clusters. Be careful when thinking about changing this: Setting it to
# false will allow any container image to run in production clusters.
Expand Down