2022-10-03 20:58:05 +00:00
|
|
|
#jinja2: lstrip_blocks: True
|
|
|
|
---
|
|
|
|
{% set __k3s_kube_apiserver_arg = lookup('template', '_internal/apiserver-arg.yaml.j2') | from_yaml %}
|
2022-11-12 15:20:08 +00:00
|
|
|
{% set __k3s_kubelet_arg = lookup('template', '_internal/kubelet-arg.yaml.j2') | from_yaml %}
|
2022-10-03 20:58:05 +00:00
|
|
|
token: "{{ k3s_token }}"
|
|
|
|
node-ip: "{{ k3s_node_ip }}"
|
2022-11-12 15:20:08 +00:00
|
|
|
{% if __k3s_kubelet_arg is iterable %}
|
|
|
|
kubelet-arg:
|
|
|
|
{{ __k3s_kubelet_arg | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
{% endif %}
|
2022-11-14 08:47:14 +00:00
|
|
|
selinux: {{ k3s_selinux_enabled | bool | lower }}
|
2022-10-03 20:58:05 +00:00
|
|
|
|
|
|
|
{% if k3s_server | bool %}
|
|
|
|
bind-address: "{{ k3s_server_bind_ip }}"
|
|
|
|
secrets-encryption: True
|
2022-10-05 20:54:36 +00:00
|
|
|
write-kubeconfig: "{{ __k3s_config_dir }}/k3s.yaml"
|
|
|
|
write-kubeconfig-mode: "0600"
|
2022-10-03 20:58:05 +00:00
|
|
|
disable:
|
|
|
|
- traefik
|
|
|
|
{% if __k3s_kube_apiserver_arg is iterable %}
|
|
|
|
kube-apiserver-arg:
|
2022-11-12 15:20:08 +00:00
|
|
|
{{ __k3s_kube_apiserver_arg | to_nice_yaml(indent=2) | indent(2, False) }}
|
2022-10-03 20:58:05 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if not k3s_server_flannel_backend_enabled | bool %}
|
|
|
|
flannel-backend: "none"
|
|
|
|
{% endif %}
|
2022-11-16 19:51:03 +00:00
|
|
|
{% if not k3s_server_cloud_controller_enabled | bool %}
|
|
|
|
disable-cloud-controller: true
|
|
|
|
{% endif %}
|
2022-10-03 20:58:05 +00:00
|
|
|
{% if not k3s_server_network_policy_enabled | bool %}
|
|
|
|
disable-network-policy: True
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
server: "https://{{ __k3s_server_ip }}:6443"
|
|
|
|
{% endif %}
|