mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 18:02:14 +02:00
Move flag to configmap (#1540)
* Move flag to configmap Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de> Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
co-authored by
Rafia Sabih
Felix Kunde
parent
330c2c4c0b
commit
fa604027cf
@@ -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