mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 15:39:10 +02:00
Warn on infrastructure-roles.yaml format violations (#177)
Emit a warning if there are unprocessed entries in the infrastructure-roles secret.
This commit is contained in:
committed by
Oleksii Kliukin
parent
5d5fa680a3
commit
3c178f68df
@@ -137,6 +137,8 @@ Users:
|
||||
c.logger.Warningf("unknown key %q", p)
|
||||
}
|
||||
}
|
||||
|
||||
delete(data, key)
|
||||
}
|
||||
|
||||
if t.Name != "" {
|
||||
@@ -144,6 +146,12 @@ Users:
|
||||
}
|
||||
}
|
||||
|
||||
if len(data) != 0 {
|
||||
c.logger.Warningf("%d unprocessed entries in the infrastructure roles' secret", len(data))
|
||||
c.logger.Info(`infrastructure role entries should be in the {key}{id} format, where {key} can be either of "user", "password", "inrole" and the {id} a monotonically increasing integer starting with 1`)
|
||||
c.logger.Debugf("unprocessed entries: %#v", data)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user