Skip to content

Commit af6f439

Browse files
authored
fix(calico-3.29.yaml): Disable the calico-apiserver 3.29.2 when Validating 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 <[email protected]> Signed-off-by: philroche <[email protected]>
1 parent edce9ac commit af6f439

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

calico-3.29.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: calico-3.29
33
version: "3.29.2"
4-
epoch: 0
4+
epoch: 1
55
description: "Cloud native networking and network security"
66
copyright:
77
- license: Apache-2.0
@@ -65,6 +65,15 @@ pipeline:
6565
repository: https://github.com/projectcalico/calico
6666
tag: v${{package.version}}
6767
expected-commit: c29210835f7a2795d0791974602c8e1c625c8ca1
68+
# Because we are using tigera-operator during image test we are reliant on tigera-operator setting
69+
# up all the required rbac rules that are needed for calico-apiserver to run. Currently it does not and
70+
# this is a temporary solution until https://github.com/tigera/operator/issues/3780 is resolved upstream with a new
71+
# release of tigera-operator. This issue was highlighed in calico-apiserver 3.29.2 when Validating Admission Policy
72+
# became enabled by default. This patch disables the Validating Admission Policy in calico-apiserver until
73+
# the issue is resolved.
74+
- uses: patch
75+
with:
76+
patches: calico-apiserver-disable-validating-admission-policy.patch
6877
- working-directory: felix
6978
pipeline:
7079
# Equivalent to target: "build-bpf"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/apiserver/cmd/apiserver/server/options.go b/apiserver/cmd/apiserver/server/options.go
2+
index 3701a9659..f8637cff6 100644
3+
--- a/apiserver/cmd/apiserver/server/options.go
4+
+++ b/apiserver/cmd/apiserver/server/options.go
5+
@@ -68,7 +68,7 @@ func (o *CalicoServerOptions) addFlags(flags *pflag.FlagSet) {
6+
"If true, prints swagger to stdout and exits.")
7+
flags.StringVar(&o.SwaggerFilePath, "swagger-file-path", "./",
8+
"If print-swagger is set true, then write swagger.json to location specified. Default is current directory.")
9+
- flags.BoolVar(&o.EnableValidatingAdmissionPolicy, "enable-validating-admission-policy", true,
10+
+ flags.BoolVar(&o.EnableValidatingAdmissionPolicy, "enable-validating-admission-policy", false,
11+
"If true, establishes watches for ValidatingAdmissionPolicy at startup.")
12+
}
13+

0 commit comments

Comments
 (0)