Robert Kaussow
3e5e2cd6ce
Some checks reported errors
continuous-integration/drone/push Build was killed
37 lines
1.2 KiB
Django/Jinja
37 lines
1.2 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-name: "{{ k3s_node_name }}"
|
|
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 %}
|