diff options
Diffstat (limited to 'service/opts.sh')
-rw-r--r-- | service/opts.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/service/opts.sh b/service/opts.sh new file mode 100644 index 0000000..3628708 --- /dev/null +++ b/service/opts.sh @@ -0,0 +1,22 @@ +host=$1 + +function oc { + cfg="../security/$host.kubeconfig" + /usr/bin/oc --config "$cfg" "$@" +} + +function node { + ip=$1 + shift + + ssh -xq root@192.168.26.$ip "$@" +} + +function get_gluster_pod { + oc -n glusterfs get pods -l 'glusterfs=storage-pod' | grep Running | awk '{ print $1 }' | head -n 1 +} + +function heketi { + node 1 heketi-cli -s http://heketi-storage.glusterfs.svc.cluster.local:8080 --user admin --secret "$(oc get secret heketi-storage-admin-secret -n glusterfs -o jsonpath='{.data.key}' | base64 -d)" "$@" +} + |