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

46 lines
1.4 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 */ -}}
{{- $defaultBpfMapDynamicSizeRatio := 0.0 -}}
@@ -289,7 +297,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
@@ -463,6 +475,8 @@
tunnel-protocol: "vxlan"
{{- else if .Values.routingMode }}
routing-mode: {{ .Values.routingMode | quote }}
+{{- else if not .Values.ipv4.enabled }}
+ routing-mode: "native"
{{- else }}
# Default case
routing-mode: "tunnel"
@@ -657,6 +671,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" }}