This commit is contained in:
parent
18c9c75569
commit
ecc2c41afe
4 changed files with 45 additions and 18 deletions
|
|
@ -7,13 +7,9 @@ After=network-online.target
|
|||
Type=notify
|
||||
EnvironmentFile=/etc/systemd/system/k3s.service.env
|
||||
{% if kubernetes_master|bool %}
|
||||
{% if vars['KubernetesMasterConfigured_' ~ kubernetes_cluster_name] is not defined %}
|
||||
ExecStart=/usr/local/bin/k3s server --flannel-backend=wireguard --disable traefik --secrets-encryption --cluster-init --selinux
|
||||
ExecStart=/usr/local/bin/k3s server
|
||||
{% else %}
|
||||
ExecStart=/usr/local/bin/k3s server --flannel-backend=wireguard --disable traefik --secrets-encryption --server https://{{ kubernetes_master }}:6443 --token ${NODE_TOKEN} --selinux
|
||||
{% endif %}
|
||||
{% else %}
|
||||
ExecStart=/usr/local/bin/k3s agent --server https://{{ kubernetes_master }}:6443 --token ${NODE_TOKEN} --selinux
|
||||
ExecStart=/usr/local/bin/k3s agent
|
||||
{% endif %}
|
||||
KillMode=process
|
||||
Delegate=yes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue