From 8066e3dbbd6d36fe77c01015bee348023afa8459 Mon Sep 17 00:00:00 2001 From: Aiden Keating Date: Tue, 28 Jan 2020 13:04:45 +0000 Subject: [PATCH] remove redhat- prefix from restricted namespaces --- pkg/providers/openshift/config.go | 1 - pkg/providers/openshift/provider_postgres.go | 2 +- pkg/providers/openshift/provider_redis.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/providers/openshift/config.go b/pkg/providers/openshift/config.go index f83c3f825..ae9652260 100644 --- a/pkg/providers/openshift/config.go +++ b/pkg/providers/openshift/config.go @@ -24,7 +24,6 @@ const ( defaultReconcileTime = time.Second * 30 NamespacePrefixOpenShift = "openshift-" - NamespacePrefixRedHat = "redhat-" ) //get default namespace diff --git a/pkg/providers/openshift/provider_postgres.go b/pkg/providers/openshift/provider_postgres.go index fb70cdb33..f5c59acf2 100644 --- a/pkg/providers/openshift/provider_postgres.go +++ b/pkg/providers/openshift/provider_postgres.go @@ -430,7 +430,7 @@ func buildDefaultPostgresDeployment(ps *v1alpha1.Postgres) *appsv1.Deployment { }, } // required for restricted namespace - if strings.HasPrefix(ps.Namespace, NamespacePrefixOpenShift) || strings.HasPrefix(ps.Namespace, NamespacePrefixRedHat) { + if strings.HasPrefix(ps.Namespace, NamespacePrefixOpenShift) { userGroupId := int64(26) depl.Spec.Template.Spec.SecurityContext = &v1.PodSecurityContext{ FSGroup: &userGroupId, diff --git a/pkg/providers/openshift/provider_redis.go b/pkg/providers/openshift/provider_redis.go index fe749b630..68dc69b9e 100644 --- a/pkg/providers/openshift/provider_redis.go +++ b/pkg/providers/openshift/provider_redis.go @@ -337,7 +337,7 @@ func buildDefaultRedisDeployment(r *v1alpha1.Redis) *appsv1.Deployment { }, } // required for restricted namespace - if strings.HasPrefix(r.Namespace, NamespacePrefixOpenShift) || strings.HasPrefix(r.Namespace, NamespacePrefixRedHat) { + if strings.HasPrefix(r.Namespace, NamespacePrefixOpenShift) { userGroupId := int64(1001) depl.Spec.Template.Spec.SecurityContext = &v1.PodSecurityContext{ FSGroup: &userGroupId,