Skip to content

Commit

Permalink
Remove unused configuration fields and arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Aug 7, 2023
1 parent c3bcb63 commit 6df3cca
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions control-plane/api-gateway/common/helm_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ type HelmConfig struct {
// EnableOpenShift indicates whether we're deploying into an OpenShift environment
// and should create SecurityContextConstraints.
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.
ReleaseName string
}

type ConsulConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (r *GatewayController) deleteGatekeeperResources(ctx context.Context, log l
err := gk.Delete(ctx, types.NamespacedName{
Namespace: gw.Namespace,
Name: gw.Name,
}, r.HelmConfig)
})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion control-plane/api-gateway/gatekeeper/gatekeeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (g *Gatekeeper) Upsert(ctx context.Context, gateway gwv1beta1.Gateway, gcc

// Delete removes the resources for handling routing of network traffic.
// This is done in the reverse order of Upsert due to dependencies between resources.
func (g *Gatekeeper) Delete(ctx context.Context, gatewayName types.NamespacedName, config common.HelmConfig) error {
func (g *Gatekeeper) Delete(ctx context.Context, gatewayName types.NamespacedName) error {
g.Log.V(1).Info(fmt.Sprintf("Delete Gateway Deployment %s/%s", gatewayName.Namespace, gatewayName.Name))

if err := g.deleteDeployment(ctx, gatewayName); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion control-plane/api-gateway/gatekeeper/gatekeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ func TestDelete(t *testing.T) {
err := gatekeeper.Delete(context.Background(), types.NamespacedName{
Namespace: tc.gateway.Namespace,
Name: tc.gateway.Name,
}, tc.helmConfig)
})
require.NoError(t, err)
require.NoError(t, validateResourcesExist(t, client, tc.finalResources))
require.NoError(t, validateResourcesAreDeleted(t, client, tc.initialResources))
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),
ReleaseName: c.flagReleaseName,
},
AllowK8sNamespacesSet: allowK8sNamespaces,
DenyK8sNamespacesSet: denyK8sNamespaces,
Expand Down

0 comments on commit 6df3cca

Please sign in to comment.