mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 23:41:31 +02:00
fix nil map assignment
This commit is contained in:
@@ -274,6 +274,9 @@ func (c *Cluster) getTeamMembers(teamID string) ([]string, error) {
|
||||
// Returns annotations to be passed to child objects
|
||||
func (c *Cluster) annotationsSet(annotations map[string]string) map[string]string {
|
||||
|
||||
if annotations == nil {
|
||||
annotations = make(map[string]string)
|
||||
}
|
||||
// allow to inherit certain labels from the 'postgres' object
|
||||
if spec, err := c.GetSpec(); err == nil {
|
||||
for k, v := range spec.ObjectMeta.Annotations {
|
||||
|
||||
Reference in New Issue
Block a user