mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 16:11:52 +02:00
Move flag to configmap
This commit is contained in:
@@ -1163,8 +1163,7 @@ func (c *Cluster) initRobotUsers() error {
|
||||
namespace := c.Namespace
|
||||
|
||||
//if namespaced secrets are allowed
|
||||
if c.Postgresql.Spec.EnableNamespacedSecret != nil &&
|
||||
*c.Postgresql.Spec.EnableNamespacedSecret {
|
||||
if c.Config.OpConfig.EnableCrossNamespaceSecret {
|
||||
if strings.Contains(username, ".") {
|
||||
splits := strings.Split(username, ".")
|
||||
namespace = splits[0]
|
||||
|
||||
@@ -1024,7 +1024,6 @@ func TestCrossNamespacedSecrets(t *testing.T) {
|
||||
Volume: acidv1.Volume{
|
||||
Size: "1Gi",
|
||||
},
|
||||
EnableNamespacedSecret: boolToPointer(true),
|
||||
Users: map[string]acidv1.UserFlags{
|
||||
"appspace.db_user": {},
|
||||
"db_user": {},
|
||||
@@ -1052,6 +1051,7 @@ func TestCrossNamespacedSecrets(t *testing.T) {
|
||||
DefaultMemoryLimit: "300Mi",
|
||||
PodRoleLabel: "spilo-role",
|
||||
},
|
||||
EnableCrossNamespaceSecret: true,
|
||||
},
|
||||
}, client, pg, logger, eventRecorder)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user