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

48 lines
1.5 KiB
Diff

--- 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" -}}
@@ -269,7 +277,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
@@ -439,7 +451,9 @@
{{- else if .Values.routingMode }}
routing-mode: {{ .Values.routingMode | quote }}
{{- else }}
- {{- if eq .Values.tunnel "disabled" }}
+{{- if not .Values.ipv4.enabled }}
+ routing-mode: "native"
+{{- else if eq .Values.tunnel "disabled" }}
routing-mode: "native"
{{- else if eq .Values.tunnel "vxlan" }}
routing-mode: "tunnel"
@@ -630,6 +644,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" }}