xoxys.k3s/templates/etc/rancher/k3s/config.yaml.j2
2022-10-03 22:58:05 +02:00

26 lines
746 B
Django/Jinja

#jinja2: lstrip_blocks: True
---
{% set __k3s_kube_apiserver_arg = lookup('template', '_internal/apiserver-arg.yaml.j2') | from_yaml %}
data-dir: "{{ k3s_data_dir }}"
token: "{{ k3s_token }}"
node-ip: "{{ k3s_node_ip }}"
{% if k3s_server | bool %}
bind-address: "{{ k3s_server_bind_ip }}"
secrets-encryption: True
disable:
- traefik
{% if __k3s_kube_apiserver_arg is iterable %}
kube-apiserver-arg:
{{ __k3s_kube_apiserver_arg | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}
{% if not k3s_server_flannel_backend_enabled | bool %}
flannel-backend: "none"
{% endif %}
{% if not k3s_server_network_policy_enabled | bool %}
disable-network-policy: True
{% endif %}
{% else %}
server: "https://{{ __k3s_server_ip }}:6443"
{% endif %}