Skip to content

Commit

Permalink
fix namespace prefix error
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranRoche committed Jan 31, 2020
1 parent a0d5476 commit e77e676
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/providers/openshift/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const (
defaultReconcileTime = time.Second * 30

NamespacePrefixOpenShift = "openshift-"
NamespacePrefixRedHat = "redhat-"
)

//get default namespace
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/openshift/provider_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/openshift/provider_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,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,
Expand Down

0 comments on commit e77e676

Please sign in to comment.