From 6833c2a7b46a03e1ade29d1602b1c1d7f2d88e18 Mon Sep 17 00:00:00 2001 From: Saurabh Parekh Date: Fri, 22 Mar 2024 13:39:48 -0700 Subject: [PATCH] Update CLI generate clusterconfig description for provider flag --- cmd/eksctl-anywhere/cmd/generateclusterconfig.go | 2 +- pkg/constants/constants.go | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/eksctl-anywhere/cmd/generateclusterconfig.go b/cmd/eksctl-anywhere/cmd/generateclusterconfig.go index 0d1ac32269b3..78ce9302dd47 100644 --- a/cmd/eksctl-anywhere/cmd/generateclusterconfig.go +++ b/cmd/eksctl-anywhere/cmd/generateclusterconfig.go @@ -49,7 +49,7 @@ func preRunGenerateClusterConfig(cmd *cobra.Command, args []string) { func init() { generateCmd.AddCommand(generateClusterConfigCmd) - generateClusterConfigCmd.Flags().StringP("provider", "p", "", "Provider to use (vsphere or tinkerbell or docker)") + generateClusterConfigCmd.Flags().StringP("provider", "p", "", fmt.Sprintf("Provider to use (%s)", strings.Join(constants.SupportedProviders, " or "))) err := generateClusterConfigCmd.MarkFlagRequired("provider") if err != nil { log.Fatalf("marking flag as required: %v", err) diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 178e2b58ff13..3eb41b91e27f 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -115,3 +115,13 @@ const ( // EKSACLIFieldManager is the owner name for fields applied by the EKS-A CLI. const EKSACLIFieldManager = "eks-a-cli" + +// SupportedProviders is the list of supported providers for generating EKS-A cluster spec. +var SupportedProviders = []string{ + VSphereProviderName, + CloudStackProviderName, + TinkerbellProviderName, + DockerProviderName, + NutanixProviderName, + SnowProviderName, +}