xoxys.k3s/templates/etc/rancher/k3s/config.yaml.j2
Robert Kaussow 1c20e20dec
All checks were successful
continuous-integration/drone/push Build is passing
feat: add option to control the k3s cloud controller
2022-11-16 20:51:03 +01:00

36 lines
1.1 KiB
Django/Jinja

#jinja2: lstrip_blocks: True
---
{% set __k3s_kube_apiserver_arg = lookup('template', '_internal/apiserver-arg.yaml.j2') | from_yaml %}
{% set __k3s_kubelet_arg = lookup('template', '_internal/kubelet-arg.yaml.j2') | from_yaml %}
token: "{{ k3s_token }}"
node-ip: "{{ k3s_node_ip }}"
{% if __k3s_kubelet_arg is iterable %}
kubelet-arg:
{{ __k3s_kubelet_arg | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}
selinux: {{ k3s_selinux_enabled | bool | lower }}
{% if k3s_server | bool %}
bind-address: "{{ k3s_server_bind_ip }}"
secrets-encryption: True
write-kubeconfig: "{{ __k3s_config_dir }}/k3s.yaml"
write-kubeconfig-mode: "0600"
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_cloud_controller_enabled | bool %}
disable-cloud-controller: true
{% endif %}
{% if not k3s_server_network_policy_enabled | bool %}
disable-network-policy: True
{% endif %}
{% else %}
server: "https://{{ __k3s_server_ip }}:6443"
{% endif %}