Skip to content

Commit f114b17

Browse files
OTA-1581: Promote oc adm upgrade status to general availability (#2063)
* OTA-1581: Promote `oc adm upgrade status` to general availability - Stop gating the command on an env variable presence - Hide the mock input flag * Update pkg/cli/admin/upgrade/status/status.go Co-authored-by: Hongkai Liu <[email protected]> --------- Co-authored-by: Hongkai Liu <[email protected]>
1 parent 1c54ec0 commit f114b17

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pkg/cli/admin/upgrade/status/status.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ func New(f kcmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command
5959
}
6060

6161
flags := cmd.Flags()
62-
// TODO: We can remove these flags once the idea about `oc adm upgrade status` stabilizes and the command
63-
// is promoted out of the OC_ENABLE_CMD_UPGRADE_STATUS feature gate
64-
flags.StringVar(&o.mockData.cvPath, "mock-clusterversion", "", "Path to a YAML ClusterVersion object to use for testing (will be removed later). Files in the same directory with the same name and suffixes -co.yaml, -mcp.yaml, -mc.yaml, and -node.yaml are required.")
62+
flags.StringVar(&o.mockData.cvPath, "mock-clusterversion", "", "Path to a YAML ClusterVersion object to use for testing. Files in the same directory with the same name and suffixes -co.yaml, -mcp.yaml, -mc.yaml, and -node.yaml are required.")
6563
flags.StringVar(&o.detailedOutput, "details", "none", fmt.Sprintf("Show detailed output in selected section. One of: %s", strings.Join(detailedOutputAllValues, ", ")))
66-
64+
flags.MarkHidden("mock-clusterversion")
6765
return cmd
6866
}
6967

pkg/cli/admin/upgrade/upgrade.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ func New(f kcmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command
115115
flags.BoolVar(&o.AllowNotRecommended, "allow-not-recommended", o.AllowNotRecommended, "Allows upgrade to a version when it is supported but not recommended for updates.")
116116

117117
cmd.AddCommand(channel.New(f, streams))
118+
cmd.AddCommand(status.New(f, streams))
118119

119-
if kcmdutil.FeatureGate("OC_ENABLE_CMD_UPGRADE_STATUS").IsEnabled() {
120-
cmd.AddCommand(status.New(f, streams))
121-
}
122120
if kcmdutil.FeatureGate("OC_ENABLE_CMD_UPGRADE_ROLLBACK").IsEnabled() {
123121
cmd.AddCommand(rollback.New(f, streams))
124122
}

0 commit comments

Comments
 (0)