Skip to content

Commit d0c59fd

Browse files
fix(deploy): run configure_maas_api_authpolicy after maas-api is ready
The helper existed but was never invoked, so kustomize + --external-oidc left maas-api-auth-policy without oidc-identities.jwt.issuerUrl and CI validation failed. Call it after the Tenant reconciler creates maas-api; skip in operator mode (external OIDC via ModelsAsService CR). Signed-off-by: Wen Liang <liangwen12year@gmail.com>
1 parent 91540d3 commit d0c59fd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

scripts/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,16 @@ main() {
616616
return 1
617617
fi
618618

619+
# External OIDC: merge-patch maas-api-auth-policy with Keycloak (or other IdP) JWT rules.
620+
# The Tenant reconciler creates the base AuthPolicy; this must run after it exists.
621+
# Operator mode uses ModelsAsService.spec.externalOIDC instead (see parse_arguments warning).
622+
if [[ "$EXTERNAL_OIDC" == "true" ]] && [[ "$DEPLOYMENT_MODE" == "kustomize" ]]; then
623+
if ! configure_maas_api_authpolicy; then
624+
log_error "configure_maas_api_authpolicy failed — set OIDC_ISSUER_URL / OIDC_CLIENT_ID (or overlay params) and retry"
625+
return 1
626+
fi
627+
fi
628+
619629
log_info ""
620630
log_info "MaaS API and MaaS Controller deployment completed successfully!"
621631
local deployed_api_image deployed_ctrl_image

0 commit comments

Comments
 (0)