Skip to content

Commit

Permalink
Marking packages commands as deprecated (#8240)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokearu authored Jun 10, 2024
1 parent 560fbf4 commit e0400fa
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 6 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
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",
}
1 change: 1 addition & 0 deletions cmd/eksctl-anywhere/cmd/installpackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
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 to `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 e0400fa

Please sign in to comment.