Skip to content

Commit

Permalink
revert adding --ca-data flag to vcluster platform add cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Bojanowski <pawelbojanowski@protonmail.com>
  • Loading branch information
hidalgopl committed Sep 19, 2024
1 parent 2e1dff9 commit b86e6d8
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions cmd/vclusterctl/cmd/platform/add/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ import (
type ClusterCmd struct {
Log log.Logger
*flags.GlobalFlags
Namespace string
ServiceAccount string
DisplayName string
Context string
Insecure bool
Wait bool
HelmChartPath string
HelmChartVersion string
HelmSet []string
HelmValues []string
CertificateAuthorityData []byte
Namespace string
ServiceAccount string
DisplayName string
Context string
Insecure bool
Wait bool
HelmChartPath string
HelmChartVersion string
HelmSet []string
HelmValues []string
}

// NewClusterCmd creates a new command
Expand Down Expand Up @@ -81,7 +80,6 @@ vcluster platform add cluster my-cluster
c.Flags().StringArrayVar(&cmd.HelmSet, "helm-set", []string{}, "Extra helm values for the agent chart")
c.Flags().StringArrayVar(&cmd.HelmValues, "helm-values", []string{}, "Extra helm values for the agent chart")
c.Flags().StringVar(&cmd.Context, "context", "", "The kube context to use for installation")
c.Flags().BytesBase64Var(&cmd.CertificateAuthorityData, "ca-data", []byte{}, "additional, base64 encoded certificate authority data that will be passed to the platform secret")

return c
}
Expand Down Expand Up @@ -204,8 +202,8 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error {
helmArgs = append(helmArgs, "--set", "insecureSkipVerify=true")
}

if len(cmd.CertificateAuthorityData) > 0 {
helmArgs = append(helmArgs, "--set", "additionalCA="+string(cmd.CertificateAuthorityData))
if accessKey.CaCert != "" {
helmArgs = append(helmArgs, "--set", "additionalCA="+accessKey.CaCert)
}

if cmd.Wait {
Expand Down

0 comments on commit b86e6d8

Please sign in to comment.