refactor!: project updates (#1326)
* refactor!: flux is required again Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: delimiter that chomps Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: bootstrap_cloudflare logic Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: update tests Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: remove last quote Signed-off-by: Devin Buhl <devin@buhl.casa> * chore: update readme Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
04ff4ef994
commit
c17d543b21
93 files changed
+591
-755
No files matched your search
@@ -1,13 +1,13 @@
|
||||
---
|
||||
k3s_control_node: true
|
||||
k3s_server:
|
||||
{% if feature_gates.dual_stack_ipv4_first %}
|
||||
cluster-cidr: "{{ cluster.pod_network.split(',')[0] }},{{ cluster.pod_network.split(',')[1] }}"
|
||||
service-cidr: "{{ cluster.service_network.split(',')[0] }},{{ cluster.service_network.split(',')[1] }}"
|
||||
{% else %}
|
||||
cluster-cidr: "{{ cluster.pod_network }}"
|
||||
service-cidr: "{{ cluster.service_network }}"
|
||||
{% endif %}
|
||||
#% if bootstrap_feature_gates.dual_stack_ipv4_first %#
|
||||
cluster-cidr: "#{ bootstrap_pod_network.split(',')[0] }#,#{ bootstrap_pod_network.split(',')[1] }#"
|
||||
service-cidr: "#{ bootstrap_service_network.split(',')[0] }#,#{ bootstrap_service_network.split(',')[1] }#"
|
||||
#% else %#
|
||||
cluster-cidr: "#{ bootstrap_pod_network }#"
|
||||
service-cidr: "#{ bootstrap_service_network }#"
|
||||
#% endif %#
|
||||
disable: ["flannel", "local-storage", "metrics-server", "servicelb", "traefik"]
|
||||
disable-cloud-controller: true
|
||||
disable-kube-proxy: true
|
||||
@@ -25,16 +25,16 @@ k3s_server:
|
||||
kubelet-arg:
|
||||
- "image-gc-high-threshold=55"
|
||||
- "image-gc-low-threshold=50"
|
||||
{% if feature_gates.dual_stack_ipv4_first %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %},{% raw %}{{ ansible_default_ipv6.address }}{% endraw %}"
|
||||
{% else %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"
|
||||
{% endif %}
|
||||
#% if bootstrap_feature_gates.dual_stack_ipv4_first %#
|
||||
node-ip: "{{ ansible_host }},{{ ansible_default_ipv6.address }}"
|
||||
#% else %#
|
||||
node-ip: "{{ ansible_host }}"
|
||||
#% endif %#
|
||||
pause-image: registry.k8s.io/pause:3.9
|
||||
secrets-encryption: true
|
||||
tls-san:
|
||||
- "{{ cluster.endpoint_vip }}"
|
||||
{% for item in cluster.tls_sans %}
|
||||
- "{{ item }}"
|
||||
{% endfor %}
|
||||
- "#{ bootstrap_controllers_vip }#"
|
||||
#% for item in bootstrap_tls_sans %#
|
||||
- "#{ item }#"
|
||||
#% endfor %#
|
||||
write-kubeconfig-mode: "644"
|
||||
@@ -2,7 +2,7 @@
|
||||
k3s_become: true
|
||||
k3s_etcd_datastore: true
|
||||
k3s_install_hard_links: true
|
||||
k3s_registration_address: "{{ cluster.endpoint_vip }}"
|
||||
k3s_registration_address: "#{ bootstrap_controllers_vip }#"
|
||||
k3s_registries:
|
||||
mirrors:
|
||||
docker.io:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
main = lambda data: (
|
||||
data.get("distribution").get("type", "k3s") in ["k3s"] and
|
||||
data.get("bootstrap_distribution", "k3s") in ["k3s"] and
|
||||
len(
|
||||
list(
|
||||
filter(
|
||||
lambda item: "controller" in item and item["controller"] is False, data.get("nodes").get("inventory")
|
||||
lambda item: "controller" in item and item["controller"] is False, data.get("bootstrap_node_inventory")
|
||||
)
|
||||
)
|
||||
) > 0
|
||||
|
||||
@@ -4,9 +4,9 @@ k3s_agent:
|
||||
kubelet-arg:
|
||||
- "image-gc-high-threshold=55"
|
||||
- "image-gc-low-threshold=50"
|
||||
{% if feature_gates.dual_stack_ipv4_first %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %},{% raw %}{{ ansible_default_ipv6.address }}{% endraw %}"
|
||||
{% else %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"
|
||||
{% endif %}
|
||||
#% if bootstrap_feature_gates.dual_stack_ipv4_first %#
|
||||
node-ip: "{{ ansible_host }},{{ ansible_default_ipv6.address }}"
|
||||
#% else %#
|
||||
node-ip: "{{ ansible_host }}"
|
||||
#% endif %#
|
||||
pause-image: registry.k8s.io/pause:3.9
|
||||
@@ -3,21 +3,21 @@ kubernetes:
|
||||
children:
|
||||
controllers:
|
||||
hosts:
|
||||
{% for item in nodes.inventory %}
|
||||
{% if item.controller %}
|
||||
"{{ item.name }}":
|
||||
ansible_user: "{{ item.ssh_username }}"
|
||||
ansible_host: "{{ item.address }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if nodes.inventory | selectattr('controller', 'equalto', False) | list | length %}
|
||||
#% for item in bootstrap_node_inventory %#
|
||||
#% if item.controller %#
|
||||
"#{ item.name }#":
|
||||
ansible_user: "#{ item.ssh_user }#"
|
||||
ansible_host: "#{ item.address }#"
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
#% if bootstrap_node_inventory | selectattr('controller', 'equalto', False) | list | length %#
|
||||
workers:
|
||||
hosts:
|
||||
{% for item in nodes.inventory %}
|
||||
{% if not item.controller %}
|
||||
"{{ item.name }}":
|
||||
ansible_user: "{{ item.ssh_username }}"
|
||||
ansible_host: "{{ item.address }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
#% for item in bootstrap_node_inventory %#
|
||||
#% if not item.controller %#
|
||||
"#{ item.name }#":
|
||||
ansible_user: "#{ item.ssh_user }#"
|
||||
ansible_host: "#{ item.address }#"
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
#% endif %#
|
||||
Reference in new issue
Block a user