Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Unit]
- Description=Kubic Initialization Container
- After=crio.service docker.service
- # Check if the kubic-init.yaml configuration file exists
- # if it doesn't, just skip this service...
- ConditionPathExists=/etc/kubic/kubic-init.yaml
- [Service]
- TimeoutStartSec=0
- RestartSec=30
- Restart=always
- SyslogIdentifier=kubic-init
- # TODO: see https://www.freedesktop.org/software/systemd/man/systemd.unit.html#OnFailure=
- # OnFailure=kubic-init-reset.service
- # Define configuration files and don't start if they don't exist
- Environment="KUBECONFIG=/etc/kubernetes/admin.conf"
- Environment="KUBIC_INIT_CFG=/etc/kubic/kubic-init.yaml"
- EnvironmentFile=-/etc/sysconfig/kubic-init
- ExecStartPre=-/bin/sh -c '/usr/bin/podman stop kubic-init >/dev/null 2>&1'
- ExecStartPre=-/bin/sh -c '/usr/bin/podman rm kubic-init >/dev/null 2>&1'
- ExecStart=/bin/sh -c '${KUBIC_INIT_RUNNER} run --rm --privileged=true --net=host --security-opt seccomp:unconfined --cap-add=SYS_ADMIN --name=kubic-init -v /etc/kubic:/etc/kubic -v /etc/kubernetes:/etc/kubernetes -v /usr/bin/kubelet:/usr/bin/kubelet:ro -v /var/lib/kubelet:/var/lib/kubelet -v /etc/cni/net.d:/etc/cni/net.d -v /var/lib/etcd:/var/lib/etcd -v /var/run/dbus:/var/run/dbus -v /usr/lib/systemd:/usr/lib/systemd:ro -v /run/systemd:/run/systemd:ro -v /var/run/crio:/var/run/crio -v /sys/fs/cgroup:/sys/fs/cgroup -v /lib/modules:/lib/modules:ro localhost/kubic-project/kubic-init:latest kubic-init bootstrap --v 3 --config=/etc/kubic/kubic-init.yaml'
- [Install]
- WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement