Skip to content

Commit

Permalink
CR-14556-skip (#603)
Browse files Browse the repository at this point in the history
* add skip ingress option to upgrade command

* fix

* push docs

* bump version
  • Loading branch information
yaroslav-codefresh authored Oct 18, 2022
1 parent 6105140 commit 236afdd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.0.544
VERSION=v0.0.545

OUT_DIR=dist
YEAR?=$(shell date +"%Y")
Expand Down
4 changes: 3 additions & 1 deletion cmd/commands/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ type (
CommonConfig *runtime.CommonConfig
SuggestedSharedConfigRepo string
DisableTelemetry bool
SkipIngress bool
runtimeDef string

versionStr string
Expand Down Expand Up @@ -821,6 +822,7 @@ func NewRuntimeUpgradeCommand() *cobra.Command {
cmd.Flags().BoolVar(&opts.DisableTelemetry, "disable-telemetry", false, "If true, will disable analytics reporting for the upgrade process")
cmd.Flags().BoolVar(&store.Get().SetDefaultResources, "set-default-resources", false, "If true, will set default requests and limits on all of the runtime components")
cmd.Flags().StringVar(&opts.runtimeDef, "runtime-def", store.RuntimeDefURL, "Install runtime from a specific manifest")
cmd.Flags().BoolVar(&opts.SkipIngress, "skip-ingress", false, "Skips the creation of ingress resources")
opts.CloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{CloneForWrite: true})

util.Die(cmd.Flags().MarkHidden("runtime-def"))
Expand Down Expand Up @@ -901,7 +903,7 @@ func runRuntimeUpgrade(ctx context.Context, opts *RuntimeUpgradeOptions) error {
isIngress := curRt.Spec.AccessMode == platmodel.AccessModeIngress
isNotAlb := curRt.Spec.IngressController != string(routingutil.IngressControllerALB)

if needsInternalRouter && isIngress && isNotAlb {
if !opts.SkipIngress && needsInternalRouter && isIngress && isNotAlb {
log.G(ctx).Info("Migrating to Internal Router ")

err = migrateInternalRouter(ctx, opts, newRt)
Expand Down
1 change: 1 addition & 0 deletions docs/commands/cli-v2_runtime_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ cli-v2 runtime upgrade [RUNTIME_NAME] [flags]
--repo string Repository URL [GIT_REPO]
--set-default-resources If true, will set default requests and limits on all of the runtime components
--shared-config-repo string URL to the shared configurations repo. (default: <installation-repo> or the existing one for this account)
--skip-ingress Skips the creation of ingress resources
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
--version string The runtime version to upgrade to, defaults to latest
```
Expand Down
4 changes: 2 additions & 2 deletions docs/releases/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.544/cf-linux-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.545/cf-linux-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-linux-amd64 /usr/local/bin/cf
Expand All @@ -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.0.544/cf-darwin-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.545/cf-darwin-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-darwin-amd64 /usr/local/bin/cf
Expand Down

0 comments on commit 236afdd

Please sign in to comment.