initial commit
This commit is contained in:
3
templates/k3s-master-service-env.j2
Normal file
3
templates/k3s-master-service-env.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
K3S_DATASTORE_ENDPOINT='{{ k3s_datastore_endpoint }}'
|
||||
K3S_KUBECONFIG_MODE='{{ k3s_kubeconfig_mode }}'
|
||||
K3S_TOKEN='{{ k3s_token }}'
|
||||
37
templates/k3s-master-service.j2
Normal file
37
templates/k3s-master-service.j2
Normal file
@@ -0,0 +1,37 @@
|
||||
[Unit]
|
||||
Description=Lightweight Kubernetes
|
||||
Documentation=https://k3s.io
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/etc/default/%N
|
||||
EnvironmentFile=-/etc/sysconfig/%N
|
||||
EnvironmentFile=-/etc/systemd/system/k3s.service.env
|
||||
KillMode=process
|
||||
Delegate=yes
|
||||
# Having non-zero Limit*s causes performance problems due to accounting overhead
|
||||
# in the kernel. We recommend using cgroups to do container-local accounting.
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=infinity
|
||||
LimitCORE=infinity
|
||||
TasksMax=infinity
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service'
|
||||
ExecStartPre=-/sbin/modprobe br_netfilter
|
||||
ExecStartPre=-/sbin/modprobe overlay
|
||||
ExecStart={{ k3s_binary_dir }}/{{ k3s_binary_name }} \
|
||||
server \
|
||||
'--node-external-ip' \
|
||||
'{{ ansible_host }}' \
|
||||
'--flannel-backend=wireguard-native' \
|
||||
'--cluster-cidr' \
|
||||
'{{ k3s_cluster_cidr }}' \
|
||||
'--service-cidr' \
|
||||
'{{ k3s_service_cidr }}' \
|
||||
Reference in New Issue
Block a user