[WIP] Grant 'superuser' to the members of Postgres admin teams (#371)

Added support for superuser team in addition to the admin team that owns the postgres cluster.
This commit is contained in:
zerg-junior
2018-08-30 10:51:37 +02:00
committed by Jan Mussler
parent 1e53e22773
commit 25fa45fd58
10 changed files with 211 additions and 13 deletions
@@ -3,9 +3,10 @@ package v1
import (
"github.com/zalando-incubator/postgres-operator/pkg/util/config"
"time"
"github.com/zalando-incubator/postgres-operator/pkg/spec"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"time"
)
// +genclient
@@ -99,6 +100,7 @@ type TeamsAPIConfiguration struct {
PamRoleName string `json:"pam_role_name,omitempty"`
PamConfiguration string `json:"pam_configuration,omitempty"`
ProtectedRoles []string `json:"protected_role_names,omitempty"`
PostgresSuperuserTeams []string `json:"postgres_superuser_teams,omitempty"`
}
type LoggingRESTAPIConfiguration struct {
@@ -631,6 +631,11 @@ func (in *TeamsAPIConfiguration) DeepCopyInto(out *TeamsAPIConfiguration) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.PostgresSuperuserTeams != nil {
in, out := &in.PostgresSuperuserTeams, &out.PostgresSuperuserTeams
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}