Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.20] revert adding --ca-data flag to vcluster platform add cluster #2161

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading