Skip to content

Commit b23ccc1

Browse files
author
Warren Fernandes
committed
Add deprecation message to clusterctl commands
Signed-off-by: Warren Fernandes <[email protected]>
1 parent da6b992 commit b23ccc1

30 files changed

+83
-108
lines changed

cmd/clusterctl/cmd/alpha.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var alphaCmd = &cobra.Command{
24-
Use: "alpha",
25-
Short: "Alpha/Experimental features",
26-
Long: `Alpha/Experimental features`,
24+
Use: "alpha",
25+
Short: "Alpha/Experimental features",
26+
Long: `Alpha/Experimental features`,
27+
Deprecated: deprecationMsg,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/alpha_phase_apply_addons.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ type AlphaPhaseApplyAddonsOptions struct {
3434
var paao = &AlphaPhaseApplyAddonsOptions{}
3535

3636
var alphaPhaseApplyAddonsCmd = &cobra.Command{
37-
Use: "apply-addons",
38-
Short: "Apply Addons",
39-
Long: `Apply Addons`,
37+
Use: "apply-addons",
38+
Short: "Apply Addons",
39+
Long: `Apply Addons`,
40+
Deprecated: deprecationMsg,
4041
Run: func(cmd *cobra.Command, args []string) {
4142
if paao.Addons == "" {
4243
exitWithHelp(cmd, "Please provide yaml file for addons definition.")

cmd/clusterctl/cmd/alpha_phase_apply_boostrap_components.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ type AlphaPhaseApplyBootstrapComponentsOptions struct {
3434
var pabco = &AlphaPhaseApplyBootstrapComponentsOptions{}
3535

3636
var alphaPhaseApplyBootstrapComponentsCmd = &cobra.Command{
37-
Use: "apply-bootstrap-components",
38-
Short: "Apply boostrap components",
39-
Long: `Apply bootstrap components`,
37+
Use: "apply-bootstrap-components",
38+
Short: "Apply boostrap components",
39+
Long: `Apply bootstrap components`,
40+
Deprecated: deprecationMsg,
4041
Run: func(cmd *cobra.Command, args []string) {
4142
if pabco.BootstrapComponents == "" {
4243
exitWithHelp(cmd, "Please provide yaml file for bootstrap component definition.")

cmd/clusterctl/cmd/alpha_phase_apply_cluster.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ type AlphaPhaseApplyClusterOptions struct {
3535
var paco = &AlphaPhaseApplyClusterOptions{}
3636

3737
var alphaPhaseApplyClusterCmd = &cobra.Command{
38-
Use: "apply-cluster",
39-
Short: "Apply Cluster",
40-
Long: `Apply Cluster`,
38+
Use: "apply-cluster",
39+
Short: "Apply Cluster",
40+
Long: `Apply Cluster`,
41+
Deprecated: deprecationMsg,
4142
Run: func(cmd *cobra.Command, args []string) {
4243
if paco.Cluster == "" {
4344
exitWithHelp(cmd, "Please provide yaml file for cluster definition.")

cmd/clusterctl/cmd/alpha_phase_apply_cluster_api_components.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ type AlphaPhaseApplyClusterAPIComponentsOptions struct {
3434
var pacaso = &AlphaPhaseApplyClusterAPIComponentsOptions{}
3535

3636
var alphaPhaseApplyClusterAPIComponentsCmd = &cobra.Command{
37-
Use: "apply-cluster-api-components",
38-
Short: "Apply Cluster API components",
39-
Long: `Apply Cluster API components`,
37+
Use: "apply-cluster-api-components",
38+
Short: "Apply Cluster API components",
39+
Long: `Apply Cluster API components`,
40+
Deprecated: deprecationMsg,
4041
Run: func(cmd *cobra.Command, args []string) {
4142
if pacaso.ProviderComponents == "" {
4243
exitWithHelp(cmd, "Please provide yaml file for provider component definition.")

cmd/clusterctl/cmd/alpha_phase_apply_machines.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ type AlphaPhaseApplyMachinesOptions struct {
3737
var pamo = &AlphaPhaseApplyMachinesOptions{}
3838

3939
var alphaPhaseApplyMachinesCmd = &cobra.Command{
40-
Use: "apply-machines",
41-
Short: "Apply Machines",
42-
Long: `Apply Machines`,
40+
Use: "apply-machines",
41+
Short: "Apply Machines",
42+
Long: `Apply Machines`,
43+
Deprecated: deprecationMsg,
4344
Run: func(cmd *cobra.Command, args []string) {
4445
if pamo.Machines == "" {
4546
exitWithHelp(cmd, "Please provide yaml file for machines definition.")

cmd/clusterctl/cmd/alpha_phase_create_bootstrap_cluster.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ type AlphaPhaseCreateBootstrapClusterOptions struct {
3333
var pcbco = &AlphaPhaseCreateBootstrapClusterOptions{}
3434

3535
var alphaPhaseCreateBootstrapClusterCmd = &cobra.Command{
36-
Use: "create-bootstrap-cluster",
37-
Short: "Create a bootstrap cluster",
38-
Long: `Create a bootstrap cluster`,
36+
Use: "create-bootstrap-cluster",
37+
Short: "Create a bootstrap cluster",
38+
Long: `Create a bootstrap cluster`,
39+
Deprecated: deprecationMsg,
3940
Run: func(cmd *cobra.Command, args []string) {
4041
if err := RunAlphaPhaseCreateBootstrapCluster(pcbco); err != nil {
4142
klog.Exit(err)

cmd/clusterctl/cmd/alpha_phase_get_kubeconfig.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ type AlphaPhaseGetKubeconfigOptions struct {
3636
var pgko = &AlphaPhaseGetKubeconfigOptions{}
3737

3838
var alphaPhaseGetKubeconfigCmd = &cobra.Command{
39-
Use: "get-kubeconfig",
40-
Short: "Get Kubeconfig",
41-
Long: `Get Kubeconfig`,
39+
Use: "get-kubeconfig",
40+
Short: "Get Kubeconfig",
41+
Long: `Get Kubeconfig`,
42+
Deprecated: deprecationMsg,
4243
Run: func(cmd *cobra.Command, args []string) {
4344
if pgko.Kubeconfig == "" {
4445
exitWithHelp(cmd, "Please provide a kubeconfig file.")

cmd/clusterctl/cmd/alpha_phase_pivot.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ type AlphaPhasePivotOptions struct {
3535
var ppo = &AlphaPhasePivotOptions{}
3636

3737
var alphaPhasePivotCmd = &cobra.Command{
38-
Use: "pivot",
39-
Short: "Pivot",
40-
Long: `Pivot`,
38+
Use: "pivot",
39+
Short: "Pivot",
40+
Long: `Pivot`,
41+
Deprecated: deprecationMsg,
4142
Run: func(cmd *cobra.Command, args []string) {
4243
if ppo.ProviderComponents == "" {
4344
exitWithHelp(cmd, "Please provide yaml file for provider components definition.")

cmd/clusterctl/cmd/alpha_phases.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var alphaPhasesCmd = &cobra.Command{
24-
Use: "phases",
25-
Short: "Run an individual phase",
26-
Long: `Run an individual phase`,
24+
Use: "phases",
25+
Short: "Run an individual phase",
26+
Long: `Run an individual phase`,
27+
Deprecated: deprecationMsg,
2728
}
2829

2930
func init() {

0 commit comments

Comments
 (0)