commit 9e17abd561860bf6aa48aa5da414f795923e283f parent 9e01d0b32b5c8786a37552f29d613192b7cfc777 Author: Vincent Demeester <vincent@sbr.pm> Date: Tue, 8 Sep 2020 17:41:34 +0100 chos4: fix secrets and oauth configuration Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | pkgs/scripts/bin/chos4 | | | 13 | ++++++++++--- |
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/pkgs/scripts/bin/chos4 b/pkgs/scripts/bin/chos4 @@ -24,10 +24,17 @@ done echo ">>> setup identity providers" if test -f $HOME/sync/work/chos4/users.htpasswd; then + oc get -n openshift-config secret htpass-secret && \ + oc delete -n openshift-config secret htpass-secret oc create secret generic htpass-secret --from-file=htpasswd=$HOME/sync/work/chos4/users.htpasswd -n openshift-config - for cr in $HOME/sync/chos4/oauth.*.yaml; do - oc apply -f $cr - done +fi +if test -f $HOME/sync/work/chos4/github.clientsecret; then + oc get -n openshift-config secret github-secret && \ + oc delete -n openshift-config secret github-secret + oc create secret generic github-secret --from-file=$HOME/sync/work/chos4/github.clientsecret -n openshift-config +fi +if test -f $HOME/sync/work/chos4/oauth.yaml; then + oc apply -f $HOME/sync/work/chos4/oauth.yaml fi if [[ "$1" == "install" ]]; then