mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 17:12:56 +02:00
copy rolconfig during password rotation (#2183)
* copy rolconfig during password rotation Co-authored-by: idanovinda <idanovinda@gmail.com>
This commit is contained in:
co-authored by
idanovinda
parent
63c9f916a6
commit
4741b3f734
@@ -284,7 +284,7 @@ func (c *Cluster) cleanupRotatedUsers(rotatedUsers []string, db *sql.DB) error {
|
||||
retentionDate := time.Now().AddDate(0, 0, int(retenionDays)*-1)
|
||||
|
||||
for rotatedUser, dateSuffix := range extraUsers {
|
||||
userCreationDate, err := time.Parse("060102", dateSuffix)
|
||||
userCreationDate, err := time.Parse(constants.RotationUserDateFormat, dateSuffix)
|
||||
if err != nil {
|
||||
c.logger.Errorf("could not parse creation date suffix of user %q: %v", rotatedUser, err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user