From e0400fadda12f5403142cf41cd8f80b3a557e34b Mon Sep 17 00:00:00 2001 From: Aravind Ramalingam <60027164+pokearu@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:03:27 -0700 Subject: [PATCH] Marking packages commands as deprecated (#8240) --- cmd/eksctl-anywhere/cmd/applypackages.go | 1 + cmd/eksctl-anywhere/cmd/createpackages.go | 1 + cmd/eksctl-anywhere/cmd/deletepackages.go | 3 ++- cmd/eksctl-anywhere/cmd/describepackages.go | 1 + cmd/eksctl-anywhere/cmd/getpackage.go | 1 + cmd/eksctl-anywhere/cmd/getpackagebundle.go | 1 + cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go | 1 + cmd/eksctl-anywhere/cmd/installpackages.go | 1 + cmd/eksctl-anywhere/cmd/upgradepackages.go | 1 + docs/content/en/docs/packages/packagebundles.md | 7 ++----- 10 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmd/eksctl-anywhere/cmd/applypackages.go b/cmd/eksctl-anywhere/cmd/applypackages.go index a9353d14c49a..495b4ef7ec1d 100644 --- a/cmd/eksctl-anywhere/cmd/applypackages.go +++ b/cmd/eksctl-anywhere/cmd/applypackages.go @@ -50,6 +50,7 @@ var applyPackagesCommand = &cobra.Command{ } return nil }, + Deprecated: "use `kubectl apply` instead", } func applyPackages(ctx context.Context) error { diff --git a/cmd/eksctl-anywhere/cmd/createpackages.go b/cmd/eksctl-anywhere/cmd/createpackages.go index 82b70fcfefea..dfcba8552bd2 100644 --- a/cmd/eksctl-anywhere/cmd/createpackages.go +++ b/cmd/eksctl-anywhere/cmd/createpackages.go @@ -50,6 +50,7 @@ var createPackagesCommand = &cobra.Command{ } return nil }, + Deprecated: "use `kubectl apply` instead", } func createPackages(ctx context.Context) error { diff --git a/cmd/eksctl-anywhere/cmd/deletepackages.go b/cmd/eksctl-anywhere/cmd/deletepackages.go index f7d84da97470..c765e766401f 100644 --- a/cmd/eksctl-anywhere/cmd/deletepackages.go +++ b/cmd/eksctl-anywhere/cmd/deletepackages.go @@ -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 { diff --git a/cmd/eksctl-anywhere/cmd/describepackages.go b/cmd/eksctl-anywhere/cmd/describepackages.go index 7f8e81bacb3d..bb261d5f3049 100644 --- a/cmd/eksctl-anywhere/cmd/describepackages.go +++ b/cmd/eksctl-anywhere/cmd/describepackages.go @@ -47,6 +47,7 @@ var describePackagesCommand = &cobra.Command{ } return nil }, + Deprecated: "use `kubectl describe packages` instead", } func describeResources(ctx context.Context, args []string) error { diff --git a/cmd/eksctl-anywhere/cmd/getpackage.go b/cmd/eksctl-anywhere/cmd/getpackage.go index 054a6e0c792e..ce6c66b4106f 100644 --- a/cmd/eksctl-anywhere/cmd/getpackage.go +++ b/cmd/eksctl-anywhere/cmd/getpackage.go @@ -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", } diff --git a/cmd/eksctl-anywhere/cmd/getpackagebundle.go b/cmd/eksctl-anywhere/cmd/getpackagebundle.go index b4ea4e0a47dc..8fe3aba23313 100644 --- a/cmd/eksctl-anywhere/cmd/getpackagebundle.go +++ b/cmd/eksctl-anywhere/cmd/getpackagebundle.go @@ -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", } diff --git a/cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go b/cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go index 104f350dec22..ad2feb8335d5 100644 --- a/cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go +++ b/cmd/eksctl-anywhere/cmd/getpackagebundlecontroller.go @@ -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", } diff --git a/cmd/eksctl-anywhere/cmd/installpackages.go b/cmd/eksctl-anywhere/cmd/installpackages.go index f4e956bea8ca..b2c0b31e907c 100644 --- a/cmd/eksctl-anywhere/cmd/installpackages.go +++ b/cmd/eksctl-anywhere/cmd/installpackages.go @@ -64,6 +64,7 @@ var installPackageCommand = &cobra.Command{ } return fmt.Errorf("The name of the package to install must be specified as an argument") }, + Deprecated: "use `kubectl apply` instead", } func runInstallPackages(cmd *cobra.Command, args []string) error { diff --git a/cmd/eksctl-anywhere/cmd/upgradepackages.go b/cmd/eksctl-anywhere/cmd/upgradepackages.go index fcd70c2935a4..5d4b56ca686e 100644 --- a/cmd/eksctl-anywhere/cmd/upgradepackages.go +++ b/cmd/eksctl-anywhere/cmd/upgradepackages.go @@ -55,6 +55,7 @@ var upgradePackagesCommand = &cobra.Command{ } return nil }, + Deprecated: "refer to `https://anywhere.eks.amazonaws.com/docs/packages/packagebundles` for upgrading", } func upgradePackages(ctx context.Context) error { diff --git a/docs/content/en/docs/packages/packagebundles.md b/docs/content/en/docs/packages/packagebundles.md index 149665c29036..0438022cba3d 100644 --- a/docs/content/en/docs/packages/packagebundles.md +++ b/docs/content/en/docs/packages/packagebundles.md @@ -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 -n eksa-packages ``` - -