Use our own normalizers for cmd examples and descriptions

This commit is contained in:
Fabiano Franz
2016-10-07 19:24:42 -03:00
parent 6f66c0eafa
commit f6d1ac72a0
58 changed files with 427 additions and 406 deletions

View File

@@ -25,7 +25,6 @@ import (
"github.com/golang/glog"
"github.com/renstrom/dedent"
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/api"
@@ -33,6 +32,7 @@ import (
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/kubectl"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
utilerrors "k8s.io/kubernetes/pkg/util/errors"
@@ -40,16 +40,16 @@ import (
)
var (
rollingUpdate_long = dedent.Dedent(`
rollingUpdate_long = templates.LongDesc(`
Perform a rolling update of the given ReplicationController.
Replaces the specified replication controller with a new replication controller by updating one pod at a time to use the
new PodTemplate. The new-controller.json must specify the same namespace as the
existing replication controller and overwrite at least one (common) label in its replicaSelector.
![Workflow](http://kubernetes.io/images/docs/kubectl_rollingupdate.svg)
`)
rollingUpdate_example = dedent.Dedent(`
![Workflow](http://kubernetes.io/images/docs/kubectl_rollingupdate.svg)`)
rollingUpdate_example = templates.Examples(`
# Update pods of frontend-v1 using new replication controller data in frontend-v2.json.
kubectl rolling-update frontend-v1 -f frontend-v2.json
@@ -64,8 +64,7 @@ var (
kubectl rolling-update frontend --image=image:v2
# Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2).
kubectl rolling-update frontend-v1 frontend-v2 --rollback
`)
kubectl rolling-update frontend-v1 frontend-v2 --rollback`)
)
var (