2022-04-11 09:52:32 +00:00
--- charts-original/templates/cilium-configmap.yaml
+++ charts/templates/cilium-configmap.yaml
2024-07-25 16:44:30 +00:00
@@ -1,3 +1,10 @@
2022-06-16 15:12:29 +00:00
+{{- if empty .Values.global.clusterCIDRv4 }}
+{{- $_ := set .Values.ipv4 "enabled" false -}}
+{{- end }}
+
+{{- if not (empty .Values.global.clusterCIDRv6) }}
+{{- $_ := set .Values.ipv6 "enabled" true -}}
+{{- end }}
2024-07-25 16:44:30 +00:00
{{- if and ( or (.Values.agent) (.Values.operator.enabled) .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) (not .Values.preflight.enabled) }}
2022-06-16 15:12:29 +00:00
{{- /* Default values with backwards compatibility */ -}}
2024-02-08 02:13:23 +00:00
{{- $defaultBpfMapDynamicSizeRatio := 0.0 -}}
2024-07-25 16:44:30 +00:00
@@ -292,7 +299,11 @@
2022-04-11 09:52:32 +00:00
# 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 }}
2022-04-11 13:54:46 +00:00
+ enable-ipv6: "true"
2022-04-11 09:52:32 +00:00
+{{ else }}
2022-04-11 13:54:46 +00:00
+ enable-ipv6: "false"
2022-04-11 09:52:32 +00:00
+{{- end }}
{{- if .Values.cleanState }}
# If a serious issue occurs during Cilium startup, this
2024-07-25 16:44:30 +00:00
@@ -471,6 +482,8 @@
2024-02-08 02:13:23 +00:00
tunnel-protocol: "vxlan"
2023-11-17 10:50:36 +00:00
{{- else if .Values.routingMode }}
routing-mode: {{ .Values.routingMode | quote }}
2024-02-08 02:13:23 +00:00
+{{- else if not .Values.ipv4.enabled }}
2023-08-03 16:23:36 +00:00
+ routing-mode: "native"
2024-02-08 02:13:23 +00:00
{{- else }}
# Default case
2023-08-03 16:23:36 +00:00
routing-mode: "tunnel"
2024-07-25 16:44:30 +00:00
@@ -673,6 +686,8 @@
2022-07-26 15:23:25 +00:00
2023-03-13 15:29:26 +00:00
{{- if .Values.ipv6NativeRoutingCIDR }}
2022-07-26 15:23:25 +00:00
ipv6-native-routing-cidr: {{ .Values.ipv6NativeRoutingCIDR }}
+{{- else if not .Values.ipv4.enabled }}
+ ipv6-native-routing-cidr: {{ .Values.global.clusterCIDRv6 }}
2022-06-16 15:12:29 +00:00
{{- end }}
2022-07-26 15:23:25 +00:00
{{- if hasKey .Values "fragmentTracking" }}