Skip to content

Commit

Permalink
Marking packages commands as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
pokearu committed Jun 2, 2024
1 parent 8e85e1e commit cf58ec7
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/applypackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var applyPackagesCommand = &cobra.Command{
}
return nil
},
Deprecated: "use `kubectl apply` instead",
}

func applyPackages(ctx context.Context) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/createpackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var createPackagesCommand = &cobra.Command{
}
return nil
},
Deprecated: "use `kubectl apply` instead",
}

func createPackages(ctx context.Context) error {
Expand Down
3 changes: 2 additions & 1 deletion cmd/eksctl-anywhere/cmd/deletepackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ var deletePackageCommand = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
return deleteResources(cmd.Context(), args)
},
Args: cobra.MinimumNArgs(1),
Args: cobra.MinimumNArgs(1),
Deprecated: "use `kubectl delete package` instead",
}

func deleteResources(ctx context.Context, args []string) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/describepackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var describePackagesCommand = &cobra.Command{
}
return nil
},
Deprecated: "use `kubectl describe packages` instead",
}

func describeResources(ctx context.Context, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/eksctl-anywhere/cmd/generatepackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var generatePackageCommand = &cobra.Command{
if err := cobra.ExactArgs(1)(cmd, args); err == nil {
return nil
}
return fmt.Errorf("The name of the package to install must be specified as an argument")
return fmt.Errorf("the name of the package to install must be specified as an argument")

Check warning on line 55 in cmd/eksctl-anywhere/cmd/generatepackage.go

View check run for this annotation

Codecov / codecov/patch

cmd/eksctl-anywhere/cmd/generatepackage.go#L55

Added line #L55 was not covered by tests
},
}

Expand Down
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/getpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ var getPackageCommand = &cobra.Command{
}
return getResources(cmd.Context(), "packages", gpo.output, kubeConfig, gpo.clusterName, gpo.bundlesOverride, args)
},
Deprecated: "use `kubectl get packages` instead",
}
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/getpackagebundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ var getPackageBundleCommand = &cobra.Command{
}
return getResources(cmd.Context(), "packagebundles", gpbo.output, kubeConfig, "", gpbo.bundlesOverride, args)
},
Deprecated: "use `kubectl get packagebundle` instead",
}
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ var getPackageBundleControllerCommand = &cobra.Command{
}
return getResources(cmd.Context(), "packagebundlecontrollers", gpbco.output, kubeConfig, "", gpbco.bundlesOverride, args)
},
Deprecated: "use `kubectl get packagebundlecontroller` instead",
}
3 changes: 2 additions & 1 deletion cmd/eksctl-anywhere/cmd/installpackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ var installPackageCommand = &cobra.Command{
if err := cobra.ExactArgs(1)(cmd, args); err == nil {
return nil
}
return fmt.Errorf("The name of the package to install must be specified as an argument")
return fmt.Errorf("the name of the package to install must be specified as an argument")

Check warning on line 65 in cmd/eksctl-anywhere/cmd/installpackages.go

View check run for this annotation

Codecov / codecov/patch

cmd/eksctl-anywhere/cmd/installpackages.go#L65

Added line #L65 was not covered by tests
},
Deprecated: "use `kubectl apply` instead",
}

func runInstallPackages(cmd *cobra.Command, args []string) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/upgradepackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var upgradePackagesCommand = &cobra.Command{
}
return nil
},
Deprecated: "refer `https://anywhere.eks.amazonaws.com/docs/packages/packagebundles` for upgrading",
}

func upgradePackages(ctx context.Context) error {
Expand Down
7 changes: 2 additions & 5 deletions docs/content/en/docs/packages/packagebundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ eksa-packages mgmt v1-27-125 active
eksa-packages w01 v1-27-125 active
```

Use the EKS Anywhere packages CLI to upgrade the active package bundle of the target cluster. This command can also be used to downgrade to a previous package bundle version.
To upgrade the active package bundle for the target cluster, edit the `packagebundlecontroller` object on the cluster and set the `activeBundle` field to the new bundle number that is available.
```
export CLUSTER_NAME=mgmt
eksctl anywhere upgrade packages --bundle-version v1-27-126 --cluster $CLUSTER_NAME
kubectl edit packagebundlecontroller <cluster name> -n eksa-packages
```


0 comments on commit cf58ec7

Please sign in to comment.