From e9a7abc9baa30c57cb8f6a427bdd232f2739e2d8 Mon Sep 17 00:00:00 2001 From: amold1 Date: Tue, 4 Jun 2024 10:34:00 -0400 Subject: [PATCH] Fix k3s helmchart values for vpcless (#352) * Fix k3s helmchart values --- .../flavors/k3s/dual-stack/kustomization.yaml | 49 +++++++++----- .../k3s/full-vpcless/kustomization.yaml | 67 +++++++++---------- .../flavors/k3s/vpcless/kustomization.yaml | 53 ++++++++++----- 3 files changed, 99 insertions(+), 70 deletions(-) diff --git a/templates/flavors/k3s/dual-stack/kustomization.yaml b/templates/flavors/k3s/dual-stack/kustomization.yaml index d75ebf177..791847077 100644 --- a/templates/flavors/k3s/dual-stack/kustomization.yaml +++ b/templates/flavors/k3s/dual-stack/kustomization.yaml @@ -40,25 +40,40 @@ patches: clusterCidr: "10.192.0.0/10,fd02::/80" serviceCidr: "10.96.0.0/12,fd03::/108" - target: - kind: HelmChartProxy - name: .*-cilium + group: controlplane.cluster.x-k8s.io + version: v1beta1 + kind: KThreesControlPlane 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 + path: /spec/kthreesConfigSpec/files/1/content + value: |- + apiVersion: helm.cattle.io/v1 + kind: HelmChart + metadata: + name: cilium + namespace: kube-system + spec: + targetNamespace: kube-system + version: ${CILIUM_VERSION:=1.15.4} + chart: cilium + repo: https://helm.cilium.io/ + bootstrap: true + valuesContent: |- + bgpControlPlane: + enabled: true + ipam: + mode: kubernetes + ipv4: + enabled: true + ipv6: + enabled: true + k8s: + requireIPv4PodCIDR: true + hubble: + relay: + enabled: true + ui: + enabled: true - target: group: controlplane.cluster.x-k8s.io version: v1beta1 diff --git a/templates/flavors/k3s/full-vpcless/kustomization.yaml b/templates/flavors/k3s/full-vpcless/kustomization.yaml index 96ebf6f50..b1e2c5bc2 100644 --- a/templates/flavors/k3s/full-vpcless/kustomization.yaml +++ b/templates/flavors/k3s/full-vpcless/kustomization.yaml @@ -8,24 +8,6 @@ resources: - ../../../addons/machine-health-check 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 @@ -88,25 +70,40 @@ patches: clusterCidr: "10.192.0.0/10,fd02::/80" serviceCidr: "10.96.0.0/12,fd03::/108" - target: - kind: HelmChartProxy - name: .*-cilium + group: controlplane.cluster.x-k8s.io + version: v1beta1 + kind: KThreesControlPlane 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 + path: /spec/kthreesConfigSpec/files/1/content + value: |- + apiVersion: helm.cattle.io/v1 + kind: HelmChart + metadata: + name: cilium + namespace: kube-system + spec: + targetNamespace: kube-system + version: ${CILIUM_VERSION:=1.15.4} + chart: cilium + repo: https://helm.cilium.io/ + bootstrap: true + valuesContent: |- + bgpControlPlane: + enabled: true + ipam: + mode: kubernetes + ipv4: + enabled: true + ipv6: + enabled: true + k8s: + requireIPv4PodCIDR: true + hubble: + relay: + enabled: true + ui: + enabled: true - target: group: cluster.x-k8s.io version: v1beta1 diff --git a/templates/flavors/k3s/vpcless/kustomization.yaml b/templates/flavors/k3s/vpcless/kustomization.yaml index 3e2da3d4b..37c79d50a 100644 --- a/templates/flavors/k3s/vpcless/kustomization.yaml +++ b/templates/flavors/k3s/vpcless/kustomization.yaml @@ -4,24 +4,6 @@ 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 @@ -89,3 +71,38 @@ patches: name: ${CLUSTER_NAME} labels: vpcless: "true" + - target: + group: controlplane.cluster.x-k8s.io + version: v1beta1 + kind: KThreesControlPlane + patch: |- + - op: replace + path: /spec/kthreesConfigSpec/files/1/content + value: |- + apiVersion: helm.cattle.io/v1 + kind: HelmChart + metadata: + name: cilium + namespace: kube-system + spec: + targetNamespace: kube-system + version: ${CILIUM_VERSION:=1.15.4} + chart: cilium + repo: https://helm.cilium.io/ + bootstrap: true + valuesContent: |- + bgpControlPlane: + enabled: true + ipam: + mode: kubernetes + ipv4: + enabled: true + ipv6: + enabled: false + k8s: + requireIPv4PodCIDR: true + hubble: + relay: + enabled: true + ui: + enabled: true