fix(kubernetes-templating): IPv6 support for Flux managed Cilium and … (#857)

Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
This commit is contained in:
Skyler MäntysaariandDevin Buhl authored and GitHub committed 2023-07-17 17:56:37 -04:00
1 parent e447d28df7
commit cac08d6368
4 files changed
+17 -2

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
--- ---
bootstrap_coredns_addr: "{{ bootstrap_service_cidr | ansible.utils.nthhost(10) }}" bootstrap_coredns_addr: "{{ bootstrap_service_cidr.split(',')[0] | ansible.utils.nthhost(10) }}"
@@ -1,3 +1,4 @@
#jinja2: trim_blocks: True, lstrip_blocks: True
--- ---
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease kind: HelmRelease
@@ -75,17 +76,27 @@ spec:
- *host - *host
ipam: ipam:
mode: kubernetes mode: kubernetes
ipv4NativeRoutingCIDR: "{{ bootstrap_cluster_cidr.split(',')[0] }}"
{% if bootstrap_ipv6_enabled | default(false) %}
ipv6NativeRoutingCIDR: "{{ bootstrap_cluster_cidr.split(',')[1] }}"
ipv6:
enabled: true
{% endif %}
k8sServiceHost: "{{ bootstrap_kube_vip_addr }}" k8sServiceHost: "{{ bootstrap_kube_vip_addr }}"
k8sServicePort: 6443 k8sServicePort: 6443
ipv4NativeRoutingCIDR: "{{ bootstrap_cluster_cidr }}"
kubeProxyReplacement: strict kubeProxyReplacement: strict
kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10256 kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10256
{% if bootstrap_ipv6_enabled | default(false) %}
l2announcements:
enabled: false
{% else %}
# https://github.com/cilium/cilium/issues/26586 # https://github.com/cilium/cilium/issues/26586
l2announcements: l2announcements:
enabled: true enabled: true
leaseDuration: 120s leaseDuration: 120s
leaseRenewDeadline: 60s leaseRenewDeadline: 60s
leaseRetryPeriod: 1s leaseRetryPeriod: 1s
{% endif %}
loadBalancer: loadBalancer:
algorithm: maglev algorithm: maglev
mode: dsr mode: dsr
@@ -1,7 +1,10 @@
#jinja2: trim_blocks: True, lstrip_blocks: True
--- ---
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: kube-system namespace: kube-system
resources: resources:
{% if not bootstrap_ipv6_enabled | default(false) %}
- ./cilium-l2.yaml - ./cilium-l2.yaml
{% endif %}
- ./helmrelease.yaml - ./helmrelease.yaml
@@ -1,3 +1,4 @@
#jinja2: trim_blocks: True, lstrip_blocks: True
--- ---
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease kind: HelmRelease