Improve kubectl apply format by removing misplaced message
* Improve kubectl apply format by removing misplaced message
Fixes
Also separate stderr messages with a new line
@@ -27,11 +27,9 @@ import (
)
const (
- okMessage = "You're on your way to upgrading Linkerd!"
controlPlaneMessage = "Don't forget to run `linkerd upgrade control-plane`!"
- visitMessage = "Visit this URL for further instructions: https://linkerd.io/upgrade/#nextsteps"
failMessage = "For troubleshooting help, visit: https://linkerd.io/upgrade/#troubleshooting\n"
- trustAnchorChangeMessage = "Rotating the trust anchors will affect existing proxies\nSee https://linkerd.io/2/tasks/rotating_identity_certificates/ for more information"
+ trustRootChangeMessage = "Rotating the trust anchors will affect existing proxies\nSee https://linkerd.io/2/tasks/rotating_identity_certificates/ for more information"
)
type upgradeOptions struct {
@@ -194,17 +192,15 @@ func upgradeRunE(options *upgradeOptions, stage string, flags *pflag.FlagSet) er
upgradeErrorf("Could not render upgrade configuration: %s", err)
}
- buf.WriteTo(os.Stdout)
-
if options.identityOptions.trustPEMFile != "" {
- fmt.Fprintf(os.Stderr, "\n%s %s\n", warnStatus, trustAnchorChangeMessage)
+ fmt.Fprintf(os.Stderr, "\n%s %s\n\n", warnStatus, trustRootChangeMessage)
}
- fmt.Fprintf(os.Stderr, "\n%s %s\n", okStatus, okMessage)
if stage == configStage {
- fmt.Fprintf(os.Stderr, "%s\n", controlPlaneMessage)
+ fmt.Fprintf(os.Stderr, "%s\n\n", controlPlaneMessage)
}
- fmt.Fprintf(os.Stderr, "%s\n\n", visitMessage)
+
+ buf.WriteTo(os.Stdout)
return nil
}
