Skip to content

Commit f46e69e

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

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
@@ -137,7 +137,6 @@ data:
137137
138138
info "Detected cluster domain: $CLUSTER_DOMAIN"
139139
140-
# Construct the new IDP URL based on the cluster domain and namespace
141140
NEW_IDP_URL="https://cp-console.${CSDB_NAMESPACE}.${CLUSTER_DOMAIN}/idprovider/v1/auth"
142141
143142
info "Updating IDP URLs to: $NEW_IDP_URL"
@@ -146,14 +145,20 @@ data:
146145
ACCOUNT_IAM_EXISTS=$(oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -c "\list" | grep "account_iam" || echo False)
147146
148147
if [[ $ACCOUNT_IAM_EXISTS != "False" ]]; then
149-
# Update the idp column in the idp_config table
150148
oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -d account_iam -c "
151149
UPDATE accountiam.idp_config
152150
SET idp = '$NEW_IDP_URL',
153151
modified_ts = NOW()
154152
WHERE idp LIKE '%/idprovider/v1/%';
155153
"
156154
155+
info "Verifying IDP configuration update..."
156+
oc -n $CSDB_NAMESPACE exec -t $CNPG_PRIMARY_POD -c postgres -- psql -U postgres -d account_iam -c "
157+
SELECT uid, realm, idp, modified_ts
158+
FROM accountiam.idp_config
159+
ORDER BY modified_ts DESC;
160+
"
161+
157162
success "IDP configuration updated successfully."
158163
else
159164
warning "account_iam database not found, skipping IDP configuration update."

0 commit comments

Comments
 (0)