From 3a51e478b9a18879291e17dc2163b3adca06f2ca Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Mon, 28 Aug 2023 11:07:35 +0200 Subject: [PATCH] fixup! init --- cli/internal/cmd/configgenerate.go | 3 ++- docs/docs/reference/cli.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/internal/cmd/configgenerate.go b/cli/internal/cmd/configgenerate.go index 8a582dfe182..eb52599125d 100644 --- a/cli/internal/cmd/configgenerate.go +++ b/cli/internal/cmd/configgenerate.go @@ -14,6 +14,7 @@ import ( "github.com/edgelesssys/constellation/v2/internal/attestation/variant" "github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider" "github.com/edgelesssys/constellation/v2/internal/config" + "golang.org/x/mod/semver" "github.com/edgelesssys/constellation/v2/internal/constants" "github.com/edgelesssys/constellation/v2/internal/file" @@ -34,7 +35,7 @@ func newConfigGenerateCmd() *cobra.Command { ValidArgsFunction: generateCompletion, RunE: runConfigGenerate, } - cmd.Flags().StringP("kubernetes", "k", string(config.Default().KubernetesVersion), "Kubernetes version to use in format MAJOR.MINOR") + cmd.Flags().StringP("kubernetes", "k", semver.MajorMinor(string(config.Default().KubernetesVersion)), "Kubernetes version to use in format MAJOR.MINOR") cmd.Flags().StringP("attestation", "a", "", fmt.Sprintf("attestation variant to use %s. If not specified, the default for the cloud provider is used", printFormattedSlice(variant.GetAvailableAttestationVariants()))) return cmd diff --git a/docs/docs/reference/cli.md b/docs/docs/reference/cli.md index 90ad1d9540a..56a3344b3fd 100644 --- a/docs/docs/reference/cli.md +++ b/docs/docs/reference/cli.md @@ -79,7 +79,7 @@ constellation config generate {aws|azure|gcp|openstack|qemu|stackit} [flags] ``` -a, --attestation string attestation variant to use {aws-sev-snp|aws-nitro-tpm|azure-sev-snp|azure-trustedlaunch|gcp-sev-es|qemu-vtpm}. If not specified, the default for the cloud provider is used -h, --help help for generate - -k, --kubernetes string Kubernetes version to use in format MAJOR.MINOR (default "v1.27.4") + -k, --kubernetes string Kubernetes version to use in format MAJOR.MINOR (default "v1.27") ``` ### Options inherited from parent commands