Skip to content

Commit

Permalink
Remove duplicate OpenShift enabled field on Helm config
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman authored and missylbytes committed Aug 7, 2023
1 parent 3d5e980 commit b176b78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions control-plane/api-gateway/common/helm_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type HelmConfig struct {
ConsulDestinationNamespace string
NamespaceMirroringPrefix string
EnableNamespaces bool
EnableOpenShift bool
EnableNamespaceMirroring bool
AuthMethod string
// LogLevel is the logging level of the deployed Consul Dataplanes.
Expand All @@ -32,9 +31,9 @@ type HelmConfig struct {
ConsulCACert string
ConsulConfig ConsulConfig

// OpenShiftEnabled indicates whether we're deploying into an OpenShift environment
// EnableOpenShift indicates whether we're deploying into an OpenShift environment
// and should create SecurityContextConstraints.
OpenShiftEnabled bool
EnableOpenShift bool

// ReleaseName indicates the name of the release for the Helm installation. This value is used
// as a prefix for some resources - SecurityContextConstraints, for example - so it must be known.
Expand Down
2 changes: 1 addition & 1 deletion control-plane/api-gateway/gatekeeper/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (g *Gatekeeper) role(gateway gwv1beta1.Gateway, gcc v1alpha1.GatewayClassCo
})
}

if config.OpenShiftEnabled {
if config.EnableOpenShift {
role.Rules = append(role.Rules, rbac.PolicyRule{
APIGroups: []string{"security.openshift.io"},
Resources: []string{"securitycontextconstraints"},
Expand Down
1 change: 0 additions & 1 deletion control-plane/subcommand/inject-connect/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ func (c *Command) Run(args []string) int {
ConsulTLSServerName: c.consul.TLSServerName,
ConsulPartition: c.consul.Partition,
ConsulCACert: string(caCertPem),
OpenShiftEnabled: c.flagEnableOpenShift,
ReleaseName: c.flagReleaseName,
},
AllowK8sNamespacesSet: allowK8sNamespaces,
Expand Down

0 comments on commit b176b78

Please sign in to comment.