From cdc1e4da2148788c43ef6308c39d3e4e50e2cc68 Mon Sep 17 00:00:00 2001 From: sridhar Date: Fri, 10 Jan 2025 14:34:34 -0800 Subject: [PATCH] Make operator init container use k8s-svc-configmap if present. --- .../templates/tigera-operator/02-tigera-operator.yaml | 8 ++++++++ manifests/ocp/02-tigera-operator.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/charts/tigera-operator/templates/tigera-operator/02-tigera-operator.yaml b/charts/tigera-operator/templates/tigera-operator/02-tigera-operator.yaml index 5fa0511f1cf..c19d9aeecaa 100644 --- a/charts/tigera-operator/templates/tigera-operator/02-tigera-operator.yaml +++ b/charts/tigera-operator/templates/tigera-operator/02-tigera-operator.yaml @@ -98,12 +98,20 @@ spec: - operator args: - -bootstrap-crds + envFrom: + - configMapRef: + name: kubernetes-services-endpoint + optional: true # Install any v3 API resources provided in the calico-resources ConfigMap. - name: create-initial-resources image: {{.Values.calicoctl.image}}:{{.Values.calicoctl.tag}} env: - name: DATASTORE_TYPE value: kubernetes + envFrom: + - configMapRef: + name: kubernetes-services-endpoint + optional: true command: - calicoctl args: diff --git a/manifests/ocp/02-tigera-operator.yaml b/manifests/ocp/02-tigera-operator.yaml index 70ba2852091..705275e3ba1 100644 --- a/manifests/ocp/02-tigera-operator.yaml +++ b/manifests/ocp/02-tigera-operator.yaml @@ -78,12 +78,20 @@ spec: - operator args: - -bootstrap-crds + envFrom: + - configMapRef: + name: kubernetes-services-endpoint + optional: true # Install any v3 API resources provided in the calico-resources ConfigMap. - name: create-initial-resources image: docker.io/calico/ctl:master env: - name: DATASTORE_TYPE value: kubernetes + envFrom: + - configMapRef: + name: kubernetes-services-endpoint + optional: true command: - calicoctl args: