Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kschoche committed Feb 7, 2022
1 parent f27e801 commit b495065
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions control-plane/subcommand/acl-init/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"flag"
"fmt"
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -165,7 +164,6 @@ func (c *Command) Run(args []string) int {

if c.flagACLAuthMethod != "" {
cfg := api.DefaultConfig()
//cfg.Namespace = c.consulNamespace(c.flagConsulServiceNamespace)
c.http.MergeOntoConfig(cfg)
if c.consulClient == nil {
c.consulClient, err = consul.NewClient(cfg)
Expand Down Expand Up @@ -291,12 +289,6 @@ func (c *Command) Run(args []string) int {
return 0
}

// consulNamespace returns the Consul destination namespace for a provided Kubernetes namespace
// depending on Consul Namespaces being enabled and the value of namespace mirroring.
func (c *Command) consulNamespace(namespace string) string {
return namespaces.ConsulNamespace(namespace, c.flagEnableNamespaces, c.flagConsulDestinationNamespace, c.flagEnableK8SNSMirroring, c.flagK8SNSMirroringPrefix)
}

func (c *Command) getSecret(secretName string) (string, error) {
secret, err := c.k8sClient.CoreV1().Secrets(c.flagNamespace).Get(c.ctx, secretName, metav1.GetOptions{})
if err != nil {
Expand Down

0 comments on commit b495065

Please sign in to comment.