blob: 48660c288e828e2eb471780632c42d7004e6c810 [file] [log] [blame]
#! /bin/sh
set -e -o pipefail
pod=$(kubectl get pods -lname=samba -ojsonpath='{.items[].metadata.name}')
kubectl exec -c master -ti "$pod" -- pdbedit --configfile=/var/lib/samba/smb.conf "$@"
kubectl cp "$pod":/var/lib/samba/private/smbpasswd smbpasswd
kubectl create secret generic samba-smbpasswd --save-config --dry-run=client --from-file=smbpasswd=smbpasswd -oyaml | kubectl apply -f -