Skip to content

Commit be3cab9

Browse files
committed
update modify idp function to verification step
Signed-off-by: YuChen <[email protected]>
1 parent 5b1b4bc commit be3cab9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

velero/schedule/common-service-db/cs-db-br-script-cm-4.6.10.4.11.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ data:
131131
132132
info "Detected cluster domain: $CLUSTER_DOMAIN"
133133
134-
# Construct the new IDP URL based on the cluster domain and namespace
135134
NEW_IDP_URL="https://cp-console.${CSDB_NAMESPACE}.${CLUSTER_DOMAIN}/idprovider/v1/auth"
136135
137136
info "Updating IDP URLs to: $NEW_IDP_URL"
@@ -140,14 +139,20 @@ data:
140139
ACCOUNT_IAM_EXISTS=$(oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -c "\list" | grep "account_iam" || echo False)
141140
142141
if [[ $ACCOUNT_IAM_EXISTS != "False" ]]; then
143-
# Update the idp column in the idp_config table
144142
oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -d account_iam -c "
145143
UPDATE accountiam.idp_config
146144
SET idp = '$NEW_IDP_URL',
147145
modified_ts = NOW()
148146
WHERE idp LIKE '%/idprovider/v1/%';
149147
"
150148
149+
info "Verifying IDP configuration update..."
150+
oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -d account_iam -c "
151+
SELECT uid, realm, idp, modified_ts
152+
FROM accountiam.idp_config
153+
ORDER BY modified_ts DESC;
154+
"
155+
151156
success "IDP configuration updated successfully."
152157
else
153158
warning "account_iam database not found, skipping IDP configuration update."

0 commit comments

Comments
 (0)