Skip to content

Commit

Permalink
Update the secret to reflect admin password
Browse files Browse the repository at this point in the history
  • Loading branch information
mdujava committed Sep 25, 2024
1 parent 002b770 commit e78c998
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/rhbk/deploy-rhsso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function deployRHBK {
PASSWD=$(oc get secret rhbk-initial-admin -o jsonpath='{.data.password}' -n "${NAMESPACE}" | base64 --decode)

oc rsh -n "${NAMESPACE}" statefulsets/rhbk bash -c "/opt/keycloak/bin/kcadm.sh update realms/master -s sslRequired=NONE --server http://localhost:8080/ --realm master --user admin --password ${PASSWD} --no-config; /opt/keycloak/bin/kcadm.sh set-password --server http://localhost:8080/ --realm master --user admin --password ${PASSWD} --username admin --new-password ${ADMIN_PASSWORD} --no-config"
oc patch -n "${NAMESPACE}" secret/rhbk-initial-admin --type json -p '[{"op": "replace", "path": "/data/password", "value":"'$(echo -en "$ADMIN_PASSWORD" | base64 -w0)'"}]'

}

Expand Down

0 comments on commit e78c998

Please sign in to comment.