write to config

This commit is contained in:
miampf 2024-04-11 14:49:25 +02:00
parent d25a12f6c7
commit 9e316cdc64
No known key found for this signature in database
GPG key ID: EF039364B5B6886C
2 changed files with 4 additions and 0 deletions

View file

@ -107,6 +107,7 @@ func (cg *configGenerateCmd) configGenerate(cmd *cobra.Command, fileHandler file
return fmt.Errorf("creating config: %w", err)
}
conf.KubernetesVersion = cg.flags.k8sVersion
conf.Tags = cg.flags.tags
cg.log.Debug("Writing YAML data to configuration file")
if err := fileHandler.WriteYAML(constants.ConfigFilename, conf, file.OptMkdirAll); err != nil {
return fmt.Errorf("writing config file: %w", err)

View file

@ -73,6 +73,9 @@ type Config struct {
// description: |
// Microservice version to be installed into the cluster. Defaults to the version of the CLI.
MicroserviceVersion semver.Semver `yaml:"microserviceVersion" validate:"required"`
// description : |
// Custom tags to be applied to created cloud resources.
Tags cloudprovider.Tags `yaml:"tags" validate:"omitempty"`
// description: |
// DON'T USE IN PRODUCTION: enable debug mode and use debug images.
DebugCluster *bool `yaml:"debugCluster" validate:"required"`