feat: add option to control workload scheduled on control nodes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
46250cd5e5
commit
a75b4c8250
@ -23,6 +23,7 @@ k3s_server_nodes:
|
||||
k3s_server_flannel_backend_enabled: True
|
||||
k3s_server_network_policy_enabled: True
|
||||
k3s_server_cloud_controller_enabled: True
|
||||
k3s_server_workload_enabled: True
|
||||
k3s_server_feature_gates: []
|
||||
|
||||
k3s_server_manifests_templates: []
|
||||
|
@ -8,6 +8,7 @@
|
||||
k3s_server_flannel_backend_enabled: False
|
||||
k3s_server_network_policy_enabled: False
|
||||
k3s_server_cloud_controller_enabled: True
|
||||
k3s_server_workload_enabled: True
|
||||
k3s_server_manifests_templates:
|
||||
- "calico-installation.yaml.j2"
|
||||
k3s_server_manifests_urls:
|
||||
|
6
templates/_internal/node-taint.yaml.j2
Normal file
6
templates/_internal/node-taint.yaml.j2
Normal file
@ -0,0 +1,6 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{% if k3s_server | bool %}
|
||||
{% if not k3s_server_workload_enabled | bool %}
|
||||
- CriticalAddonsOnly=true:NoExecute
|
||||
{% endif %}
|
||||
{% endif %}
|
@ -2,9 +2,14 @@
|
||||
---
|
||||
{% 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 %}
|
||||
{% set __k3s_node_taint = lookup('template', '_internal/node-taint.yaml.j2') | from_yaml %}
|
||||
token: "{{ k3s_token }}"
|
||||
node-name: "{{ k3s_node_name }}"
|
||||
node-ip: "{{ k3s_node_ip }}"
|
||||
{% if __k3s_node_taint is iterable %}
|
||||
node-taint:
|
||||
{{ __k3s_node_taint | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
{% endif %}
|
||||
{% if __k3s_kubelet_arg is iterable %}
|
||||
kubelet-arg:
|
||||
{{ __k3s_kubelet_arg | to_nice_yaml(indent=2) | indent(2, False) }}
|
||||
|
Loading…
Reference in New Issue
Block a user