feat: re-introduce flux vars for cluster network settings

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-07-17 20:52:12 -04:00
1 parent 34b87d6a52
commit 4dd5f9d5a8
8 files changed
+34 -26

No files matched your search

@@ -1,8 +1,13 @@
#jinja2: trim_blocks: True, lstrip_blocks: True
---
timezone: "{{ bootstrap_timezone }}"
github_username: "{{ bootstrap_github_username }}"
coredns_addr: "{{ bootstrap_coredns_addr }}"
coredns_addr: "{{ bootstrap_service_cidr.split(',')[0] | ansible.utils.nthhost(10) }}"
kube_vip_addr: "{{ bootstrap_kube_vip_addr }}"
cluster_cidr: "{{ bootstrap_cluster_cidr }}"
service_cidr: "{{ bootstrap_service_cidr }}"
cluster_cidr: "{{ bootstrap_cluster_cidr.split(',')[0] }}"
service_cidr: "{{ bootstrap_service_cidr.split(',')[0] }}"
node_cidr: "{{ bootstrap_node_cidr }}"
{% if bootstrap_ipv6_enabled | default(false) %}
cluster_cidr_v6: "{{ bootstrap_cluster_cidr.split(',')[1] }}"
service_cidr_v6: "{{ bootstrap_service_cidr.split(',')[1] }}"
{% endif %}
@@ -31,29 +31,26 @@ spec:
enabled: false
ipam:
mode: kubernetes
ipv4NativeRoutingCIDR: "{% raw %}{{ cluster_cidr }}{% endraw %}"
{% if bootstrap_ipv6_enabled | default(false) %}
ipv4NativeRoutingCIDR: "{% raw %}{{ k3s_server['cluster-cidr'].split(',')[0] }}{% endraw %}"
ipv6NativeRoutingCIDR: "{% raw %}{{ k3s_server['cluster-cidr'].split(',')[1] }}{% endraw %}"
ipv6NativeRoutingCIDR: "{% raw %}{{ cluster_cidr_v6 }}{% endraw %}"
ipv6:
enabled: true
{% else %}
ipv4NativeRoutingCIDR: "{% raw %}{{ k3s_server['cluster-cidr'] }}{% endraw %}"
{% endif %}
k8sServiceHost: "{% raw %}{{ kube_vip_addr }}{% endraw %}"
k8sServicePort: 6443
kubeProxyReplacement: strict
kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10256
{% if bootstrap_ipv6_enabled | default(false) %}
l2announcements:
{% if bootstrap_ipv6_enabled | default(false) %}
enabled: false
{% else %}
# https://github.com/cilium/cilium/issues/26586
l2announcements:
{% else %}
enabled: true
# https://github.com/cilium/cilium/issues/26586
leaseDuration: 120s
leaseRenewDeadline: 60s
leaseRetryPeriod: 1s
{% endif %}
{% endif %}
loadBalancer:
algorithm: maglev
mode: dsr
@@ -19,8 +19,7 @@ spec:
k8sAppLabelOverride: kube-dns
service:
name: kube-dns
# Choose the 10th IP address from the start of the service-cidr
clusterIP: "{% raw %}{{ k3s_server['service-cidr'].split(',')[0] | ansible.utils.nthhost(10) }}{% endraw %}"
clusterIP: "{% raw %}{{ coredns_addr }}{% endraw %}"
serviceAccount:
create: true
deployment: