rke2-charts/packages/rke2-cilium/generated-changes/patch/templates/cilium-configmap.yaml.patch

46 lines
1.4 KiB
Diff
Raw Normal View History

--- charts-original/templates/cilium-configmap.yaml
+++ charts/templates/cilium-configmap.yaml
@@ -1,3 +1,11 @@
+{{- if empty .Values.global.clusterCIDRv4 }}
+{{- $_ := set .Values.ipv4 "enabled" false -}}
+{{- end }}
+
+{{- if not (empty .Values.global.clusterCIDRv6) }}
+{{- $_ := set .Values.ipv6 "enabled" true -}}
+{{- end }}
+
{{- if and (.Values.agent) (not .Values.preflight.enabled) }}
{{- /* Default values with backwards compatibility */ -}}
{{- $defaultEnableCnpStatusUpdates := "true" -}}
@@ -238,7 +246,11 @@
# Enable IPv6 addressing. If enabled, all endpoints are allocated an IPv6
# address.
- enable-ipv6: {{ .Values.ipv6.enabled | quote }}
+{{- if coalesce .Values.global.clusterCIDRv6 .Values.ipv6.enabled }}
+ enable-ipv6: "true"
+{{ else }}
+ enable-ipv6: "false"
+{{- end }}
{{- if .Values.cleanState }}
# If a serious issue occurs during Cilium startup, this
@@ -400,6 +412,8 @@
enable-local-node-route: "false"
{{- else if .Values.aksbyocni.enabled }}
tunnel: "vxlan"
+{{- else if not .Values.ipv4.enabled }}
+ tunnel: "disabled"
{{- else }}
tunnel: {{ .Values.tunnel | quote }}
{{- end }}
@@ -566,6 +580,8 @@
{{- if .Values.ipv6NativeRoutingCIDR }}
ipv6-native-routing-cidr: {{ .Values.ipv6NativeRoutingCIDR }}
+{{- else if not .Values.ipv4.enabled }}
+ ipv6-native-routing-cidr: {{ .Values.global.clusterCIDRv6 }}
{{- end }}
{{- if hasKey .Values "fragmentTracking" }}