Matthias Andreas Benkard | 04326c9 | 2021-08-18 20:14:48 +0200 | [diff] [blame^] | 1 | #! /bin/sh |
2 | set -e -o pipefail | ||||
3 | |||||
4 | pod=$(kubectl get pods -lname=samba -ojsonpath='{.items[].metadata.name}') | ||||
5 | |||||
6 | kubectl exec -c master -ti "$pod" -- pdbedit --configfile=/var/lib/samba/smb.conf "$@" | ||||
7 | kubectl cp "$pod":/var/lib/samba/private/smbpasswd smbpasswd | ||||
8 | kubectl create secret generic samba-smbpasswd --save-config --dry-run=client --from-file=smbpasswd=smbpasswd -oyaml | kubectl apply -f - |