From a53b6aa3664cbb489eaa8462b78b03fff6c02445 Mon Sep 17 00:00:00 2001 From: Matt Pryor Date: Wed, 11 May 2022 13:30:42 +0100 Subject: [PATCH] Use Helm chart for Calico Tigera operator --- .../cluster-addons/templates/cni-calico.yaml | 12 ++--------- charts/cluster-addons/values.yaml | 20 ++++++++++--------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/charts/cluster-addons/templates/cni-calico.yaml b/charts/cluster-addons/templates/cni-calico.yaml index 9e6e67e..095772b 100644 --- a/charts/cluster-addons/templates/cni-calico.yaml +++ b/charts/cluster-addons/templates/cni-calico.yaml @@ -1,15 +1,7 @@ {{- define "cluster-addons.cni-calico.config" -}} {{- include "cluster-addons.job.defaults" (list . "cni-calico") }} -installType: kustomize -kustomize: - kustomizationTemplate: | - resources: - {{- range .Values.cni.calico.manifests }} - - {{ tpl . $ }} - {{- end }} - {{- with .Values.cni.calico.kustomization }} - kustomization: {{ toYaml . | nindent 4 }} - {{- end }} +installType: helm +helm: {{ omit .Values.cni.calico "installation" | toYaml | nindent 2 }} extraFiles: installation.yaml: | apiVersion: operator.tigera.io/v1 diff --git a/charts/cluster-addons/values.yaml b/charts/cluster-addons/values.yaml index 13b8350..0f28bc3 100644 --- a/charts/cluster-addons/values.yaml +++ b/charts/cluster-addons/values.yaml @@ -85,15 +85,17 @@ cni: type: calico # Settings for the calico CNI calico: - # The version of Calico to deploy - # This is only used in the default manifest URL - version: v3.22 - # The URLs of the Calico manifests - # This is treated as a template during rendering - manifests: - - https://docs.projectcalico.org/{{ .Values.cni.calico.version }}/manifests/tigera-operator.yaml - # Any kustomization to be applied to the tigera-operator manifests - kustomization: {} + chart: + repo: https://projectcalico.docs.tigera.io/charts + name: tigera-operator + version: v3.23.0 + release: + namespace: tigera-operator + # See https://projectcalico.docs.tigera.io/getting-started/kubernetes/helm + values: + # Managing the installation separately makes deriving the pod CIDR cleaner + installation: + enabled: false # The spec of the Calico installation # See https://projectcalico.docs.tigera.io/reference/installation/api installation: