cli: improve user warning / information (#1933)

* print success

* warn when debug img but !debugCluster

* malte feedback

* rename to IsNamedLikeDebugImage
This commit is contained in:
Adrian Stobbe 2023-06-19 16:51:39 +02:00 committed by GitHub
parent 2808012c9c
commit be4a636361
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 0 deletions

View file

@ -91,6 +91,11 @@ func (c *createCmd) create(cmd *cobra.Command, creator cloudCreator, fileHandler
printedAWarning = true
}
if conf.IsNamedLikeDebugImage() && !conf.IsDebugCluster() {
cmd.PrintErrln("WARNING: A debug image is used but debugCluster is false.")
printedAWarning = true
}
if conf.IsDebugCluster() {
cmd.PrintErrln("WARNING: Creating a debug cluster. This cluster is not secure and should only be used for debugging purposes.")
cmd.PrintErrln("DO NOT USE THIS CLUSTER IN PRODUCTION.")