gitea: tolerate oidc init failures
This commit is contained in:
parent
ab50780f49
commit
6ba509dbe1
@ -78,7 +78,7 @@ spec:
|
||||
|
||||
if [ -n "$id" ]; then
|
||||
echo "Updating existing auth source id=$id"
|
||||
$BIN -c "$APPINI" admin auth update-oauth \
|
||||
if ! $BIN -c "$APPINI" admin auth update-oauth \
|
||||
--id "$id" \
|
||||
--name keycloak \
|
||||
--provider openidConnect \
|
||||
@ -90,10 +90,12 @@ spec:
|
||||
--required-claim-value "" \
|
||||
--group-claim-name groups \
|
||||
--admin-group admin \
|
||||
--skip-local-2fa
|
||||
--skip-local-2fa; then
|
||||
echo "OIDC update failed; continuing without blocking startup" >&2
|
||||
fi
|
||||
else
|
||||
echo "Creating keycloak auth source"
|
||||
$BIN -c "$APPINI" admin auth add-oauth \
|
||||
if ! $BIN -c "$APPINI" admin auth add-oauth \
|
||||
--name keycloak \
|
||||
--provider openidConnect \
|
||||
--key "$CLIENT_ID" \
|
||||
@ -104,7 +106,9 @@ spec:
|
||||
--required-claim-value "" \
|
||||
--group-claim-name groups \
|
||||
--admin-group admin \
|
||||
--skip-local-2fa
|
||||
--skip-local-2fa; then
|
||||
echo "OIDC create failed; continuing without blocking startup" >&2
|
||||
fi
|
||||
fi
|
||||
volumeMounts:
|
||||
- name: gitea-data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user