From 274fed099081c9865418d95e1f57befa033f912d Mon Sep 17 00:00:00 2001 From: Thomas Tendyck Date: Wed, 5 Jul 2023 16:44:57 +0200 Subject: [PATCH] cli: fix/improve some user-facing strings --- cli/cmd/root.go | 6 +- cli/internal/cmd/iamcreate.go | 26 +++---- cli/internal/cmd/init.go | 2 +- cli/internal/cmd/status.go | 6 +- cli/internal/cmd/verify.go | 4 +- docs/docs/reference/cli.md | 143 +++++++++++++++++----------------- internal/config/config.go | 8 +- internal/config/config_doc.go | 16 ++-- 8 files changed, 105 insertions(+), 106 deletions(-) diff --git a/cli/cmd/root.go b/cli/cmd/root.go index c09d3689b..5dfaee1bf 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -48,19 +48,19 @@ func NewRootCmd() *cobra.Command { rootCmd.PersistentFlags().Bool("debug", false, "enable debug logging") rootCmd.PersistentFlags().Bool("force", false, "disable version compatibility checks - might result in corrupted clusters") - rootCmd.PersistentFlags().String("tf-log", "NONE", "sets the Terraform log level (default \"NONE\" - no logs)") + rootCmd.PersistentFlags().String("tf-log", "NONE", "Terraform log level") rootCmd.AddCommand(cmd.NewConfigCmd()) rootCmd.AddCommand(cmd.NewCreateCmd()) rootCmd.AddCommand(cmd.NewInitCmd()) rootCmd.AddCommand(cmd.NewMiniCmd()) + rootCmd.AddCommand(cmd.NewStatusCmd()) rootCmd.AddCommand(cmd.NewVerifyCmd()) rootCmd.AddCommand(cmd.NewUpgradeCmd()) rootCmd.AddCommand(cmd.NewRecoverCmd()) rootCmd.AddCommand(cmd.NewTerminateCmd()) - rootCmd.AddCommand(cmd.NewVersionCmd()) rootCmd.AddCommand(cmd.NewIAMCmd()) - rootCmd.AddCommand(cmd.NewStatusCmd()) + rootCmd.AddCommand(cmd.NewVersionCmd()) return rootCmd } diff --git a/cli/internal/cmd/iamcreate.go b/cli/internal/cmd/iamcreate.go index e253a4b3b..cdb4670b4 100644 --- a/cli/internal/cmd/iamcreate.go +++ b/cli/internal/cmd/iamcreate.go @@ -30,8 +30,7 @@ var ( zoneRegex = regexp.MustCompile(`^\w+-\w+-[abc]$`) regionRegex = regexp.MustCompile(`^\w+-\w+[0-9]$`) // Source: https://cloud.google.com/resource-manager/reference/rest/v1/projects. - projectIDRegex = regexp.MustCompile(`^[a-z][-a-z0-9]{4,28}[a-z0-9]{1}$`) - serviceAccIDRegex = regexp.MustCompile(`^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$`) + gcpIDRegex = regexp.MustCompile(`^[a-z][-a-z0-9]{4,28}[a-z0-9]$`) ) // NewIAMCmd returns a new cobra.Command for the iam parent command. It needs another verb and does nothing on its own. @@ -59,7 +58,7 @@ func newIAMCreateCmd() *cobra.Command { } cmd.PersistentFlags().BoolP("yes", "y", false, "create the IAM configuration without further confirmation") - cmd.PersistentFlags().Bool("update-config", false, "automatically update the config file with the specific IAM information") + cmd.PersistentFlags().Bool("update-config", false, "update the config file with the specific IAM information") cmd.AddCommand(newIAMCreateAWSCmd()) cmd.AddCommand(newIAMCreateAzureCmd()) @@ -80,9 +79,8 @@ func newIAMCreateAWSCmd() *cobra.Command { cmd.Flags().String("prefix", "", "name prefix for all resources (required)") must(cobra.MarkFlagRequired(cmd.Flags(), "prefix")) - cmd.Flags().String("zone", "", "AWS availability zone the resources will be created in, e.g. us-east-2a (required)\n"+ - "Find available zones here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones. "+ - "Note that we do not support every zone / region. You can find a list of all supported regions in our docs.") + cmd.Flags().String("zone", "", "AWS availability zone the resources will be created in, e.g., us-east-2a (required)\n"+ + "See the Constellation docs for a list of currently supported regions.") must(cobra.MarkFlagRequired(cmd.Flags(), "zone")) return cmd } @@ -99,7 +97,7 @@ func newIAMCreateAzureCmd() *cobra.Command { cmd.Flags().String("resourceGroup", "", "name prefix of the two resource groups your cluster / IAM resources will be created in (required)") must(cobra.MarkFlagRequired(cmd.Flags(), "resourceGroup")) - cmd.Flags().String("region", "", "region the resources will be created in, e.g. westus (required)") + cmd.Flags().String("region", "", "region the resources will be created in, e.g., westus (required)") must(cobra.MarkFlagRequired(cmd.Flags(), "region")) cmd.Flags().String("servicePrincipal", "", "name of the service principal that will be created (required)") must(cobra.MarkFlagRequired(cmd.Flags(), "servicePrincipal")) @@ -117,13 +115,13 @@ func newIAMCreateGCPCmd() *cobra.Command { } cmd.Flags().String("zone", "", "GCP zone the cluster will be deployed in (required)\n"+ - "Find a list of available zones here: https://cloud.google.com/compute/docs/regions-zones#available.") + "Find a list of available zones here: https://cloud.google.com/compute/docs/regions-zones#available") must(cobra.MarkFlagRequired(cmd.Flags(), "zone")) cmd.Flags().String("serviceAccountID", "", "ID for the service account that will be created (required)\n"+ - "Must match ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$.") + "Must be 6 to 30 lowercase letters, digits, or hyphens.") must(cobra.MarkFlagRequired(cmd.Flags(), "serviceAccountID")) cmd.Flags().String("projectID", "", "ID of the GCP project the configuration will be created in (required)\n"+ - "Find it on the welcome screen of your project: https://console.cloud.google.com/welcome.") + "Find it on the welcome screen of your project: https://console.cloud.google.com/welcome") must(cobra.MarkFlagRequired(cmd.Flags(), "projectID")) return cmd @@ -501,16 +499,16 @@ func (c *gcpIAMCreator) parseFlagsAndSetupConfig(cmd *cobra.Command, flags iamFl if err != nil { return iamFlags{}, fmt.Errorf("parsing projectID string: %w", err) } - if !projectIDRegex.MatchString(projectID) { - return iamFlags{}, fmt.Errorf("invalid projectID string: %s", projectID) + if !gcpIDRegex.MatchString(projectID) { + return iamFlags{}, fmt.Errorf("projectID %q doesn't match %s", projectID, gcpIDRegex) } serviceAccID, err := cmd.Flags().GetString("serviceAccountID") if err != nil { return iamFlags{}, fmt.Errorf("parsing serviceAccountID string: %w", err) } - if !serviceAccIDRegex.MatchString(serviceAccID) { - return iamFlags{}, fmt.Errorf("invalid serviceAccountID string: %s", serviceAccID) + if !gcpIDRegex.MatchString(serviceAccID) { + return iamFlags{}, fmt.Errorf("serviceAccountID %q doesn't match %s", serviceAccID, gcpIDRegex) } flags.gcp = gcpFlags{ diff --git a/cli/internal/cmd/init.go b/cli/internal/cmd/init.go index 9e42d3005..68ea4d387 100644 --- a/cli/internal/cmd/init.go +++ b/cli/internal/cmd/init.go @@ -127,7 +127,7 @@ func (i *initCmd) initialize(cmd *cobra.Command, newDialer func(validator atls.V } } if conf.GetAttestationConfig().GetVariant().Equal(variant.AWSSEVSNP{}) { - cmd.PrintErrln("WARNING: SNP based attestation is still under active development. Please do not use in production.") + cmd.PrintErrln("WARNING: Attestation temporarily relies on AWS nitroTPM. See https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information.") } i.log.Debugf("Checking cluster ID file") diff --git a/cli/internal/cmd/status.go b/cli/internal/cmd/status.go index 8bf5046bf..2b3608de5 100644 --- a/cli/internal/cmd/status.go +++ b/cli/internal/cmd/status.go @@ -28,9 +28,9 @@ import ( func NewStatusCmd() *cobra.Command { cmd := &cobra.Command{ Use: "status", - Short: "show status of a Constellation cluster", - Long: "Show status of a constellation cluster.\n\n" + - "Shows microservice, image and Kubernetes versions installed in the cluster. Also show status of current version upgrades.", + Short: "Show status of a Constellation cluster", + Long: "Show the status of a constellation cluster.\n\n" + + "Shows microservice, image, and Kubernetes versions installed in the cluster. Also shows status of current version upgrades.", Args: cobra.NoArgs, RunE: runStatus, } diff --git a/cli/internal/cmd/verify.go b/cli/internal/cmd/verify.go index 131ba0da7..ae260faf5 100644 --- a/cli/internal/cmd/verify.go +++ b/cli/internal/cmd/verify.go @@ -40,8 +40,8 @@ func NewVerifyCmd() *cobra.Command { cmd := &cobra.Command{ Use: "verify", Short: "Verify the confidential properties of a Constellation cluster", - Long: `Verify the confidential properties of a Constellation cluster.\n` + - `If arguments aren't specified, values are read from ` + "`" + constants.ClusterIDsFileName + "`.", + Long: "Verify the confidential properties of a Constellation cluster.\n" + + "If arguments aren't specified, values are read from `" + constants.ClusterIDsFileName + "`.", Args: cobra.ExactArgs(0), RunE: runVerify, } diff --git a/docs/docs/reference/cli.md b/docs/docs/reference/cli.md index 676e3373b..2ff90666f 100644 --- a/docs/docs/reference/cli.md +++ b/docs/docs/reference/cli.md @@ -22,20 +22,20 @@ Commands: * [mini](#constellation-mini): Manage MiniConstellation clusters * [up](#constellation-mini-up): Create and initialize a new MiniConstellation cluster * [down](#constellation-mini-down): Destroy a MiniConstellation cluster +* [status](#constellation-status): Show status of a Constellation cluster * [verify](#constellation-verify): Verify the confidential properties of a Constellation cluster * [upgrade](#constellation-upgrade): Find and apply upgrades to your Constellation cluster * [check](#constellation-upgrade-check): Check for possible upgrades * [apply](#constellation-upgrade-apply): Apply an upgrade to a Constellation cluster * [recover](#constellation-recover): Recover a completely stopped Constellation cluster * [terminate](#constellation-terminate): Terminate a Constellation cluster -* [version](#constellation-version): Display version of this CLI * [iam](#constellation-iam): Work with the IAM configuration on your cloud provider * [create](#constellation-iam-create): Create IAM configuration on a cloud platform for your Constellation cluster * [aws](#constellation-iam-create-aws): Create IAM configuration on AWS for your Constellation cluster * [azure](#constellation-iam-create-azure): Create IAM configuration on Microsoft Azure for your Constellation cluster * [gcp](#constellation-iam-create-gcp): Create IAM configuration on GCP for your Constellation cluster * [destroy](#constellation-iam-destroy): Destroy an IAM configuration and delete local Terraform files -* [status](#constellation-status): show status of a Constellation cluster +* [version](#constellation-version): Display version of this CLI ## constellation config @@ -57,7 +57,7 @@ Work with the Constellation configuration file. --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation config generate @@ -87,7 +87,7 @@ constellation config generate {aws|azure|gcp|openstack|qemu|stackit} [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation config fetch-measurements @@ -118,7 +118,7 @@ constellation config fetch-measurements [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation config instance-types @@ -145,7 +145,7 @@ constellation config instance-types [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation config kubernetes-versions @@ -172,7 +172,7 @@ constellation config kubernetes-versions [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation config migrate @@ -199,7 +199,7 @@ constellation config migrate [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation create @@ -229,7 +229,7 @@ constellation create [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation init @@ -261,7 +261,7 @@ constellation init [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation mini @@ -284,7 +284,7 @@ Manage MiniConstellation clusters. --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation mini up @@ -314,7 +314,7 @@ constellation mini up [flags] ``` --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation mini down @@ -342,7 +342,36 @@ constellation mini down [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") +``` + +## constellation status + +Show status of a Constellation cluster + +### Synopsis + +Show the status of a constellation cluster. + +Shows microservice, image, and Kubernetes versions installed in the cluster. Also shows status of current version upgrades. + +``` +constellation status [flags] +``` + +### Options + +``` + -h, --help help for status +``` + +### Options inherited from parent commands + +``` + --config string path to the configuration file (default "constellation-conf.yaml") + --debug enable debug logging + --force disable version compatibility checks - might result in corrupted clusters + --tf-log string Terraform log level (default "NONE") ``` ## constellation verify @@ -351,7 +380,8 @@ Verify the confidential properties of a Constellation cluster ### Synopsis -Verify the confidential properties of a Constellation cluster.\nIf arguments aren't specified, values are read from `constellation-id.json`. +Verify the confidential properties of a Constellation cluster. +If arguments aren't specified, values are read from `constellation-id.json`. ``` constellation verify [flags] @@ -372,7 +402,7 @@ constellation verify [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation upgrade @@ -395,7 +425,7 @@ Find and apply upgrades to your Constellation cluster. --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation upgrade check @@ -425,7 +455,7 @@ constellation upgrade check [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation upgrade apply @@ -455,7 +485,7 @@ constellation upgrade apply [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation recover @@ -486,7 +516,7 @@ constellation recover [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation terminate @@ -516,34 +546,7 @@ constellation terminate [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") -``` - -## constellation version - -Display version of this CLI - -### Synopsis - -Display version of this CLI. - -``` -constellation version [flags] -``` - -### Options - -``` - -h, --help help for version -``` - -### Options inherited from parent commands - -``` - --config string path to the configuration file (default "constellation-conf.yaml") - --debug enable debug logging - --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation iam @@ -566,7 +569,7 @@ Work with the IAM configuration on your cloud provider. --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation iam create @@ -581,7 +584,7 @@ Create IAM configuration on a cloud platform for your Constellation cluster. ``` -h, --help help for create - --update-config automatically update the config file with the specific IAM information + --update-config update the config file with the specific IAM information -y, --yes create the IAM configuration without further confirmation ``` @@ -591,7 +594,7 @@ Create IAM configuration on a cloud platform for your Constellation cluster. --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` ## constellation iam create aws @@ -611,8 +614,8 @@ constellation iam create aws [flags] ``` -h, --help help for aws --prefix string name prefix for all resources (required) - --zone string AWS availability zone the resources will be created in, e.g. us-east-2a (required) - Find available zones here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones. Note that we do not support every zone / region. You can find a list of all supported regions in our docs. + --zone string AWS availability zone the resources will be created in, e.g., us-east-2a (required) + See the Constellation docs for a list of currently supported regions. ``` ### Options inherited from parent commands @@ -621,8 +624,8 @@ constellation iam create aws [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") - --update-config automatically update the config file with the specific IAM information + --tf-log string Terraform log level (default "NONE") + --update-config update the config file with the specific IAM information -y, --yes create the IAM configuration without further confirmation ``` @@ -642,7 +645,7 @@ constellation iam create azure [flags] ``` -h, --help help for azure - --region string region the resources will be created in, e.g. westus (required) + --region string region the resources will be created in, e.g., westus (required) --resourceGroup string name prefix of the two resource groups your cluster / IAM resources will be created in (required) --servicePrincipal string name of the service principal that will be created (required) ``` @@ -653,8 +656,8 @@ constellation iam create azure [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") - --update-config automatically update the config file with the specific IAM information + --tf-log string Terraform log level (default "NONE") + --update-config update the config file with the specific IAM information -y, --yes create the IAM configuration without further confirmation ``` @@ -675,11 +678,11 @@ constellation iam create gcp [flags] ``` -h, --help help for gcp --projectID string ID of the GCP project the configuration will be created in (required) - Find it on the welcome screen of your project: https://console.cloud.google.com/welcome. + Find it on the welcome screen of your project: https://console.cloud.google.com/welcome --serviceAccountID string ID for the service account that will be created (required) - Must match ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$. + Must be 6 to 30 lowercase letters, digits, or hyphens. --zone string GCP zone the cluster will be deployed in (required) - Find a list of available zones here: https://cloud.google.com/compute/docs/regions-zones#available. + Find a list of available zones here: https://cloud.google.com/compute/docs/regions-zones#available ``` ### Options inherited from parent commands @@ -688,8 +691,8 @@ constellation iam create gcp [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") - --update-config automatically update the config file with the specific IAM information + --tf-log string Terraform log level (default "NONE") + --update-config update the config file with the specific IAM information -y, --yes create the IAM configuration without further confirmation ``` @@ -718,27 +721,25 @@ constellation iam destroy [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` -## constellation status +## constellation version -show status of a Constellation cluster +Display version of this CLI ### Synopsis -Show status of a constellation cluster. - -Shows microservice, image and Kubernetes versions installed in the cluster. Also show status of current version upgrades. +Display version of this CLI. ``` -constellation status [flags] +constellation version [flags] ``` ### Options ``` - -h, --help help for status + -h, --help help for version ``` ### Options inherited from parent commands @@ -747,6 +748,6 @@ constellation status [flags] --config string path to the configuration file (default "constellation-conf.yaml") --debug enable debug logging --force disable version compatibility checks - might result in corrupted clusters - --tf-log string sets the Terraform log level (default "NONE" - no logs) (default "NONE") + --tf-log string Terraform log level (default "NONE") ``` diff --git a/internal/config/config.go b/internal/config/config.go index 4e931091e..54fdfe649 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -77,13 +77,13 @@ type Config struct { // Microservice version to be installed into the cluster. Defaults to the version of the CLI. MicroserviceVersion string `yaml:"microserviceVersion" validate:"required,version_compatibility"` // description: | - // DON'T USE IN PRODUCTION: enable debug mode and use debug images. For usage, see: https://github.com/edgelesssys/constellation/blob/main/debugd/README.md + // DON'T USE IN PRODUCTION: enable debug mode and use debug images. DebugCluster *bool `yaml:"debugCluster" validate:"required"` // description: | // Supported cloud providers and their specific configurations. Provider ProviderConfig `yaml:"provider" validate:"dive"` // description: | - // Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee our docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation + // Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee the docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation Attestation AttestationConfig `yaml:"attestation" validate:"dive"` } @@ -123,7 +123,7 @@ type AWSConfig struct { // Type of a node's state disk. The type influences boot time and I/O performance. See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html StateDiskType string `yaml:"stateDiskType" validate:"oneof=standard gp2 gp3 st1 sc1 io1"` // description: | - // Name of the IAM profile to use for the control plane nodes. + // Name of the IAM profile to use for the control-plane nodes. IAMProfileControlPlane string `yaml:"iamProfileControlPlane" validate:"required"` // description: | // Name of the IAM profile to use for the worker nodes. @@ -280,7 +280,7 @@ type QEMUConfig struct { // if not required. type AttestationConfig struct { // description: | - // AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. Please see https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information. + // AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. See https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information. AWSSEVSNP *AWSSEVSNP `yaml:"awsSEVSNP,omitempty" validate:"omitempty,dive"` // description: | // AWS Nitro TPM attestation. diff --git a/internal/config/config_doc.go b/internal/config/config_doc.go index a6aaf00b3..5b22e5a8b 100644 --- a/internal/config/config_doc.go +++ b/internal/config/config_doc.go @@ -68,8 +68,8 @@ func init() { ConfigDoc.Fields[6].Name = "debugCluster" ConfigDoc.Fields[6].Type = "bool" ConfigDoc.Fields[6].Note = "" - ConfigDoc.Fields[6].Description = "DON'T USE IN PRODUCTION: enable debug mode and use debug images. For usage, see: https://github.com/edgelesssys/constellation/blob/main/debugd/README.md" - ConfigDoc.Fields[6].Comments[encoder.LineComment] = "DON'T USE IN PRODUCTION: enable debug mode and use debug images. For usage, see: https://github.com/edgelesssys/constellation/blob/main/debugd/README.md" + ConfigDoc.Fields[6].Description = "DON'T USE IN PRODUCTION: enable debug mode and use debug images." + ConfigDoc.Fields[6].Comments[encoder.LineComment] = "DON'T USE IN PRODUCTION: enable debug mode and use debug images." ConfigDoc.Fields[7].Name = "provider" ConfigDoc.Fields[7].Type = "ProviderConfig" ConfigDoc.Fields[7].Note = "" @@ -78,8 +78,8 @@ func init() { ConfigDoc.Fields[8].Name = "attestation" ConfigDoc.Fields[8].Type = "AttestationConfig" ConfigDoc.Fields[8].Note = "" - ConfigDoc.Fields[8].Description = "Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee our docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation" - ConfigDoc.Fields[8].Comments[encoder.LineComment] = "Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee our docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation" + ConfigDoc.Fields[8].Description = "Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee the docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation" + ConfigDoc.Fields[8].Comments[encoder.LineComment] = "Configuration for attestation validation. This configuration provides sensible defaults for the Constellation version it was created for.\nSee the docs for an overview on attestation: https://docs.edgeless.systems/constellation/architecture/attestation" ProviderConfigDoc.Type = "ProviderConfig" ProviderConfigDoc.Comments[encoder.LineComment] = "ProviderConfig are cloud-provider specific configuration values used by the CLI." @@ -150,8 +150,8 @@ func init() { AWSConfigDoc.Fields[4].Name = "iamProfileControlPlane" AWSConfigDoc.Fields[4].Type = "string" AWSConfigDoc.Fields[4].Note = "" - AWSConfigDoc.Fields[4].Description = "Name of the IAM profile to use for the control plane nodes." - AWSConfigDoc.Fields[4].Comments[encoder.LineComment] = "Name of the IAM profile to use for the control plane nodes." + AWSConfigDoc.Fields[4].Description = "Name of the IAM profile to use for the control-plane nodes." + AWSConfigDoc.Fields[4].Comments[encoder.LineComment] = "Name of the IAM profile to use for the control-plane nodes." AWSConfigDoc.Fields[5].Name = "iamProfileWorkerNodes" AWSConfigDoc.Fields[5].Type = "string" AWSConfigDoc.Fields[5].Note = "" @@ -430,8 +430,8 @@ func init() { AttestationConfigDoc.Fields[0].Name = "awsSEVSNP" AttestationConfigDoc.Fields[0].Type = "AWSSEVSNP" AttestationConfigDoc.Fields[0].Note = "" - AttestationConfigDoc.Fields[0].Description = "AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. Please see https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information." - AttestationConfigDoc.Fields[0].Comments[encoder.LineComment] = "AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. Please see https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information." + AttestationConfigDoc.Fields[0].Description = "AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. See https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information." + AttestationConfigDoc.Fields[0].Comments[encoder.LineComment] = "AWS SEV-SNP attestation. WARNING: Attestation temporarily relies on AWS nitroTPM. See https://docs.edgeless.systems/constellation/workflows/config#choosing-a-vm-type for more information." AttestationConfigDoc.Fields[1].Name = "awsNitroTPM" AttestationConfigDoc.Fields[1].Type = "AWSNitroTPM" AttestationConfigDoc.Fields[1].Note = ""