Fix delete-node.service kubectl service exec's
* Fix delete-node service that runs on worker (cloud-only) shutdown to delete a Kubernetes node. Regressed in #669 (unreleased) * Use rkt `--exec` to invoke kubectl binary in the kubelet image * Use podman `--entrypoint` to invoke the kubectl binary in the kubelet image
This commit is contained in:
parent
a1a5da6bc2
commit
fc686c8fc7
|
@ -130,8 +130,7 @@ storage:
|
|||
docker://quay.io/poseidon/kubelet:v1.18.0 \
|
||||
--net=host \
|
||||
--dns=host \
|
||||
-- \
|
||||
/usr/local/bin/kubectl --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
--exec=/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
passwd:
|
||||
users:
|
||||
- name: core
|
||||
|
|
|
@ -128,8 +128,7 @@ storage:
|
|||
docker://quay.io/poseidon/kubelet:v1.18.0 \
|
||||
--net=host \
|
||||
--dns=host \
|
||||
-- \
|
||||
/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname | tr '[:upper:]' '[:lower:]')
|
||||
--exec=/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname | tr '[:upper:]' '[:lower:]')
|
||||
passwd:
|
||||
users:
|
||||
- name: core
|
||||
|
|
|
@ -134,5 +134,4 @@ storage:
|
|||
docker://quay.io/poseidon/kubelet:v1.18.0 \
|
||||
--net=host \
|
||||
--dns=host \
|
||||
-- \
|
||||
/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
--exec=/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
|
|
|
@ -128,8 +128,7 @@ storage:
|
|||
docker://quay.io/poseidon/kubelet:v1.18.0 \
|
||||
--net=host \
|
||||
--dns=host \
|
||||
-- \
|
||||
/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
--exec=/usr/local/bin/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||
passwd:
|
||||
users:
|
||||
- name: core
|
||||
|
|
|
@ -87,7 +87,7 @@ systemd:
|
|||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStart=/bin/true
|
||||
ExecStop=/bin/bash -c '/usr/bin/podman run --volume /etc/kubernetes:/etc/kubernetes:ro,z --entrypoint /usr/local/bin/kubectl quay.io/poseidon/kubelet:v1.18.0 kubectl --kubeconfig=/etc/kubernetes/kubeconfig delete node $HOSTNAME'
|
||||
ExecStop=/bin/bash -c '/usr/bin/podman run --volume /etc/kubernetes:/etc/kubernetes:ro,z --entrypoint /usr/local/bin/kubectl quay.io/poseidon/kubelet:v1.18.0 --kubeconfig=/etc/kubernetes/kubeconfig delete node $HOSTNAME'
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
storage:
|
||||
|
|
Loading…
Reference in New Issue