Skip to content

Commit 236afdd

Browse files
CR-14556-skip (#603)
* add skip ingress option to upgrade command * fix * push docs * bump version
1 parent 6105140 commit 236afdd

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.544
1+
VERSION=v0.0.545
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ type (
7575
CommonConfig *runtime.CommonConfig
7676
SuggestedSharedConfigRepo string
7777
DisableTelemetry bool
78+
SkipIngress bool
7879
runtimeDef string
7980

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

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

904-
if needsInternalRouter && isIngress && isNotAlb {
906+
if !opts.SkipIngress && needsInternalRouter && isIngress && isNotAlb {
905907
log.G(ctx).Info("Migrating to Internal Router ")
906908

907909
err = migrateInternalRouter(ctx, opts, newRt)

docs/commands/cli-v2_runtime_upgrade.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ cli-v2 runtime upgrade [RUNTIME_NAME] [flags]
3535
--repo string Repository URL [GIT_REPO]
3636
--set-default-resources If true, will set default requests and limits on all of the runtime components
3737
--shared-config-repo string URL to the shared configurations repo. (default: <installation-repo> or the existing one for this account)
38+
--skip-ingress Skips the creation of ingress resources
3839
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
3940
--version string The runtime version to upgrade to, defaults to latest
4041
```

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.544/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.545/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.544/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.545/cf-darwin-amd64.tar.gz | tar zx
4040

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

0 commit comments

Comments
 (0)