diff --git a/templates/addons/provider-linode/linode-ccm.yaml b/templates/addons/ccm-linode/ccm-linode.yaml similarity index 81% rename from templates/addons/provider-linode/linode-ccm.yaml rename to templates/addons/ccm-linode/ccm-linode.yaml index 5f42e1d6e..1f2e23642 100644 --- a/templates/addons/provider-linode/linode-ccm.yaml +++ b/templates/addons/ccm-linode/ccm-linode.yaml @@ -4,9 +4,8 @@ metadata: name: ${CLUSTER_NAME}-linode-cloud-controller-manager spec: clusterSelector: - matchExpressions: - - {key: vpcless, operator: DoesNotExist} - - {key: ccm, operator: In, values: ["${CLUSTER_NAME}-linode"]} + matchLabels: + ccm: "${CLUSTER_NAME}-linode" repoURL: https://linode.github.io/linode-cloud-controller-manager/ chartName: ccm-linode namespace: kube-system diff --git a/templates/addons/provider-linode/kustomization.yaml b/templates/addons/ccm-linode/kustomization.yaml similarity index 59% rename from templates/addons/provider-linode/kustomization.yaml rename to templates/addons/ccm-linode/kustomization.yaml index 46c269ec5..591f2129a 100644 --- a/templates/addons/provider-linode/kustomization.yaml +++ b/templates/addons/ccm-linode/kustomization.yaml @@ -1,5 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - linode-ccm.yaml - - linode-ccm-vpcless.yaml + - ccm-linode.yaml diff --git a/templates/addons/cilium/cilium-ipv6.yaml b/templates/addons/cilium/cilium-ipv6.yaml deleted file mode 100644 index a99962765..000000000 --- a/templates/addons/cilium/cilium-ipv6.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy -metadata: - name: ${CLUSTER_NAME}-cilium-ipv6 -spec: - clusterSelector: - matchExpressions: - - {key: ipv6, operator: In, values: ['true']} - - {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]} - - {key: vxlan, operator: DoesNotExist} - repoURL: https://helm.cilium.io/ - chartName: cilium - namespace: kube-system - version: ${CILIUM_VERSION:=1.15.0} - options: - waitForJobs: true - wait: true - timeout: 5m - valuesTemplate: | - bgpControlPlane: - enabled: true - ipv6: - enabled: true - ipam: - mode: kubernetes - k8s: - requireIPv4PodCIDR: true - hubble: - relay: - enabled: true - ui: - enabled: true diff --git a/templates/addons/cilium/cilium-vxlan.yaml b/templates/addons/cilium/cilium-vxlan.yaml deleted file mode 100644 index 89bf86b7a..000000000 --- a/templates/addons/cilium/cilium-vxlan.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy -metadata: - name: ${CLUSTER_NAME}-cilium-vxlan -spec: - clusterSelector: - matchExpressions: - - {key: vxlan, operator: In, values: ['true']} - - {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]} - - {key: ipv6, operator: DoesNotExist} - repoURL: https://helm.cilium.io/ - chartName: cilium - namespace: kube-system - version: ${CILIUM_VERSION:=1.15.0} - options: - waitForJobs: true - wait: true - timeout: 5m - valuesTemplate: | - bgpControlPlane: - enabled: true - ipam: - mode: kubernetes - k8s: - requireIPv4PodCIDR: true - hubble: - relay: - enabled: true - ui: - enabled: true diff --git a/templates/addons/cilium/cilium.yaml b/templates/addons/cilium/cilium.yaml index e8d3b2396..c611d3f0c 100644 --- a/templates/addons/cilium/cilium.yaml +++ b/templates/addons/cilium/cilium.yaml @@ -4,10 +4,8 @@ metadata: name: ${CLUSTER_NAME}-cilium spec: clusterSelector: - matchExpressions: - - {key: ipv6, operator: DoesNotExist} - - {key: vxlan, operator: DoesNotExist} - - {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]} + matchLabels: + cni: "${CLUSTER_NAME}-cilium" repoURL: https://helm.cilium.io/ chartName: cilium namespace: kube-system diff --git a/templates/addons/cilium/kustomization.yaml b/templates/addons/cilium/kustomization.yaml index bc81f2113..07edafad1 100644 --- a/templates/addons/cilium/kustomization.yaml +++ b/templates/addons/cilium/kustomization.yaml @@ -2,5 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - cilium.yaml - - cilium-ipv6.yaml - - cilium-vxlan.yaml diff --git a/templates/addons/provider-linode/linode-ccm-vpcless.yaml b/templates/addons/provider-linode/linode-ccm-vpcless.yaml deleted file mode 100644 index 4f0a092ef..000000000 --- a/templates/addons/provider-linode/linode-ccm-vpcless.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: addons.cluster.x-k8s.io/v1alpha1 -kind: HelmChartProxy -metadata: - name: ${CLUSTER_NAME}-linode-cloud-controller-manager-vpcless -spec: - clusterSelector: - matchLabels: - ccm: "${CLUSTER_NAME}-linode" - vpcless: "true" - repoURL: https://linode.github.io/linode-cloud-controller-manager/ - chartName: ccm-linode - namespace: kube-system - version: ${LINODE_CCM_VERSION:=v0.4.4} - options: - waitForJobs: true - wait: true - timeout: 5m - valuesTemplate: | - secretRef: - name: "linode-token-region" - image: - pullPolicy: IfNotPresent diff --git a/templates/flavors/default/kustomization.yaml b/templates/flavors/default/kustomization.yaml index 2fc3dc7dd..b43a23aa0 100644 --- a/templates/flavors/default/kustomization.yaml +++ b/templates/flavors/default/kustomization.yaml @@ -6,7 +6,7 @@ resources: - kubeadmControlPlane.yaml - ../../addons/cilium - ../../addons/csi-driver-linode - - ../../addons/provider-linode + - ../../addons/ccm-linode - ../../addons/cluster-resource-set patches: - target: diff --git a/templates/flavors/dual-stack/kustomization.yaml b/templates/flavors/dual-stack/kustomization.yaml index 1537925cc..729b06c9a 100644 --- a/templates/flavors/dual-stack/kustomization.yaml +++ b/templates/flavors/dual-stack/kustomization.yaml @@ -14,8 +14,6 @@ patches: kind: Cluster metadata: name: ${CLUSTER_NAME} - labels: - ipv6: "true" spec: clusterNetwork: pods: @@ -48,3 +46,23 @@ patches: controllerManager: extraArgs: node-cidr-mask-size-ipv6: "96" + - target: + kind: HelmChartProxy + name: .*-cilium + patch: |- + - op: replace + path: /spec/valuesTemplate + value: | + bgpControlPlane: + enabled: true + ipv6: + enabled: true + ipam: + mode: kubernetes + k8s: + requireIPv4PodCIDR: true + hubble: + relay: + enabled: true + ui: + enabled: true \ No newline at end of file diff --git a/templates/flavors/vpcless/kustomization.yaml b/templates/flavors/vpcless/kustomization.yaml index b23c84785..e6a680279 100644 --- a/templates/flavors/vpcless/kustomization.yaml +++ b/templates/flavors/vpcless/kustomization.yaml @@ -4,6 +4,38 @@ resources: - ../default patches: + - target: + kind: HelmChartProxy + name: .*-cilium + patch: |- + - op: replace + path: /spec/valuesTemplate + value: | + bgpControlPlane: + enabled: true + ipam: + mode: kubernetes + k8s: + requireIPv4PodCIDR: true + hubble: + relay: + enabled: true + ui: + enabled: true + + - target: + kind: HelmChartProxy + name: .*-linode-cloud-controller-manager + patch: |- + - op: replace + path: /spec/valuesTemplate + value: | + secretRef: + name: "linode-token-region" + image: + pullPolicy: IfNotPresent + + - target: kind: LinodeVPC patch: |-