code/etcd-inmemory/files/opt/wamblee/etcd/bin/etcdctl

26 lines
570 B
Plaintext
Raw Permalink Normal View History

2023-02-26 12:36:15 +00:00
#!/bin/bash
PATH=/opt/wamblee/etcd/bin:$PATH
. /var/lib/wamblee/etcd/etcdimage
if [[ -z "$IMAGE" ]]
then
echo "ETCD image cannot be determined" 1>&2
exit 1
fi
echo "ETCD image: $IMAGE"
docker run --rm \
--network host \
-v /etc/kubernetes/pki/etcd:/etc/kubernetes/pki/etcd \
-v /var/lib/wamblee/etcd:/var/lib/wamblee/etcd \
$IMAGE \
etcdctl \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt \
--key=/etc/kubernetes/pki/etcd/healthcheck-client.key "$@"