From d045e7952c23910fa2f90c29c839d87b14f4fb27 Mon Sep 17 00:00:00 2001 From: Daniel Maizel Date: Tue, 14 Mar 2023 15:24:13 +0200 Subject: [PATCH] Cr 17631 (#683) * Use stable version of add-cluster when using a helm-runtime * fixed according to code review * ran codegen --- Makefile | 2 +- cmd/commands/cluster.go | 7 ++++++- cmd/commands/runtime_install.go | 1 - docs/commands/cli-v2_runtime_install.md | 1 + docs/releases/release_notes.md | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f4a6aea3..a6d7510a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=v0.1.38 +VERSION=v0.1.39 OUT_DIR=dist YEAR?=$(shell date +"%Y") diff --git a/cmd/commands/cluster.go b/cmd/commands/cluster.go index e8cdef38..cce869df 100644 --- a/cmd/commands/cluster.go +++ b/cmd/commands/cluster.go @@ -184,7 +184,12 @@ func runClusterAdd(ctx context.Context, opts *ClusterAddOptions) error { log.G(ctx).Info("Building \"add-cluster\" manifests") csdpToken := cfConfig.GetCurrentContext().Token - manifests, nameSuffix, err := createAddClusterManifests(opts, ingressUrl, server, csdpToken, version.String()) + addClusterRef := version.String() + if runtime.InstallationType == model.InstallationTypeHelm { + addClusterRef = "stable" + } + + manifests, nameSuffix, err := createAddClusterManifests(opts, ingressUrl, server, csdpToken, addClusterRef) if err != nil { return fmt.Errorf("failed getting add-cluster resources: %w", err) } diff --git a/cmd/commands/runtime_install.go b/cmd/commands/runtime_install.go index afc79365..8920beea 100644 --- a/cmd/commands/runtime_install.go +++ b/cmd/commands/runtime_install.go @@ -303,7 +303,6 @@ func NewRuntimeInstallCommand() *cobra.Command { installationOpts.kubeconfig = cmd.Flag("kubeconfig").Value.String() util.Die(cmd.Flags().MarkHidden("bypass-ingress-class-check")) - util.Die(cmd.Flags().MarkHidden("access-mode")) util.Die(cmd.Flags().MarkHidden("tunnel-register-host")) util.Die(cmd.Flags().MarkHidden("tunnel-domain")) util.Die(cmd.Flags().MarkHidden("ips-allow-list")) diff --git a/docs/commands/cli-v2_runtime_install.md b/docs/commands/cli-v2_runtime_install.md index 21ffea76..f143744e 100644 --- a/docs/commands/cli-v2_runtime_install.md +++ b/docs/commands/cli-v2_runtime_install.md @@ -28,6 +28,7 @@ cli-v2 runtime install [runtime_name] [flags] ### Options ``` + --access-mode string The access mode to the cluster, one of: ingress|tunnel --context string The name of the kubeconfig context to use --demo-resources Installs demo resources (default: true) (default true) --disable-rollback If true, will not perform installation rollback after a failed installation diff --git a/docs/releases/release_notes.md b/docs/releases/release_notes.md index bccf5c6a..86ddd6d4 100644 --- a/docs/releases/release_notes.md +++ b/docs/releases/release_notes.md @@ -23,7 +23,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.38/cf-linux-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.39/cf-linux-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-linux-amd64 /usr/local/bin/cf @@ -36,7 +36,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.38/cf-darwin-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.39/cf-darwin-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-darwin-amd64 /usr/local/bin/cf