kubespray/roles/etcdctl_etcdutl/templates/etcdctl.sh.j2

15 lines
495 B
Django/Jinja

#!/bin/bash
# {{ ansible_managed }}
# example invocation: etcdctl.sh get --keys-only --from-key ""
etcdctl \
{% if etcd_deployment_type == "kubeadm" %}
--cacert {{ kube_cert_dir }}/etcd/ca.crt \
--cert {{ kube_cert_dir }}/etcd/server.crt \
--key {{ kube_cert_dir }}/etcd/server.key "$@"
{% else %}
--cacert {{ etcd_cert_dir }}/ca.pem \
--cert {{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem \
--key {{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem "$@"
{% endif %}