-
Notifications
You must be signed in to change notification settings - Fork 142
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
Calico 3.29.2 apiserver fails to start due to missing validatingadmission* rbac rules #3780
Labels
kind/bug
Something isn't working
Comments
philroche
added a commit
to philroche/operator
that referenced
this issue
Feb 20, 2025
… rules for kubernetes 1.30+ The expactation was that the "validatingadmissionpolicies" and "validatingadmissionpolicybindings" rules would be added when using kubernetes 1.30+ but this is not happening due to reversed < > logic. This was highlighted using calico-apiserver 3.29.2 where this validation is performed by default but was unable to when using the tigera operator due to missing rules. This resolves issue tigera#3780
philroche
added a commit
to philroche/operator
that referenced
this issue
Feb 20, 2025
… rules for kubernetes 1.30+ The expectation was that the "validatingadmissionpolicies" and "validatingadmissionpolicybindings" rules would be added when using kubernetes 1.30+ but this is not happening due to reversed < > logic. This was highlighted using calico-apiserver 3.29.2 where this validation is performed by default but was unable to when using the tigera operator due to missing rules. This resolves issue tigera#3780
PR #3781 fixes this issue |
philroche
added a commit
to philroche/os
that referenced
this issue
Feb 20, 2025
…ating Admission Policy checks until upstream tigrea operator adds the required rules Because we are using tigera-operator during image test we are reliant on tigera-operator setting up all the required rbac rules that are needed for calico-apiserver to run. This is a temporary solution until tigera/operator#3780 is resovled upstream with a new release of tigera-operator. This issue was highlighed in calico-apiserver 3.29.2 when Validating Admission Policy became enabled by default. This patch disables the Validating Admission Policy in calico-apiserver until the issue is resolved. Signed-off-by: philroche <phil.roche@chainguard.dev>
philroche
added a commit
to philroche/os
that referenced
this issue
Feb 20, 2025
…ating Admission Policy checks until upstream tigrea operator adds the required rules Because we are using tigera-operator during image test we are reliant on tigera-operator setting up all the required rbac rules that are needed for calico-apiserver to run. Currently it does not [1] and this is a temporary solution until tigera/operator#3780 is resolved upstream with a new release of tigera-operator. This issue was highlighed in calico-apiserver 3.29.2 when Validating Admission Policy became enabled by default [2]. This patch disables the Validating Admission Policy in calico-apiserver until the issue is resolved. [1] https://github.com/tigera/operator/blob/ed26c42e1e232e9cc604a9a010d4ca9111b6f388/pkg/render/apiserver.go#L654C11-L654C28 [2] projectcalico/calico@8eacb02 Signed-off-by: philroche <phil.roche@chainguard.dev>
powersj
pushed a commit
to wolfi-dev/os
that referenced
this issue
Feb 20, 2025
…ating Admission Policy checks until upstream tigrea operator adds the required rules (#43188) Because we are using tigera-operator during image test we are reliant on tigera-operator setting up all the required rbac rules that are needed for calico-apiserver to run. Currently it does not [1] and this is a temporary solution until tigera/operator#3780 is resolved upstream with a new release of tigera-operator. This issue was highlighed in calico-apiserver 3.29.2 when Validating Admission Policy became enabled by default [2]. This patch disables the Validating Admission Policy in calico-apiserver until the issue is resolved. [1] https://github.com/tigera/operator/blob/ed26c42e1e232e9cc604a9a010d4ca9111b6f388/pkg/render/apiserver.go#L654C11-L654C28 [2] projectcalico/calico@8eacb02 Signed-off-by: philroche <phil.roche@chainguard.dev> Signed-off-by: philroche <phil.roche@chainguard.dev>
Discussion in the PR #3781 shows my assumptions on the logic of this check were incorrect but the issue does still persist. |
Some further debug with a deployment via helm chart of tigera-operator 1.37
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code @ https://github.com/tigera/operator/blob/ed26c42e1e232e9cc604a9a010d4ca9111b6f388/pkg/render/apiserver.go#L654C11-L654C28 conditionally adds rule based on kuberetes version
With calico 3.29.2 with commit projectcalico/calico@8eacb02 there was a new default set to EnableValidatingAdmissionPolicy which depends on the
validatingadmissionpolicies
andvalidatingadmissionpolicybindings
being present. When deploying tigera operator via a helm chart install the rules required to successfully make those requests are missing resulting in calico-apiserver error:The logic of the if statement above is reversed for the
c.cfg.KubernetesVersion.Minor
check and should be checkingc.cfg.KubernetesVersion.Minor > 30
and not< 30
as the comment suggests it is. I tested with kuberenetes 1.32 and observed these errors. If I manually add these rules the the calico-apiserver starts as expected.The text was updated successfully, but these errors were encountered: