skip db user actions when its secret failed to sync on update (#2969)

* skip db user actions when its secret failed to sync on update
* need to add new pgUser field to e2e test
* lets collect errors of syncSecret so we still get status updateFailed
This commit is contained in:
Felix Kunde
2025-11-05 16:28:37 +01:00
committed by GitHub
parent 1af4c50ed0
commit 2c57498e43
5 changed files with 69 additions and 20 deletions
+4
View File
@@ -48,6 +48,10 @@ func (strategy DefaultUserSyncStrategy) ProduceSyncRequests(dbUsers spec.PgUserM
if newUser.Deleted {
continue
}
// when the secret of the user could not be created or updated skip any database actions
if newUser.Degraded {
continue
}
dbUser, exists := dbUsers[name]
if !exists {
reqs = append(reqs, spec.PgSyncUserRequest{Kind: spec.PGSyncUserAdd, User: newUser})