Repository navigation
Conversation
Buildkit, alloy and node-exporter need privileged pods, which clusters that enforce baseline by default reject. A presync hook on their releases labels the namespace on fresh installs, and the API does the same at startup for existing ones. A level already set is kept. UNB-408
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing sets a Pod Security level on
unbind-system. Helmfile creates it implicitly (createNamespace: true). On clusters that enforcebaselineby default, Talos on banano among them, the platform's own pods are rejected:privilegedandseccompProfile: Unconfined/var/loghost pathFix:
pod-security.kubernetes.io/enforce: privilegedwhen it has no level yet. Written once as a YAML anchor. It is safe to run concurrently:createtolerates an existing namespace, and the label is only written when empty.deploy/releases/README.md), so the API sets the same label on its own namespace at startup, only when missing. The API service account already haspatchon namespaces (sa.yaml).Backwards compatibility:
deploy/charts/charts/, CRDs or RBAC, so the release guard needs nodeploy/releases/dir.Team namespaces are left alone on purpose:
baselinethere would close the hole where team editors can create privileged pods with their kubeconfig (rbac_manager.go).NET_ADMIN,SYS_MODULE) on existing k3s installs.Docs: a Pod Security note in Bring Your Own Kubernetes, and the chart README.
Tests:
TestEnsurePrivilegedNamespace(fake clientset) covers adding the label, keeping an existing level, and an unlabeled namespace.helmfile buildrenders the hook on all three releases. The jsonpath check was tried withkubectl --localagainst labeled and bare namespaces. The hook has not run against a live cluster.fixes UNB-408