feat: remove the need for raw jinja blocks (#1158)
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
f9481d6202
commit
e6fbc6e128
92 files changed
+430
-441
No files matched your search
@@ -1,4 +1,4 @@
|
||||
{% if bootstrap_distribution == 'k3s' %}
|
||||
<% if bootstrap_distribution == 'k3s' %>
|
||||
---
|
||||
#
|
||||
# Below vars are for the xanmanning.k3s role
|
||||
@@ -9,17 +9,17 @@
|
||||
k3s_release_version: "v1.29.0+k3s1"
|
||||
k3s_install_hard_links: true
|
||||
k3s_become: true
|
||||
{% if bootstrap_nodes.master | length > 1 %}
|
||||
<% if bootstrap_nodes.master | length > 1 %>
|
||||
k3s_etcd_datastore: true
|
||||
{% else %}
|
||||
<% else %>
|
||||
k3s_etcd_datastore: false
|
||||
{% endif %}
|
||||
k3s_registration_address: "{% raw %}{{ kube_api_addr }}{% endraw %}"
|
||||
<% endif %>
|
||||
k3s_registration_address: "{{ kube_api_addr }}"
|
||||
# /var/lib/rancher/k3s/server/manifests
|
||||
k3s_server_manifests_templates:
|
||||
- custom-cilium-helmchart.yaml.j2
|
||||
- custom-coredns-helmchart.yaml.j2
|
||||
{% if bootstrap_nodes.master | length > 1 and not bootstrap_kube_api_addr %}
|
||||
<% if bootstrap_nodes.master | length > 1 and not bootstrap_kube_api_addr %>
|
||||
# /var/lib/rancher/k3s/server/manifests
|
||||
k3s_server_manifests_urls:
|
||||
- url: https://raw.githubusercontent.com/kube-vip/website/main/content/manifests/rbac.yaml
|
||||
@@ -27,5 +27,5 @@ k3s_server_manifests_urls:
|
||||
# /var/lib/rancher/k3s/agent/pod-manifests
|
||||
k3s_server_pod_manifests_templates:
|
||||
- kube-vip-static-pod.yaml.j2
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<% endif %>
|
||||
<% endif %>
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
timezone: "{{ bootstrap_timezone }}"
|
||||
github_username: "{{ bootstrap_github_username }}"
|
||||
coredns_addr: "{{ bootstrap_service_cidr.split(',')[0] | nthhost(10) }}"
|
||||
{% if bootstrap_nodes.master | length == 1 and not bootstrap_kube_api_addr %}
|
||||
kube_api_addr: "{{ bootstrap_nodes.master[0].address }}"
|
||||
{% else %}
|
||||
kube_api_addr: "{{ bootstrap_kube_api_addr }}"
|
||||
{% endif %}
|
||||
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 %}
|
||||
timezone: "<< bootstrap_timezone >>"
|
||||
github_username: "<< bootstrap_github_username >>"
|
||||
coredns_addr: "<< bootstrap_service_cidr.split(',')[0] | nthhost(10) >>"
|
||||
<% if bootstrap_nodes.master | length == 1 and not bootstrap_kube_api_addr %>
|
||||
kube_api_addr: "<< bootstrap_nodes.master[0].address >>"
|
||||
<% else %>
|
||||
kube_api_addr: "<< bootstrap_kube_api_addr >>"
|
||||
<% endif %>
|
||||
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 %>
|
||||
@@ -1,17 +1,17 @@
|
||||
{% if bootstrap_distribution == 'k3s' %}
|
||||
<% if bootstrap_distribution == 'k3s' %>
|
||||
---
|
||||
# https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/
|
||||
# https://github.com/PyratLabs/ansible-role-k3s
|
||||
|
||||
k3s_control_node: true
|
||||
k3s_server:
|
||||
{% if bootstrap_ipv6_enabled | default(false) %}
|
||||
node-ip: "{% raw %}{{ ansible_host }},{{ ansible_default_ipv6.address }}{% endraw %}"
|
||||
{% else %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"
|
||||
{% endif %}
|
||||
<% if bootstrap_ipv6_enabled | default(false) %>
|
||||
node-ip: "{{ ansible_host }},{{ ansible_default_ipv6.address }}"
|
||||
<% else %>
|
||||
node-ip: "{{ ansible_host }}"
|
||||
<% endif %>
|
||||
tls-san:
|
||||
- "{% raw %}{{ kube_api_addr }}{% endraw %}"
|
||||
- "{{ kube_api_addr }}"
|
||||
docker: false
|
||||
flannel-backend: "none" # This needs to be in quotes
|
||||
disable:
|
||||
@@ -27,13 +27,13 @@ k3s_server:
|
||||
write-kubeconfig-mode: "644"
|
||||
pause-image: registry.k8s.io/pause:3.9
|
||||
secrets-encryption: true
|
||||
{% if bootstrap_ipv6_enabled | default(false) %}
|
||||
cluster-cidr: "{% raw %}{{ cluster_cidr }},{{ cluster_cidr_v6 }}{% endraw %}"
|
||||
service-cidr: "{% raw %}{{ service_cidr }},{{ service_cidr_v6 }}{% endraw %}"
|
||||
{% else %}
|
||||
cluster-cidr: "{% raw %}{{ cluster_cidr }}{% endraw %}"
|
||||
service-cidr: "{% raw %}{{ service_cidr }}{% endraw %}"
|
||||
{% endif %}
|
||||
<% if bootstrap_ipv6_enabled | default(false) %>
|
||||
cluster-cidr: "{{ cluster_cidr }},{{ cluster_cidr_v6 }}"
|
||||
service-cidr: "{{ service_cidr }},{{ service_cidr_v6 }}"
|
||||
<% else %>
|
||||
cluster-cidr: "{{ cluster_cidr }}"
|
||||
service-cidr: "{{ service_cidr }}"
|
||||
<% endif %>
|
||||
etcd-expose-metrics: true # Required to monitor etcd with kube-prometheus-stack
|
||||
kube-controller-manager-arg:
|
||||
- "bind-address=0.0.0.0" # Required to monitor kube-controller-manager with kube-prometheus-stack
|
||||
@@ -45,4 +45,4 @@ k3s_server:
|
||||
kubelet-arg:
|
||||
- "image-gc-high-threshold=55"
|
||||
- "image-gc-low-threshold=50"
|
||||
{% endif %}
|
||||
<% endif %>
|
||||
@@ -1,18 +1,18 @@
|
||||
{% if bootstrap_distribution == 'k3s' %}
|
||||
<% if bootstrap_distribution == 'k3s' %>
|
||||
---
|
||||
# https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/
|
||||
# https://github.com/PyratLabs/ansible-role-k3s
|
||||
|
||||
k3s_control_node: false
|
||||
k3s_agent:
|
||||
{% if bootstrap_ipv6_enabled | default(false) %}
|
||||
node-ip: "{% raw %}{{ ansible_host }},{{ ansible_default_ipv6.address }}{% endraw %}"
|
||||
{% else %}
|
||||
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"
|
||||
{% endif %}
|
||||
<% if bootstrap_ipv6_enabled | default(false) %>
|
||||
node-ip: "{{ ansible_host }},{{ ansible_default_ipv6.address }}"
|
||||
<% else %>
|
||||
node-ip: "{{ ansible_host }}"
|
||||
<% endif %>
|
||||
pause-image: registry.k8s.io/pause:3.9
|
||||
# TODO: Move these options to a kubelet config file
|
||||
kubelet-arg:
|
||||
- "image-gc-high-threshold=55"
|
||||
- "image-gc-low-threshold=50"
|
||||
{% endif %}
|
||||
<% endif %>
|
||||
Reference in new issue
Block a user