mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline is prepended to output, which will alter the yaml output. Here we use dedent to format the code to match the output. hack/update-generated-docs.sh has been run and the affected files have been added. Note: for describe.go we added a period to the end of an output message.
This commit is contained in:
@@ -19,6 +19,7 @@ package rollout
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/renstrom/dedent"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/meta"
|
||||
@@ -42,17 +43,19 @@ type PauseConfig struct {
|
||||
Recursive bool
|
||||
}
|
||||
|
||||
const (
|
||||
pause_long = `Mark the provided resource as paused
|
||||
var (
|
||||
pause_long = dedent.Dedent(`
|
||||
Mark the provided resource as paused
|
||||
|
||||
Paused resources will not be reconciled by a controller.
|
||||
Use \"kubectl rollout resume\" to resume a paused resource.
|
||||
Currently only deployments support being paused.`
|
||||
Paused resources will not be reconciled by a controller.
|
||||
Use \"kubectl rollout resume\" to resume a paused resource.
|
||||
Currently only deployments support being paused.`)
|
||||
|
||||
pause_example = `# Mark the nginx deployment as paused. Any current state of
|
||||
# the deployment will continue its function, new updates to the deployment will not
|
||||
# have an effect as long as the deployment is paused.
|
||||
kubectl rollout pause deployment/nginx`
|
||||
pause_example = dedent.Dedent(`
|
||||
# Mark the nginx deployment as paused. Any current state of
|
||||
# the deployment will continue its function, new updates to the deployment will not
|
||||
# have an effect as long as the deployment is paused.
|
||||
kubectl rollout pause deployment/nginx`)
|
||||
)
|
||||
|
||||
func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
|
||||
Reference in New Issue
Block a user