Browse Source

Change systemd unit file target to network-online.target

pull/416/head
galal-hussein 6 years ago
parent
commit
c30c809642
  1. 2
      README.md
  2. 2
      contrib/ansible/roles/k3s/master/templates/k3s.service.j2
  3. 2
      contrib/ansible/roles/k3s/node/templates/k3s.service.j2
  4. 2
      install.sh
  5. 2
      k3s.service

2
README.md

@ -287,7 +287,7 @@ in the root of this repo `k3s.service` which is as follows
[Unit] [Unit]
Description=Lightweight Kubernetes Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network.target After=network-online.target
[Service] [Service]
Type=notify Type=notify

2
contrib/ansible/roles/k3s/master/templates/k3s.service.j2

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=Lightweight Kubernetes Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network.target After=network-online.target
[Service] [Service]
ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay ExecStartPre=-/sbin/modprobe overlay

2
contrib/ansible/roles/k3s/node/templates/k3s.service.j2

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=Lightweight Kubernetes Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network.target After=network-online.target
[Service] [Service]
ExecStart=/usr/local/bin/k3s agent --server https://{{ master_ip }}:6443 --token {{ hostvars[groups['master'][0]]['token'] }} ExecStart=/usr/local/bin/k3s agent --server https://{{ master_ip }}:6443 --token {{ hostvars[groups['master'][0]]['token'] }}
KillMode=process KillMode=process

2
install.sh

@ -420,7 +420,7 @@ create_systemd_service_file() {
[Unit] [Unit]
Description=Lightweight Kubernetes Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network.target After=network-online.target
[Service] [Service]
Type=${SYSTEMD_TYPE} Type=${SYSTEMD_TYPE}

2
k3s.service

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=Lightweight Kubernetes Description=Lightweight Kubernetes
Documentation=https://k3s.io Documentation=https://k3s.io
After=network.target After=network-online.target
[Service] [Service]
Type=notify Type=notify

Loading…
Cancel
Save