Browse code

Merge pull request #8927 from kargakis/oc-rollout

Merged by openshift-bot

OpenShift Bot authored on 2016/07/01 22:07:01
Showing 40 changed files
... ...
@@ -68,7 +68,7 @@ func RunHistory(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []st
68 68
 	if len(args) == 0 && len(options.Filenames) == 0 {
69 69
 		return cmdutil.UsageError(cmd, "Required resource not specified.")
70 70
 	}
71
-	revisionDetail := cmdutil.GetFlagInt64(cmd, "revision")
71
+	revision := cmdutil.GetFlagInt64(cmd, "revision")
72 72
 
73 73
 	mapper, typer := f.Object(false)
74 74
 
... ...
@@ -97,29 +97,18 @@ func RunHistory(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []st
97 97
 			errs = append(errs, err)
98 98
 			continue
99 99
 		}
100
-		historyInfo, err := historyViewer.History(info.Namespace, info.Name)
100
+		historyInfo, err := historyViewer.ViewHistory(info.Namespace, info.Name, revision)
101 101
 		if err != nil {
102 102
 			errs = append(errs, err)
103 103
 			continue
104 104
 		}
105 105
 
106
-		if revisionDetail > 0 {
107
-			// Print details of a specific revision
108
-			template, ok := historyInfo.RevisionToTemplate[revisionDetail]
109
-			if !ok {
110
-				return fmt.Errorf("unable to find revision %d of %s %q", revisionDetail, mapping.Resource, info.Name)
111
-			}
112
-			fmt.Fprintf(out, "%s %q revision %d\n", mapping.Resource, info.Name, revisionDetail)
113
-			kubectl.DescribePodTemplate(template, out)
114
-		} else {
115
-			// Print all revisions
116
-			formattedOutput, printErr := kubectl.PrintRolloutHistory(historyInfo, mapping.Resource, info.Name)
117
-			if printErr != nil {
118
-				errs = append(errs, printErr)
119
-				continue
120
-			}
121
-			fmt.Fprintf(out, "%s\n", formattedOutput)
106
+		header := fmt.Sprintf("%s %q history viewed", mapping.Resource, info.Name)
107
+		if revision > 0 {
108
+			header = fmt.Sprintf("%s (revision: %d)", header, revision)
122 109
 		}
110
+		fmt.Fprintf(out, "%s\n", header)
111
+		fmt.Fprintf(out, "%s\n", historyInfo)
123 112
 	}
124 113
 
125 114
 	return errors.NewAggregate(errs)
... ...
@@ -17,6 +17,7 @@ limitations under the License.
17 17
 package kubectl
18 18
 
19 19
 import (
20
+	"bytes"
20 21
 	"fmt"
21 22
 	"io"
22 23
 	"sort"
... ...
@@ -36,9 +37,9 @@ const (
36 36
 	ChangeCauseAnnotation = "kubernetes.io/change-cause"
37 37
 )
38 38
 
39
-// HistoryViewer provides an interface for resources that can be rolled back.
39
+// HistoryViewer provides an interface for resources that have historical information.
40 40
 type HistoryViewer interface {
41
-	History(namespace, name string) (HistoryInfo, error)
41
+	ViewHistory(namespace, name string, revision int64) (string, error)
42 42
 }
43 43
 
44 44
 func HistoryViewerFor(kind unversioned.GroupKind, c clientset.Interface) (HistoryViewer, error) {
... ...
@@ -49,65 +50,64 @@ func HistoryViewerFor(kind unversioned.GroupKind, c clientset.Interface) (Histor
49 49
 	return nil, fmt.Errorf("no history viewer has been implemented for %q", kind)
50 50
 }
51 51
 
52
-// HistoryInfo stores the mapping from revision to podTemplate;
53
-// note that change-cause annotation should be copied to podTemplate
54
-type HistoryInfo struct {
55
-	RevisionToTemplate map[int64]*api.PodTemplateSpec
56
-}
57
-
58 52
 type DeploymentHistoryViewer struct {
59 53
 	c clientset.Interface
60 54
 }
61 55
 
62
-// History returns a revision-to-replicaset map as the revision history of a deployment
63
-func (h *DeploymentHistoryViewer) History(namespace, name string) (HistoryInfo, error) {
64
-	historyInfo := HistoryInfo{
65
-		RevisionToTemplate: make(map[int64]*api.PodTemplateSpec),
66
-	}
56
+// ViewHistory prints the revision history of a deployment
57
+func (h *DeploymentHistoryViewer) ViewHistory(namespace, name string, revision int64) (string, error) {
67 58
 	deployment, err := h.c.Extensions().Deployments(namespace).Get(name)
68 59
 	if err != nil {
69
-		return historyInfo, fmt.Errorf("failed to retrieve deployment %s: %v", name, err)
60
+		return "", fmt.Errorf("failed to retrieve deployment %s: %v", name, err)
70 61
 	}
71 62
 	_, allOldRSs, err := deploymentutil.GetOldReplicaSets(deployment, h.c)
72 63
 	if err != nil {
73
-		return historyInfo, fmt.Errorf("failed to retrieve old replica sets from deployment %s: %v", name, err)
64
+		return "", fmt.Errorf("failed to retrieve old replica sets from deployment %s: %v", name, err)
74 65
 	}
75 66
 	newRS, err := deploymentutil.GetNewReplicaSet(deployment, h.c)
76 67
 	if err != nil {
77
-		return historyInfo, fmt.Errorf("failed to retrieve new replica set from deployment %s: %v", name, err)
68
+		return "", fmt.Errorf("failed to retrieve new replica set from deployment %s: %v", name, err)
78 69
 	}
79
-	allRSs := append(allOldRSs, newRS)
80
-	for _, rs := range allRSs {
70
+
71
+	historyInfo := make(map[int64]*api.PodTemplateSpec)
72
+	for _, rs := range append(allOldRSs, newRS) {
81 73
 		v, err := deploymentutil.Revision(rs)
82 74
 		if err != nil {
83 75
 			continue
84 76
 		}
85
-		historyInfo.RevisionToTemplate[v] = &rs.Spec.Template
77
+		historyInfo[v] = &rs.Spec.Template
86 78
 		changeCause := getChangeCause(rs)
87
-		if historyInfo.RevisionToTemplate[v].Annotations == nil {
88
-			historyInfo.RevisionToTemplate[v].Annotations = make(map[string]string)
79
+		if historyInfo[v].Annotations == nil {
80
+			historyInfo[v].Annotations = make(map[string]string)
89 81
 		}
90 82
 		if len(changeCause) > 0 {
91
-			historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause
83
+			historyInfo[v].Annotations[ChangeCauseAnnotation] = changeCause
92 84
 		}
93 85
 	}
94
-	return historyInfo, nil
95
-}
96 86
 
97
-// PrintRolloutHistory prints a formatted table of the input revision history of the deployment
98
-func PrintRolloutHistory(historyInfo HistoryInfo, resource, name string) (string, error) {
99
-	if len(historyInfo.RevisionToTemplate) == 0 {
100
-		return fmt.Sprintf("No rollout history found in %s %q", resource, name), nil
87
+	if len(historyInfo) == 0 {
88
+		return "No rollout history found.", nil
101 89
 	}
90
+
91
+	if revision > 0 {
92
+		// Print details of a specific revision
93
+		template, ok := historyInfo[revision]
94
+		if !ok {
95
+			return "", fmt.Errorf("unable to find the specified revision")
96
+		}
97
+		buf := bytes.NewBuffer([]byte{})
98
+		DescribePodTemplate(template, buf)
99
+		return buf.String(), nil
100
+	}
101
+
102 102
 	// Sort the revisionToChangeCause map by revision
103 103
 	var revisions []string
104
-	for k := range historyInfo.RevisionToTemplate {
104
+	for k := range historyInfo {
105 105
 		revisions = append(revisions, strconv.FormatInt(k, 10))
106 106
 	}
107 107
 	sort.Strings(revisions)
108 108
 
109 109
 	return tabbedString(func(out io.Writer) error {
110
-		fmt.Fprintf(out, "%s %q:\n", resource, name)
111 110
 		fmt.Fprintf(out, "REVISION\tCHANGE-CAUSE\n")
112 111
 		errs := []error{}
113 112
 		for _, r := range revisions {
... ...
@@ -117,7 +117,7 @@ func PrintRolloutHistory(historyInfo HistoryInfo, resource, name string) (string
117 117
 				errs = append(errs, err)
118 118
 				continue
119 119
 			}
120
-			changeCause := historyInfo.RevisionToTemplate[r64].Annotations[ChangeCauseAnnotation]
120
+			changeCause := historyInfo[r64].Annotations[ChangeCauseAnnotation]
121 121
 			if len(changeCause) == 0 {
122 122
 				changeCause = "<none>"
123 123
 			}
... ...
@@ -877,6 +877,254 @@ _oc_cluster()
877 877
     noun_aliases=()
878 878
 }
879 879
 
880
+_oc_rollout_history()
881
+{
882
+    last_command="oc_rollout_history"
883
+    commands=()
884
+
885
+    flags=()
886
+    two_word_flags=()
887
+    flags_with_completion=()
888
+    flags_completion=()
889
+
890
+    flags+=("--filename=")
891
+    flags_with_completion+=("--filename")
892
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
893
+    two_word_flags+=("-f")
894
+    flags_with_completion+=("-f")
895
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
896
+    flags+=("--recursive")
897
+    flags+=("-R")
898
+    flags+=("--revision=")
899
+    flags+=("--api-version=")
900
+    flags+=("--as=")
901
+    flags+=("--certificate-authority=")
902
+    flags_with_completion+=("--certificate-authority")
903
+    flags_completion+=("_filedir")
904
+    flags+=("--client-certificate=")
905
+    flags_with_completion+=("--client-certificate")
906
+    flags_completion+=("_filedir")
907
+    flags+=("--client-key=")
908
+    flags_with_completion+=("--client-key")
909
+    flags_completion+=("_filedir")
910
+    flags+=("--cluster=")
911
+    flags+=("--config=")
912
+    flags_with_completion+=("--config")
913
+    flags_completion+=("_filedir")
914
+    flags+=("--context=")
915
+    flags+=("--insecure-skip-tls-verify")
916
+    flags+=("--log-flush-frequency=")
917
+    flags+=("--loglevel=")
918
+    flags+=("--logspec=")
919
+    flags+=("--match-server-version")
920
+    flags+=("--namespace=")
921
+    two_word_flags+=("-n")
922
+    flags+=("--server=")
923
+    flags+=("--token=")
924
+    flags+=("--user=")
925
+
926
+    must_have_one_flag=()
927
+    must_have_one_noun=()
928
+    noun_aliases=()
929
+}
930
+
931
+_oc_rollout_pause()
932
+{
933
+    last_command="oc_rollout_pause"
934
+    commands=()
935
+
936
+    flags=()
937
+    two_word_flags=()
938
+    flags_with_completion=()
939
+    flags_completion=()
940
+
941
+    flags+=("--filename=")
942
+    flags_with_completion+=("--filename")
943
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
944
+    two_word_flags+=("-f")
945
+    flags_with_completion+=("-f")
946
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
947
+    flags+=("--recursive")
948
+    flags+=("-R")
949
+    flags+=("--api-version=")
950
+    flags+=("--as=")
951
+    flags+=("--certificate-authority=")
952
+    flags_with_completion+=("--certificate-authority")
953
+    flags_completion+=("_filedir")
954
+    flags+=("--client-certificate=")
955
+    flags_with_completion+=("--client-certificate")
956
+    flags_completion+=("_filedir")
957
+    flags+=("--client-key=")
958
+    flags_with_completion+=("--client-key")
959
+    flags_completion+=("_filedir")
960
+    flags+=("--cluster=")
961
+    flags+=("--config=")
962
+    flags_with_completion+=("--config")
963
+    flags_completion+=("_filedir")
964
+    flags+=("--context=")
965
+    flags+=("--insecure-skip-tls-verify")
966
+    flags+=("--log-flush-frequency=")
967
+    flags+=("--loglevel=")
968
+    flags+=("--logspec=")
969
+    flags+=("--match-server-version")
970
+    flags+=("--namespace=")
971
+    two_word_flags+=("-n")
972
+    flags+=("--server=")
973
+    flags+=("--token=")
974
+    flags+=("--user=")
975
+
976
+    must_have_one_flag=()
977
+    must_have_one_noun=()
978
+    noun_aliases=()
979
+}
980
+
981
+_oc_rollout_resume()
982
+{
983
+    last_command="oc_rollout_resume"
984
+    commands=()
985
+
986
+    flags=()
987
+    two_word_flags=()
988
+    flags_with_completion=()
989
+    flags_completion=()
990
+
991
+    flags+=("--filename=")
992
+    flags_with_completion+=("--filename")
993
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
994
+    two_word_flags+=("-f")
995
+    flags_with_completion+=("-f")
996
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
997
+    flags+=("--recursive")
998
+    flags+=("-R")
999
+    flags+=("--api-version=")
1000
+    flags+=("--as=")
1001
+    flags+=("--certificate-authority=")
1002
+    flags_with_completion+=("--certificate-authority")
1003
+    flags_completion+=("_filedir")
1004
+    flags+=("--client-certificate=")
1005
+    flags_with_completion+=("--client-certificate")
1006
+    flags_completion+=("_filedir")
1007
+    flags+=("--client-key=")
1008
+    flags_with_completion+=("--client-key")
1009
+    flags_completion+=("_filedir")
1010
+    flags+=("--cluster=")
1011
+    flags+=("--config=")
1012
+    flags_with_completion+=("--config")
1013
+    flags_completion+=("_filedir")
1014
+    flags+=("--context=")
1015
+    flags+=("--insecure-skip-tls-verify")
1016
+    flags+=("--log-flush-frequency=")
1017
+    flags+=("--loglevel=")
1018
+    flags+=("--logspec=")
1019
+    flags+=("--match-server-version")
1020
+    flags+=("--namespace=")
1021
+    two_word_flags+=("-n")
1022
+    flags+=("--server=")
1023
+    flags+=("--token=")
1024
+    flags+=("--user=")
1025
+
1026
+    must_have_one_flag=()
1027
+    must_have_one_noun=()
1028
+    noun_aliases=()
1029
+}
1030
+
1031
+_oc_rollout_undo()
1032
+{
1033
+    last_command="oc_rollout_undo"
1034
+    commands=()
1035
+
1036
+    flags=()
1037
+    two_word_flags=()
1038
+    flags_with_completion=()
1039
+    flags_completion=()
1040
+
1041
+    flags+=("--filename=")
1042
+    flags_with_completion+=("--filename")
1043
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1044
+    two_word_flags+=("-f")
1045
+    flags_with_completion+=("-f")
1046
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1047
+    flags+=("--recursive")
1048
+    flags+=("-R")
1049
+    flags+=("--to-revision=")
1050
+    flags+=("--api-version=")
1051
+    flags+=("--as=")
1052
+    flags+=("--certificate-authority=")
1053
+    flags_with_completion+=("--certificate-authority")
1054
+    flags_completion+=("_filedir")
1055
+    flags+=("--client-certificate=")
1056
+    flags_with_completion+=("--client-certificate")
1057
+    flags_completion+=("_filedir")
1058
+    flags+=("--client-key=")
1059
+    flags_with_completion+=("--client-key")
1060
+    flags_completion+=("_filedir")
1061
+    flags+=("--cluster=")
1062
+    flags+=("--config=")
1063
+    flags_with_completion+=("--config")
1064
+    flags_completion+=("_filedir")
1065
+    flags+=("--context=")
1066
+    flags+=("--insecure-skip-tls-verify")
1067
+    flags+=("--log-flush-frequency=")
1068
+    flags+=("--loglevel=")
1069
+    flags+=("--logspec=")
1070
+    flags+=("--match-server-version")
1071
+    flags+=("--namespace=")
1072
+    two_word_flags+=("-n")
1073
+    flags+=("--server=")
1074
+    flags+=("--token=")
1075
+    flags+=("--user=")
1076
+
1077
+    must_have_one_flag=()
1078
+    must_have_one_noun=()
1079
+    noun_aliases=()
1080
+}
1081
+
1082
+_oc_rollout()
1083
+{
1084
+    last_command="oc_rollout"
1085
+    commands=()
1086
+    commands+=("history")
1087
+    commands+=("pause")
1088
+    commands+=("resume")
1089
+    commands+=("undo")
1090
+
1091
+    flags=()
1092
+    two_word_flags=()
1093
+    flags_with_completion=()
1094
+    flags_completion=()
1095
+
1096
+    flags+=("--api-version=")
1097
+    flags+=("--as=")
1098
+    flags+=("--certificate-authority=")
1099
+    flags_with_completion+=("--certificate-authority")
1100
+    flags_completion+=("_filedir")
1101
+    flags+=("--client-certificate=")
1102
+    flags_with_completion+=("--client-certificate")
1103
+    flags_completion+=("_filedir")
1104
+    flags+=("--client-key=")
1105
+    flags_with_completion+=("--client-key")
1106
+    flags_completion+=("_filedir")
1107
+    flags+=("--cluster=")
1108
+    flags+=("--config=")
1109
+    flags_with_completion+=("--config")
1110
+    flags_completion+=("_filedir")
1111
+    flags+=("--context=")
1112
+    flags+=("--insecure-skip-tls-verify")
1113
+    flags+=("--log-flush-frequency=")
1114
+    flags+=("--loglevel=")
1115
+    flags+=("--logspec=")
1116
+    flags+=("--match-server-version")
1117
+    flags+=("--namespace=")
1118
+    two_word_flags+=("-n")
1119
+    flags+=("--server=")
1120
+    flags+=("--token=")
1121
+    flags+=("--user=")
1122
+
1123
+    must_have_one_flag=()
1124
+    must_have_one_noun=()
1125
+    noun_aliases=()
1126
+}
1127
+
880 1128
 _oc_deploy()
881 1129
 {
882 1130
     last_command="oc_deploy"
... ...
@@ -10143,6 +10391,7 @@ _oc()
10143 10143
     commands+=("projects")
10144 10144
     commands+=("explain")
10145 10145
     commands+=("cluster")
10146
+    commands+=("rollout")
10146 10147
     commands+=("deploy")
10147 10148
     commands+=("rollback")
10148 10149
     commands+=("new-build")
... ...
@@ -4945,6 +4945,259 @@ _openshift_cli_cluster()
4945 4945
     noun_aliases=()
4946 4946
 }
4947 4947
 
4948
+_openshift_cli_rollout_history()
4949
+{
4950
+    last_command="openshift_cli_rollout_history"
4951
+    commands=()
4952
+
4953
+    flags=()
4954
+    two_word_flags=()
4955
+    flags_with_completion=()
4956
+    flags_completion=()
4957
+
4958
+    flags+=("--filename=")
4959
+    flags_with_completion+=("--filename")
4960
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
4961
+    two_word_flags+=("-f")
4962
+    flags_with_completion+=("-f")
4963
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
4964
+    flags+=("--recursive")
4965
+    flags+=("-R")
4966
+    flags+=("--revision=")
4967
+    flags+=("--api-version=")
4968
+    flags+=("--as=")
4969
+    flags+=("--certificate-authority=")
4970
+    flags_with_completion+=("--certificate-authority")
4971
+    flags_completion+=("_filedir")
4972
+    flags+=("--client-certificate=")
4973
+    flags_with_completion+=("--client-certificate")
4974
+    flags_completion+=("_filedir")
4975
+    flags+=("--client-key=")
4976
+    flags_with_completion+=("--client-key")
4977
+    flags_completion+=("_filedir")
4978
+    flags+=("--cluster=")
4979
+    flags+=("--config=")
4980
+    flags_with_completion+=("--config")
4981
+    flags_completion+=("_filedir")
4982
+    flags+=("--context=")
4983
+    flags+=("--google-json-key=")
4984
+    flags+=("--insecure-skip-tls-verify")
4985
+    flags+=("--log-flush-frequency=")
4986
+    flags+=("--loglevel=")
4987
+    flags+=("--logspec=")
4988
+    flags+=("--match-server-version")
4989
+    flags+=("--namespace=")
4990
+    two_word_flags+=("-n")
4991
+    flags+=("--server=")
4992
+    flags+=("--token=")
4993
+    flags+=("--user=")
4994
+
4995
+    must_have_one_flag=()
4996
+    must_have_one_noun=()
4997
+    noun_aliases=()
4998
+}
4999
+
5000
+_openshift_cli_rollout_pause()
5001
+{
5002
+    last_command="openshift_cli_rollout_pause"
5003
+    commands=()
5004
+
5005
+    flags=()
5006
+    two_word_flags=()
5007
+    flags_with_completion=()
5008
+    flags_completion=()
5009
+
5010
+    flags+=("--filename=")
5011
+    flags_with_completion+=("--filename")
5012
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5013
+    two_word_flags+=("-f")
5014
+    flags_with_completion+=("-f")
5015
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5016
+    flags+=("--recursive")
5017
+    flags+=("-R")
5018
+    flags+=("--api-version=")
5019
+    flags+=("--as=")
5020
+    flags+=("--certificate-authority=")
5021
+    flags_with_completion+=("--certificate-authority")
5022
+    flags_completion+=("_filedir")
5023
+    flags+=("--client-certificate=")
5024
+    flags_with_completion+=("--client-certificate")
5025
+    flags_completion+=("_filedir")
5026
+    flags+=("--client-key=")
5027
+    flags_with_completion+=("--client-key")
5028
+    flags_completion+=("_filedir")
5029
+    flags+=("--cluster=")
5030
+    flags+=("--config=")
5031
+    flags_with_completion+=("--config")
5032
+    flags_completion+=("_filedir")
5033
+    flags+=("--context=")
5034
+    flags+=("--google-json-key=")
5035
+    flags+=("--insecure-skip-tls-verify")
5036
+    flags+=("--log-flush-frequency=")
5037
+    flags+=("--loglevel=")
5038
+    flags+=("--logspec=")
5039
+    flags+=("--match-server-version")
5040
+    flags+=("--namespace=")
5041
+    two_word_flags+=("-n")
5042
+    flags+=("--server=")
5043
+    flags+=("--token=")
5044
+    flags+=("--user=")
5045
+
5046
+    must_have_one_flag=()
5047
+    must_have_one_noun=()
5048
+    noun_aliases=()
5049
+}
5050
+
5051
+_openshift_cli_rollout_resume()
5052
+{
5053
+    last_command="openshift_cli_rollout_resume"
5054
+    commands=()
5055
+
5056
+    flags=()
5057
+    two_word_flags=()
5058
+    flags_with_completion=()
5059
+    flags_completion=()
5060
+
5061
+    flags+=("--filename=")
5062
+    flags_with_completion+=("--filename")
5063
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5064
+    two_word_flags+=("-f")
5065
+    flags_with_completion+=("-f")
5066
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5067
+    flags+=("--recursive")
5068
+    flags+=("-R")
5069
+    flags+=("--api-version=")
5070
+    flags+=("--as=")
5071
+    flags+=("--certificate-authority=")
5072
+    flags_with_completion+=("--certificate-authority")
5073
+    flags_completion+=("_filedir")
5074
+    flags+=("--client-certificate=")
5075
+    flags_with_completion+=("--client-certificate")
5076
+    flags_completion+=("_filedir")
5077
+    flags+=("--client-key=")
5078
+    flags_with_completion+=("--client-key")
5079
+    flags_completion+=("_filedir")
5080
+    flags+=("--cluster=")
5081
+    flags+=("--config=")
5082
+    flags_with_completion+=("--config")
5083
+    flags_completion+=("_filedir")
5084
+    flags+=("--context=")
5085
+    flags+=("--google-json-key=")
5086
+    flags+=("--insecure-skip-tls-verify")
5087
+    flags+=("--log-flush-frequency=")
5088
+    flags+=("--loglevel=")
5089
+    flags+=("--logspec=")
5090
+    flags+=("--match-server-version")
5091
+    flags+=("--namespace=")
5092
+    two_word_flags+=("-n")
5093
+    flags+=("--server=")
5094
+    flags+=("--token=")
5095
+    flags+=("--user=")
5096
+
5097
+    must_have_one_flag=()
5098
+    must_have_one_noun=()
5099
+    noun_aliases=()
5100
+}
5101
+
5102
+_openshift_cli_rollout_undo()
5103
+{
5104
+    last_command="openshift_cli_rollout_undo"
5105
+    commands=()
5106
+
5107
+    flags=()
5108
+    two_word_flags=()
5109
+    flags_with_completion=()
5110
+    flags_completion=()
5111
+
5112
+    flags+=("--filename=")
5113
+    flags_with_completion+=("--filename")
5114
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5115
+    two_word_flags+=("-f")
5116
+    flags_with_completion+=("-f")
5117
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5118
+    flags+=("--recursive")
5119
+    flags+=("-R")
5120
+    flags+=("--to-revision=")
5121
+    flags+=("--api-version=")
5122
+    flags+=("--as=")
5123
+    flags+=("--certificate-authority=")
5124
+    flags_with_completion+=("--certificate-authority")
5125
+    flags_completion+=("_filedir")
5126
+    flags+=("--client-certificate=")
5127
+    flags_with_completion+=("--client-certificate")
5128
+    flags_completion+=("_filedir")
5129
+    flags+=("--client-key=")
5130
+    flags_with_completion+=("--client-key")
5131
+    flags_completion+=("_filedir")
5132
+    flags+=("--cluster=")
5133
+    flags+=("--config=")
5134
+    flags_with_completion+=("--config")
5135
+    flags_completion+=("_filedir")
5136
+    flags+=("--context=")
5137
+    flags+=("--google-json-key=")
5138
+    flags+=("--insecure-skip-tls-verify")
5139
+    flags+=("--log-flush-frequency=")
5140
+    flags+=("--loglevel=")
5141
+    flags+=("--logspec=")
5142
+    flags+=("--match-server-version")
5143
+    flags+=("--namespace=")
5144
+    two_word_flags+=("-n")
5145
+    flags+=("--server=")
5146
+    flags+=("--token=")
5147
+    flags+=("--user=")
5148
+
5149
+    must_have_one_flag=()
5150
+    must_have_one_noun=()
5151
+    noun_aliases=()
5152
+}
5153
+
5154
+_openshift_cli_rollout()
5155
+{
5156
+    last_command="openshift_cli_rollout"
5157
+    commands=()
5158
+    commands+=("history")
5159
+    commands+=("pause")
5160
+    commands+=("resume")
5161
+    commands+=("undo")
5162
+
5163
+    flags=()
5164
+    two_word_flags=()
5165
+    flags_with_completion=()
5166
+    flags_completion=()
5167
+
5168
+    flags+=("--api-version=")
5169
+    flags+=("--as=")
5170
+    flags+=("--certificate-authority=")
5171
+    flags_with_completion+=("--certificate-authority")
5172
+    flags_completion+=("_filedir")
5173
+    flags+=("--client-certificate=")
5174
+    flags_with_completion+=("--client-certificate")
5175
+    flags_completion+=("_filedir")
5176
+    flags+=("--client-key=")
5177
+    flags_with_completion+=("--client-key")
5178
+    flags_completion+=("_filedir")
5179
+    flags+=("--cluster=")
5180
+    flags+=("--config=")
5181
+    flags_with_completion+=("--config")
5182
+    flags_completion+=("_filedir")
5183
+    flags+=("--context=")
5184
+    flags+=("--google-json-key=")
5185
+    flags+=("--insecure-skip-tls-verify")
5186
+    flags+=("--log-flush-frequency=")
5187
+    flags+=("--loglevel=")
5188
+    flags+=("--logspec=")
5189
+    flags+=("--match-server-version")
5190
+    flags+=("--namespace=")
5191
+    two_word_flags+=("-n")
5192
+    flags+=("--server=")
5193
+    flags+=("--token=")
5194
+    flags+=("--user=")
5195
+
5196
+    must_have_one_flag=()
5197
+    must_have_one_noun=()
5198
+    noun_aliases=()
5199
+}
5200
+
4948 5201
 _openshift_cli_deploy()
4949 5202
 {
4950 5203
     last_command="openshift_cli_deploy"
... ...
@@ -14331,6 +14584,7 @@ _openshift_cli()
14331 14331
     commands+=("projects")
14332 14332
     commands+=("explain")
14333 14333
     commands+=("cluster")
14334
+    commands+=("rollout")
14334 14335
     commands+=("deploy")
14335 14336
     commands+=("rollback")
14336 14337
     commands+=("new-build")
... ...
@@ -1038,6 +1038,254 @@ _oc_cluster()
1038 1038
     noun_aliases=()
1039 1039
 }
1040 1040
 
1041
+_oc_rollout_history()
1042
+{
1043
+    last_command="oc_rollout_history"
1044
+    commands=()
1045
+
1046
+    flags=()
1047
+    two_word_flags=()
1048
+    flags_with_completion=()
1049
+    flags_completion=()
1050
+
1051
+    flags+=("--filename=")
1052
+    flags_with_completion+=("--filename")
1053
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1054
+    two_word_flags+=("-f")
1055
+    flags_with_completion+=("-f")
1056
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1057
+    flags+=("--recursive")
1058
+    flags+=("-R")
1059
+    flags+=("--revision=")
1060
+    flags+=("--api-version=")
1061
+    flags+=("--as=")
1062
+    flags+=("--certificate-authority=")
1063
+    flags_with_completion+=("--certificate-authority")
1064
+    flags_completion+=("_filedir")
1065
+    flags+=("--client-certificate=")
1066
+    flags_with_completion+=("--client-certificate")
1067
+    flags_completion+=("_filedir")
1068
+    flags+=("--client-key=")
1069
+    flags_with_completion+=("--client-key")
1070
+    flags_completion+=("_filedir")
1071
+    flags+=("--cluster=")
1072
+    flags+=("--config=")
1073
+    flags_with_completion+=("--config")
1074
+    flags_completion+=("_filedir")
1075
+    flags+=("--context=")
1076
+    flags+=("--insecure-skip-tls-verify")
1077
+    flags+=("--log-flush-frequency=")
1078
+    flags+=("--loglevel=")
1079
+    flags+=("--logspec=")
1080
+    flags+=("--match-server-version")
1081
+    flags+=("--namespace=")
1082
+    two_word_flags+=("-n")
1083
+    flags+=("--server=")
1084
+    flags+=("--token=")
1085
+    flags+=("--user=")
1086
+
1087
+    must_have_one_flag=()
1088
+    must_have_one_noun=()
1089
+    noun_aliases=()
1090
+}
1091
+
1092
+_oc_rollout_pause()
1093
+{
1094
+    last_command="oc_rollout_pause"
1095
+    commands=()
1096
+
1097
+    flags=()
1098
+    two_word_flags=()
1099
+    flags_with_completion=()
1100
+    flags_completion=()
1101
+
1102
+    flags+=("--filename=")
1103
+    flags_with_completion+=("--filename")
1104
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1105
+    two_word_flags+=("-f")
1106
+    flags_with_completion+=("-f")
1107
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1108
+    flags+=("--recursive")
1109
+    flags+=("-R")
1110
+    flags+=("--api-version=")
1111
+    flags+=("--as=")
1112
+    flags+=("--certificate-authority=")
1113
+    flags_with_completion+=("--certificate-authority")
1114
+    flags_completion+=("_filedir")
1115
+    flags+=("--client-certificate=")
1116
+    flags_with_completion+=("--client-certificate")
1117
+    flags_completion+=("_filedir")
1118
+    flags+=("--client-key=")
1119
+    flags_with_completion+=("--client-key")
1120
+    flags_completion+=("_filedir")
1121
+    flags+=("--cluster=")
1122
+    flags+=("--config=")
1123
+    flags_with_completion+=("--config")
1124
+    flags_completion+=("_filedir")
1125
+    flags+=("--context=")
1126
+    flags+=("--insecure-skip-tls-verify")
1127
+    flags+=("--log-flush-frequency=")
1128
+    flags+=("--loglevel=")
1129
+    flags+=("--logspec=")
1130
+    flags+=("--match-server-version")
1131
+    flags+=("--namespace=")
1132
+    two_word_flags+=("-n")
1133
+    flags+=("--server=")
1134
+    flags+=("--token=")
1135
+    flags+=("--user=")
1136
+
1137
+    must_have_one_flag=()
1138
+    must_have_one_noun=()
1139
+    noun_aliases=()
1140
+}
1141
+
1142
+_oc_rollout_resume()
1143
+{
1144
+    last_command="oc_rollout_resume"
1145
+    commands=()
1146
+
1147
+    flags=()
1148
+    two_word_flags=()
1149
+    flags_with_completion=()
1150
+    flags_completion=()
1151
+
1152
+    flags+=("--filename=")
1153
+    flags_with_completion+=("--filename")
1154
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1155
+    two_word_flags+=("-f")
1156
+    flags_with_completion+=("-f")
1157
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1158
+    flags+=("--recursive")
1159
+    flags+=("-R")
1160
+    flags+=("--api-version=")
1161
+    flags+=("--as=")
1162
+    flags+=("--certificate-authority=")
1163
+    flags_with_completion+=("--certificate-authority")
1164
+    flags_completion+=("_filedir")
1165
+    flags+=("--client-certificate=")
1166
+    flags_with_completion+=("--client-certificate")
1167
+    flags_completion+=("_filedir")
1168
+    flags+=("--client-key=")
1169
+    flags_with_completion+=("--client-key")
1170
+    flags_completion+=("_filedir")
1171
+    flags+=("--cluster=")
1172
+    flags+=("--config=")
1173
+    flags_with_completion+=("--config")
1174
+    flags_completion+=("_filedir")
1175
+    flags+=("--context=")
1176
+    flags+=("--insecure-skip-tls-verify")
1177
+    flags+=("--log-flush-frequency=")
1178
+    flags+=("--loglevel=")
1179
+    flags+=("--logspec=")
1180
+    flags+=("--match-server-version")
1181
+    flags+=("--namespace=")
1182
+    two_word_flags+=("-n")
1183
+    flags+=("--server=")
1184
+    flags+=("--token=")
1185
+    flags+=("--user=")
1186
+
1187
+    must_have_one_flag=()
1188
+    must_have_one_noun=()
1189
+    noun_aliases=()
1190
+}
1191
+
1192
+_oc_rollout_undo()
1193
+{
1194
+    last_command="oc_rollout_undo"
1195
+    commands=()
1196
+
1197
+    flags=()
1198
+    two_word_flags=()
1199
+    flags_with_completion=()
1200
+    flags_completion=()
1201
+
1202
+    flags+=("--filename=")
1203
+    flags_with_completion+=("--filename")
1204
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1205
+    two_word_flags+=("-f")
1206
+    flags_with_completion+=("-f")
1207
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1208
+    flags+=("--recursive")
1209
+    flags+=("-R")
1210
+    flags+=("--to-revision=")
1211
+    flags+=("--api-version=")
1212
+    flags+=("--as=")
1213
+    flags+=("--certificate-authority=")
1214
+    flags_with_completion+=("--certificate-authority")
1215
+    flags_completion+=("_filedir")
1216
+    flags+=("--client-certificate=")
1217
+    flags_with_completion+=("--client-certificate")
1218
+    flags_completion+=("_filedir")
1219
+    flags+=("--client-key=")
1220
+    flags_with_completion+=("--client-key")
1221
+    flags_completion+=("_filedir")
1222
+    flags+=("--cluster=")
1223
+    flags+=("--config=")
1224
+    flags_with_completion+=("--config")
1225
+    flags_completion+=("_filedir")
1226
+    flags+=("--context=")
1227
+    flags+=("--insecure-skip-tls-verify")
1228
+    flags+=("--log-flush-frequency=")
1229
+    flags+=("--loglevel=")
1230
+    flags+=("--logspec=")
1231
+    flags+=("--match-server-version")
1232
+    flags+=("--namespace=")
1233
+    two_word_flags+=("-n")
1234
+    flags+=("--server=")
1235
+    flags+=("--token=")
1236
+    flags+=("--user=")
1237
+
1238
+    must_have_one_flag=()
1239
+    must_have_one_noun=()
1240
+    noun_aliases=()
1241
+}
1242
+
1243
+_oc_rollout()
1244
+{
1245
+    last_command="oc_rollout"
1246
+    commands=()
1247
+    commands+=("history")
1248
+    commands+=("pause")
1249
+    commands+=("resume")
1250
+    commands+=("undo")
1251
+
1252
+    flags=()
1253
+    two_word_flags=()
1254
+    flags_with_completion=()
1255
+    flags_completion=()
1256
+
1257
+    flags+=("--api-version=")
1258
+    flags+=("--as=")
1259
+    flags+=("--certificate-authority=")
1260
+    flags_with_completion+=("--certificate-authority")
1261
+    flags_completion+=("_filedir")
1262
+    flags+=("--client-certificate=")
1263
+    flags_with_completion+=("--client-certificate")
1264
+    flags_completion+=("_filedir")
1265
+    flags+=("--client-key=")
1266
+    flags_with_completion+=("--client-key")
1267
+    flags_completion+=("_filedir")
1268
+    flags+=("--cluster=")
1269
+    flags+=("--config=")
1270
+    flags_with_completion+=("--config")
1271
+    flags_completion+=("_filedir")
1272
+    flags+=("--context=")
1273
+    flags+=("--insecure-skip-tls-verify")
1274
+    flags+=("--log-flush-frequency=")
1275
+    flags+=("--loglevel=")
1276
+    flags+=("--logspec=")
1277
+    flags+=("--match-server-version")
1278
+    flags+=("--namespace=")
1279
+    two_word_flags+=("-n")
1280
+    flags+=("--server=")
1281
+    flags+=("--token=")
1282
+    flags+=("--user=")
1283
+
1284
+    must_have_one_flag=()
1285
+    must_have_one_noun=()
1286
+    noun_aliases=()
1287
+}
1288
+
1041 1289
 _oc_deploy()
1042 1290
 {
1043 1291
     last_command="oc_deploy"
... ...
@@ -10304,6 +10552,7 @@ _oc()
10304 10304
     commands+=("projects")
10305 10305
     commands+=("explain")
10306 10306
     commands+=("cluster")
10307
+    commands+=("rollout")
10307 10308
     commands+=("deploy")
10308 10309
     commands+=("rollback")
10309 10310
     commands+=("new-build")
... ...
@@ -5106,6 +5106,259 @@ _openshift_cli_cluster()
5106 5106
     noun_aliases=()
5107 5107
 }
5108 5108
 
5109
+_openshift_cli_rollout_history()
5110
+{
5111
+    last_command="openshift_cli_rollout_history"
5112
+    commands=()
5113
+
5114
+    flags=()
5115
+    two_word_flags=()
5116
+    flags_with_completion=()
5117
+    flags_completion=()
5118
+
5119
+    flags+=("--filename=")
5120
+    flags_with_completion+=("--filename")
5121
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5122
+    two_word_flags+=("-f")
5123
+    flags_with_completion+=("-f")
5124
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5125
+    flags+=("--recursive")
5126
+    flags+=("-R")
5127
+    flags+=("--revision=")
5128
+    flags+=("--api-version=")
5129
+    flags+=("--as=")
5130
+    flags+=("--certificate-authority=")
5131
+    flags_with_completion+=("--certificate-authority")
5132
+    flags_completion+=("_filedir")
5133
+    flags+=("--client-certificate=")
5134
+    flags_with_completion+=("--client-certificate")
5135
+    flags_completion+=("_filedir")
5136
+    flags+=("--client-key=")
5137
+    flags_with_completion+=("--client-key")
5138
+    flags_completion+=("_filedir")
5139
+    flags+=("--cluster=")
5140
+    flags+=("--config=")
5141
+    flags_with_completion+=("--config")
5142
+    flags_completion+=("_filedir")
5143
+    flags+=("--context=")
5144
+    flags+=("--google-json-key=")
5145
+    flags+=("--insecure-skip-tls-verify")
5146
+    flags+=("--log-flush-frequency=")
5147
+    flags+=("--loglevel=")
5148
+    flags+=("--logspec=")
5149
+    flags+=("--match-server-version")
5150
+    flags+=("--namespace=")
5151
+    two_word_flags+=("-n")
5152
+    flags+=("--server=")
5153
+    flags+=("--token=")
5154
+    flags+=("--user=")
5155
+
5156
+    must_have_one_flag=()
5157
+    must_have_one_noun=()
5158
+    noun_aliases=()
5159
+}
5160
+
5161
+_openshift_cli_rollout_pause()
5162
+{
5163
+    last_command="openshift_cli_rollout_pause"
5164
+    commands=()
5165
+
5166
+    flags=()
5167
+    two_word_flags=()
5168
+    flags_with_completion=()
5169
+    flags_completion=()
5170
+
5171
+    flags+=("--filename=")
5172
+    flags_with_completion+=("--filename")
5173
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5174
+    two_word_flags+=("-f")
5175
+    flags_with_completion+=("-f")
5176
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5177
+    flags+=("--recursive")
5178
+    flags+=("-R")
5179
+    flags+=("--api-version=")
5180
+    flags+=("--as=")
5181
+    flags+=("--certificate-authority=")
5182
+    flags_with_completion+=("--certificate-authority")
5183
+    flags_completion+=("_filedir")
5184
+    flags+=("--client-certificate=")
5185
+    flags_with_completion+=("--client-certificate")
5186
+    flags_completion+=("_filedir")
5187
+    flags+=("--client-key=")
5188
+    flags_with_completion+=("--client-key")
5189
+    flags_completion+=("_filedir")
5190
+    flags+=("--cluster=")
5191
+    flags+=("--config=")
5192
+    flags_with_completion+=("--config")
5193
+    flags_completion+=("_filedir")
5194
+    flags+=("--context=")
5195
+    flags+=("--google-json-key=")
5196
+    flags+=("--insecure-skip-tls-verify")
5197
+    flags+=("--log-flush-frequency=")
5198
+    flags+=("--loglevel=")
5199
+    flags+=("--logspec=")
5200
+    flags+=("--match-server-version")
5201
+    flags+=("--namespace=")
5202
+    two_word_flags+=("-n")
5203
+    flags+=("--server=")
5204
+    flags+=("--token=")
5205
+    flags+=("--user=")
5206
+
5207
+    must_have_one_flag=()
5208
+    must_have_one_noun=()
5209
+    noun_aliases=()
5210
+}
5211
+
5212
+_openshift_cli_rollout_resume()
5213
+{
5214
+    last_command="openshift_cli_rollout_resume"
5215
+    commands=()
5216
+
5217
+    flags=()
5218
+    two_word_flags=()
5219
+    flags_with_completion=()
5220
+    flags_completion=()
5221
+
5222
+    flags+=("--filename=")
5223
+    flags_with_completion+=("--filename")
5224
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5225
+    two_word_flags+=("-f")
5226
+    flags_with_completion+=("-f")
5227
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5228
+    flags+=("--recursive")
5229
+    flags+=("-R")
5230
+    flags+=("--api-version=")
5231
+    flags+=("--as=")
5232
+    flags+=("--certificate-authority=")
5233
+    flags_with_completion+=("--certificate-authority")
5234
+    flags_completion+=("_filedir")
5235
+    flags+=("--client-certificate=")
5236
+    flags_with_completion+=("--client-certificate")
5237
+    flags_completion+=("_filedir")
5238
+    flags+=("--client-key=")
5239
+    flags_with_completion+=("--client-key")
5240
+    flags_completion+=("_filedir")
5241
+    flags+=("--cluster=")
5242
+    flags+=("--config=")
5243
+    flags_with_completion+=("--config")
5244
+    flags_completion+=("_filedir")
5245
+    flags+=("--context=")
5246
+    flags+=("--google-json-key=")
5247
+    flags+=("--insecure-skip-tls-verify")
5248
+    flags+=("--log-flush-frequency=")
5249
+    flags+=("--loglevel=")
5250
+    flags+=("--logspec=")
5251
+    flags+=("--match-server-version")
5252
+    flags+=("--namespace=")
5253
+    two_word_flags+=("-n")
5254
+    flags+=("--server=")
5255
+    flags+=("--token=")
5256
+    flags+=("--user=")
5257
+
5258
+    must_have_one_flag=()
5259
+    must_have_one_noun=()
5260
+    noun_aliases=()
5261
+}
5262
+
5263
+_openshift_cli_rollout_undo()
5264
+{
5265
+    last_command="openshift_cli_rollout_undo"
5266
+    commands=()
5267
+
5268
+    flags=()
5269
+    two_word_flags=()
5270
+    flags_with_completion=()
5271
+    flags_completion=()
5272
+
5273
+    flags+=("--filename=")
5274
+    flags_with_completion+=("--filename")
5275
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5276
+    two_word_flags+=("-f")
5277
+    flags_with_completion+=("-f")
5278
+    flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5279
+    flags+=("--recursive")
5280
+    flags+=("-R")
5281
+    flags+=("--to-revision=")
5282
+    flags+=("--api-version=")
5283
+    flags+=("--as=")
5284
+    flags+=("--certificate-authority=")
5285
+    flags_with_completion+=("--certificate-authority")
5286
+    flags_completion+=("_filedir")
5287
+    flags+=("--client-certificate=")
5288
+    flags_with_completion+=("--client-certificate")
5289
+    flags_completion+=("_filedir")
5290
+    flags+=("--client-key=")
5291
+    flags_with_completion+=("--client-key")
5292
+    flags_completion+=("_filedir")
5293
+    flags+=("--cluster=")
5294
+    flags+=("--config=")
5295
+    flags_with_completion+=("--config")
5296
+    flags_completion+=("_filedir")
5297
+    flags+=("--context=")
5298
+    flags+=("--google-json-key=")
5299
+    flags+=("--insecure-skip-tls-verify")
5300
+    flags+=("--log-flush-frequency=")
5301
+    flags+=("--loglevel=")
5302
+    flags+=("--logspec=")
5303
+    flags+=("--match-server-version")
5304
+    flags+=("--namespace=")
5305
+    two_word_flags+=("-n")
5306
+    flags+=("--server=")
5307
+    flags+=("--token=")
5308
+    flags+=("--user=")
5309
+
5310
+    must_have_one_flag=()
5311
+    must_have_one_noun=()
5312
+    noun_aliases=()
5313
+}
5314
+
5315
+_openshift_cli_rollout()
5316
+{
5317
+    last_command="openshift_cli_rollout"
5318
+    commands=()
5319
+    commands+=("history")
5320
+    commands+=("pause")
5321
+    commands+=("resume")
5322
+    commands+=("undo")
5323
+
5324
+    flags=()
5325
+    two_word_flags=()
5326
+    flags_with_completion=()
5327
+    flags_completion=()
5328
+
5329
+    flags+=("--api-version=")
5330
+    flags+=("--as=")
5331
+    flags+=("--certificate-authority=")
5332
+    flags_with_completion+=("--certificate-authority")
5333
+    flags_completion+=("_filedir")
5334
+    flags+=("--client-certificate=")
5335
+    flags_with_completion+=("--client-certificate")
5336
+    flags_completion+=("_filedir")
5337
+    flags+=("--client-key=")
5338
+    flags_with_completion+=("--client-key")
5339
+    flags_completion+=("_filedir")
5340
+    flags+=("--cluster=")
5341
+    flags+=("--config=")
5342
+    flags_with_completion+=("--config")
5343
+    flags_completion+=("_filedir")
5344
+    flags+=("--context=")
5345
+    flags+=("--google-json-key=")
5346
+    flags+=("--insecure-skip-tls-verify")
5347
+    flags+=("--log-flush-frequency=")
5348
+    flags+=("--loglevel=")
5349
+    flags+=("--logspec=")
5350
+    flags+=("--match-server-version")
5351
+    flags+=("--namespace=")
5352
+    two_word_flags+=("-n")
5353
+    flags+=("--server=")
5354
+    flags+=("--token=")
5355
+    flags+=("--user=")
5356
+
5357
+    must_have_one_flag=()
5358
+    must_have_one_noun=()
5359
+    noun_aliases=()
5360
+}
5361
+
5109 5362
 _openshift_cli_deploy()
5110 5363
 {
5111 5364
     last_command="openshift_cli_deploy"
... ...
@@ -14492,6 +14745,7 @@ _openshift_cli()
14492 14492
     commands+=("projects")
14493 14493
     commands+=("explain")
14494 14494
     commands+=("cluster")
14495
+    commands+=("rollout")
14495 14496
     commands+=("deploy")
14496 14497
     commands+=("rollback")
14497 14498
     commands+=("new-build")
... ...
@@ -1772,6 +1772,66 @@ Revert part of an application back to a previous deployment
1772 1772
 ====
1773 1773
 
1774 1774
 
1775
+== oc rollout history
1776
+view rollout history
1777
+
1778
+====
1779
+
1780
+[options="nowrap"]
1781
+----
1782
+  # View the rollout history of a deployment
1783
+  oc rollout history dc/nginx
1784
+
1785
+  # View the details of deployment revision 3
1786
+  oc rollout history dc/nginx --revision=3
1787
+----
1788
+====
1789
+
1790
+
1791
+== oc rollout pause
1792
+Mark the provided resource as paused
1793
+
1794
+====
1795
+
1796
+[options="nowrap"]
1797
+----
1798
+  # Mark the nginx deployment as paused. Any current state of
1799
+  # the deployment will continue its function, new updates to the deployment will not
1800
+  # have an effect as long as the deployment is paused.
1801
+  oc rollout pause dc/nginx
1802
+----
1803
+====
1804
+
1805
+
1806
+== oc rollout resume
1807
+Resume a paused resource
1808
+
1809
+====
1810
+
1811
+[options="nowrap"]
1812
+----
1813
+  # Resume an already paused deployment
1814
+  oc rollout resume dc/nginx
1815
+----
1816
+====
1817
+
1818
+
1819
+== oc rollout undo
1820
+undoes a previous rollout
1821
+
1822
+====
1823
+
1824
+[options="nowrap"]
1825
+----
1826
+  # Rollback to the previous deployment
1827
+  oc rollout undo dc/nginx
1828
+
1829
+  # Rollback to deployment revision 3. The replication controller for that version must exist.
1830
+  oc rollout undo dc/nginx --to-revision=3
1831
+----
1832
+====
1833
+
1834
+
1775 1835
 == oc rsh
1776 1836
 Start a shell session in a pod
1777 1837
 
... ...
@@ -150,6 +150,11 @@ oc-projects.1
150 150
 oc-proxy.1
151 151
 oc-replace.1
152 152
 oc-rollback.1
153
+oc-rollout-history.1
154
+oc-rollout-pause.1
155
+oc-rollout-resume.1
156
+oc-rollout-undo.1
157
+oc-rollout.1
153 158
 oc-rsh.1
154 159
 oc-rsync.1
155 160
 oc-run.1
... ...
@@ -222,6 +222,11 @@ openshift-cli-projects.1
222 222
 openshift-cli-proxy.1
223 223
 openshift-cli-replace.1
224 224
 openshift-cli-rollback.1
225
+openshift-cli-rollout-history.1
226
+openshift-cli-rollout-pause.1
227
+openshift-cli-rollout-resume.1
228
+openshift-cli-rollout-undo.1
229
+openshift-cli-rollout.1
225 230
 openshift-cli-rsh.1
226 231
 openshift-cli-rsync.1
227 232
 openshift-cli-run.1
228 233
new file mode 100644
... ...
@@ -0,0 +1,125 @@
0
+.TH "OC ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+oc rollout history \- view rollout history
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBoc rollout history\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+View the history of rollouts for a specific deployment config
16
+
17
+.PP
18
+You can also view more detailed information for a specific revision
19
+by using the \-\-revision flag.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+.PP
32
+\fB\-\-revision\fP=0
33
+    See the details, including podTemplate of the revision specified
34
+
35
+
36
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
37
+.PP
38
+\fB\-\-api\-version\fP=""
39
+    DEPRECATED: The API version to use when talking to the server
40
+
41
+.PP
42
+\fB\-\-as\fP=""
43
+    Username to impersonate for the operation.
44
+
45
+.PP
46
+\fB\-\-certificate\-authority\fP=""
47
+    Path to a cert. file for the certificate authority.
48
+
49
+.PP
50
+\fB\-\-client\-certificate\fP=""
51
+    Path to a client certificate file for TLS.
52
+
53
+.PP
54
+\fB\-\-client\-key\fP=""
55
+    Path to a client key file for TLS.
56
+
57
+.PP
58
+\fB\-\-cluster\fP=""
59
+    The name of the kubeconfig cluster to use
60
+
61
+.PP
62
+\fB\-\-config\fP=""
63
+    Path to the config file to use for CLI requests.
64
+
65
+.PP
66
+\fB\-\-context\fP=""
67
+    The name of the kubeconfig context to use
68
+
69
+.PP
70
+\fB\-\-google\-json\-key\fP=""
71
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
72
+
73
+.PP
74
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
75
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
76
+
77
+.PP
78
+\fB\-\-log\-flush\-frequency\fP=0
79
+    Maximum number of seconds between log flushes
80
+
81
+.PP
82
+\fB\-\-match\-server\-version\fP=false
83
+    Require server version to match client version
84
+
85
+.PP
86
+\fB\-n\fP, \fB\-\-namespace\fP=""
87
+    If present, the namespace scope for this CLI request.
88
+
89
+.PP
90
+\fB\-\-server\fP=""
91
+    The address and port of the Kubernetes API server
92
+
93
+.PP
94
+\fB\-\-token\fP=""
95
+    Bearer token for authentication to the API server.
96
+
97
+.PP
98
+\fB\-\-user\fP=""
99
+    The name of the kubeconfig user to use
100
+
101
+
102
+.SH EXAMPLE
103
+.PP
104
+.RS
105
+
106
+.nf
107
+  # View the rollout history of a deployment
108
+  oc rollout history dc/nginx
109
+
110
+  # View the details of deployment revision 3
111
+  oc rollout history dc/nginx \-\-revision=3
112
+
113
+.fi
114
+.RE
115
+
116
+
117
+.SH SEE ALSO
118
+.PP
119
+\fBoc\-rollout(1)\fP,
120
+
121
+
122
+.SH HISTORY
123
+.PP
124
+June 2016, Ported from the Kubernetes man\-doc generator
0 125
new file mode 100644
... ...
@@ -0,0 +1,120 @@
0
+.TH "OC ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+oc rollout pause \- Mark the provided resource as paused
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBoc rollout pause\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Mark the provided resource as paused
16
+
17
+.PP
18
+Paused resources will not be reconciled by a controller.
19
+Use \\"%[1]s rollout resume\\" to resume a paused resource.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+
32
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
33
+.PP
34
+\fB\-\-api\-version\fP=""
35
+    DEPRECATED: The API version to use when talking to the server
36
+
37
+.PP
38
+\fB\-\-as\fP=""
39
+    Username to impersonate for the operation.
40
+
41
+.PP
42
+\fB\-\-certificate\-authority\fP=""
43
+    Path to a cert. file for the certificate authority.
44
+
45
+.PP
46
+\fB\-\-client\-certificate\fP=""
47
+    Path to a client certificate file for TLS.
48
+
49
+.PP
50
+\fB\-\-client\-key\fP=""
51
+    Path to a client key file for TLS.
52
+
53
+.PP
54
+\fB\-\-cluster\fP=""
55
+    The name of the kubeconfig cluster to use
56
+
57
+.PP
58
+\fB\-\-config\fP=""
59
+    Path to the config file to use for CLI requests.
60
+
61
+.PP
62
+\fB\-\-context\fP=""
63
+    The name of the kubeconfig context to use
64
+
65
+.PP
66
+\fB\-\-google\-json\-key\fP=""
67
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
68
+
69
+.PP
70
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
71
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
72
+
73
+.PP
74
+\fB\-\-log\-flush\-frequency\fP=0
75
+    Maximum number of seconds between log flushes
76
+
77
+.PP
78
+\fB\-\-match\-server\-version\fP=false
79
+    Require server version to match client version
80
+
81
+.PP
82
+\fB\-n\fP, \fB\-\-namespace\fP=""
83
+    If present, the namespace scope for this CLI request.
84
+
85
+.PP
86
+\fB\-\-server\fP=""
87
+    The address and port of the Kubernetes API server
88
+
89
+.PP
90
+\fB\-\-token\fP=""
91
+    Bearer token for authentication to the API server.
92
+
93
+.PP
94
+\fB\-\-user\fP=""
95
+    The name of the kubeconfig user to use
96
+
97
+
98
+.SH EXAMPLE
99
+.PP
100
+.RS
101
+
102
+.nf
103
+  # Mark the nginx deployment as paused. Any current state of
104
+  # the deployment will continue its function, new updates to the deployment will not
105
+  # have an effect as long as the deployment is paused.
106
+  oc rollout pause dc/nginx
107
+
108
+.fi
109
+.RE
110
+
111
+
112
+.SH SEE ALSO
113
+.PP
114
+\fBoc\-rollout(1)\fP,
115
+
116
+
117
+.SH HISTORY
118
+.PP
119
+June 2016, Ported from the Kubernetes man\-doc generator
0 120
new file mode 100644
... ...
@@ -0,0 +1,118 @@
0
+.TH "OC ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+oc rollout resume \- Resume a paused resource
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBoc rollout resume\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Resume a paused resource
16
+
17
+.PP
18
+Paused resources will not be reconciled by a controller. By resuming a
19
+resource, we allow it to be reconciled again.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+
32
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
33
+.PP
34
+\fB\-\-api\-version\fP=""
35
+    DEPRECATED: The API version to use when talking to the server
36
+
37
+.PP
38
+\fB\-\-as\fP=""
39
+    Username to impersonate for the operation.
40
+
41
+.PP
42
+\fB\-\-certificate\-authority\fP=""
43
+    Path to a cert. file for the certificate authority.
44
+
45
+.PP
46
+\fB\-\-client\-certificate\fP=""
47
+    Path to a client certificate file for TLS.
48
+
49
+.PP
50
+\fB\-\-client\-key\fP=""
51
+    Path to a client key file for TLS.
52
+
53
+.PP
54
+\fB\-\-cluster\fP=""
55
+    The name of the kubeconfig cluster to use
56
+
57
+.PP
58
+\fB\-\-config\fP=""
59
+    Path to the config file to use for CLI requests.
60
+
61
+.PP
62
+\fB\-\-context\fP=""
63
+    The name of the kubeconfig context to use
64
+
65
+.PP
66
+\fB\-\-google\-json\-key\fP=""
67
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
68
+
69
+.PP
70
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
71
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
72
+
73
+.PP
74
+\fB\-\-log\-flush\-frequency\fP=0
75
+    Maximum number of seconds between log flushes
76
+
77
+.PP
78
+\fB\-\-match\-server\-version\fP=false
79
+    Require server version to match client version
80
+
81
+.PP
82
+\fB\-n\fP, \fB\-\-namespace\fP=""
83
+    If present, the namespace scope for this CLI request.
84
+
85
+.PP
86
+\fB\-\-server\fP=""
87
+    The address and port of the Kubernetes API server
88
+
89
+.PP
90
+\fB\-\-token\fP=""
91
+    Bearer token for authentication to the API server.
92
+
93
+.PP
94
+\fB\-\-user\fP=""
95
+    The name of the kubeconfig user to use
96
+
97
+
98
+.SH EXAMPLE
99
+.PP
100
+.RS
101
+
102
+.nf
103
+  # Resume an already paused deployment
104
+  oc rollout resume dc/nginx
105
+
106
+.fi
107
+.RE
108
+
109
+
110
+.SH SEE ALSO
111
+.PP
112
+\fBoc\-rollout(1)\fP,
113
+
114
+
115
+.SH HISTORY
116
+.PP
117
+June 2016, Ported from the Kubernetes man\-doc generator
0 118
new file mode 100644
... ...
@@ -0,0 +1,141 @@
0
+.TH "OC ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+oc rollout undo \- undoes a previous rollout
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBoc rollout undo\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Revert an application back to a previous deployment
16
+
17
+.PP
18
+When you run this command your deployment configuration will be updated to
19
+match a previous deployment. By default only the pod and container
20
+configuration will be changed and scaling or trigger settings will be left as\-
21
+is. Note that environment variables and volumes are included in rollbacks, so
22
+if you've recently updated security credentials in your environment your
23
+previous deployment may not have the correct values.
24
+
25
+.PP
26
+Any image triggers present in the rolled back configuration will be disabled
27
+with a warning. This is to help prevent your rolled back deployment from being
28
+replaced by a triggered deployment soon after your rollback. To re\-enable the
29
+triggers, use the 'deploy \-\-enable\-triggers' command.
30
+
31
+.PP
32
+If you would like to review the outcome of the rollback, pass '\-\-dry\-run' to print
33
+a human\-readable representation of the updated deployment configuration instead of
34
+executing the rollback. This is useful if you're not quite sure what the outcome
35
+will be.
36
+
37
+
38
+.SH OPTIONS
39
+.PP
40
+\fB\-f\fP, \fB\-\-filename\fP=[]
41
+    Filename, directory, or URL to a file identifying the resource to get from a server.
42
+
43
+.PP
44
+\fB\-R\fP, \fB\-\-recursive\fP=false
45
+    If true, process directory recursively.
46
+
47
+.PP
48
+\fB\-\-to\-revision\fP=0
49
+    The revision to rollback to. Default to 0 (last revision).
50
+
51
+
52
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
53
+.PP
54
+\fB\-\-api\-version\fP=""
55
+    DEPRECATED: The API version to use when talking to the server
56
+
57
+.PP
58
+\fB\-\-as\fP=""
59
+    Username to impersonate for the operation.
60
+
61
+.PP
62
+\fB\-\-certificate\-authority\fP=""
63
+    Path to a cert. file for the certificate authority.
64
+
65
+.PP
66
+\fB\-\-client\-certificate\fP=""
67
+    Path to a client certificate file for TLS.
68
+
69
+.PP
70
+\fB\-\-client\-key\fP=""
71
+    Path to a client key file for TLS.
72
+
73
+.PP
74
+\fB\-\-cluster\fP=""
75
+    The name of the kubeconfig cluster to use
76
+
77
+.PP
78
+\fB\-\-config\fP=""
79
+    Path to the config file to use for CLI requests.
80
+
81
+.PP
82
+\fB\-\-context\fP=""
83
+    The name of the kubeconfig context to use
84
+
85
+.PP
86
+\fB\-\-google\-json\-key\fP=""
87
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
88
+
89
+.PP
90
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
91
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
92
+
93
+.PP
94
+\fB\-\-log\-flush\-frequency\fP=0
95
+    Maximum number of seconds between log flushes
96
+
97
+.PP
98
+\fB\-\-match\-server\-version\fP=false
99
+    Require server version to match client version
100
+
101
+.PP
102
+\fB\-n\fP, \fB\-\-namespace\fP=""
103
+    If present, the namespace scope for this CLI request.
104
+
105
+.PP
106
+\fB\-\-server\fP=""
107
+    The address and port of the Kubernetes API server
108
+
109
+.PP
110
+\fB\-\-token\fP=""
111
+    Bearer token for authentication to the API server.
112
+
113
+.PP
114
+\fB\-\-user\fP=""
115
+    The name of the kubeconfig user to use
116
+
117
+
118
+.SH EXAMPLE
119
+.PP
120
+.RS
121
+
122
+.nf
123
+  # Rollback to the previous deployment
124
+  oc rollout undo dc/nginx
125
+
126
+  # Rollback to deployment revision 3. The replication controller for that version must exist.
127
+  oc rollout undo dc/nginx \-\-to\-revision=3
128
+
129
+.fi
130
+.RE
131
+
132
+
133
+.SH SEE ALSO
134
+.PP
135
+\fBoc\-rollout(1)\fP,
136
+
137
+
138
+.SH HISTORY
139
+.PP
140
+June 2016, Ported from the Kubernetes man\-doc generator
0 141
new file mode 100644
... ...
@@ -0,0 +1,92 @@
0
+.TH "OC" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+oc rollout \- rollout manages a deployment
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBoc rollout\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Manage deployments.
16
+
17
+
18
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
19
+.PP
20
+\fB\-\-api\-version\fP=""
21
+    DEPRECATED: The API version to use when talking to the server
22
+
23
+.PP
24
+\fB\-\-as\fP=""
25
+    Username to impersonate for the operation.
26
+
27
+.PP
28
+\fB\-\-certificate\-authority\fP=""
29
+    Path to a cert. file for the certificate authority.
30
+
31
+.PP
32
+\fB\-\-client\-certificate\fP=""
33
+    Path to a client certificate file for TLS.
34
+
35
+.PP
36
+\fB\-\-client\-key\fP=""
37
+    Path to a client key file for TLS.
38
+
39
+.PP
40
+\fB\-\-cluster\fP=""
41
+    The name of the kubeconfig cluster to use
42
+
43
+.PP
44
+\fB\-\-config\fP=""
45
+    Path to the config file to use for CLI requests.
46
+
47
+.PP
48
+\fB\-\-context\fP=""
49
+    The name of the kubeconfig context to use
50
+
51
+.PP
52
+\fB\-\-google\-json\-key\fP=""
53
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
54
+
55
+.PP
56
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
57
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
58
+
59
+.PP
60
+\fB\-\-log\-flush\-frequency\fP=0
61
+    Maximum number of seconds between log flushes
62
+
63
+.PP
64
+\fB\-\-match\-server\-version\fP=false
65
+    Require server version to match client version
66
+
67
+.PP
68
+\fB\-n\fP, \fB\-\-namespace\fP=""
69
+    If present, the namespace scope for this CLI request.
70
+
71
+.PP
72
+\fB\-\-server\fP=""
73
+    The address and port of the Kubernetes API server
74
+
75
+.PP
76
+\fB\-\-token\fP=""
77
+    Bearer token for authentication to the API server.
78
+
79
+.PP
80
+\fB\-\-user\fP=""
81
+    The name of the kubeconfig user to use
82
+
83
+
84
+.SH SEE ALSO
85
+.PP
86
+\fBoc(1)\fP, \fBoc\-rollout\-history(1)\fP, \fBoc\-rollout\-pause(1)\fP, \fBoc\-rollout\-resume(1)\fP, \fBoc\-rollout\-undo(1)\fP,
87
+
88
+
89
+.SH HISTORY
90
+.PP
91
+June 2016, Ported from the Kubernetes man\-doc generator
... ...
@@ -89,7 +89,7 @@ cluster under the 'adm' subcommand.
89 89
 
90 90
 .SH SEE ALSO
91 91
 .PP
92
-\fBoc\-types(1)\fP, \fBoc\-login(1)\fP, \fBoc\-new\-project(1)\fP, \fBoc\-new\-app(1)\fP, \fBoc\-status(1)\fP, \fBoc\-project(1)\fP, \fBoc\-projects(1)\fP, \fBoc\-explain(1)\fP, \fBoc\-cluster(1)\fP, \fBoc\-deploy(1)\fP, \fBoc\-rollback(1)\fP, \fBoc\-new\-build(1)\fP, \fBoc\-start\-build(1)\fP, \fBoc\-cancel\-build(1)\fP, \fBoc\-import\-image(1)\fP, \fBoc\-tag(1)\fP, \fBoc\-get(1)\fP, \fBoc\-describe(1)\fP, \fBoc\-edit(1)\fP, \fBoc\-set(1)\fP, \fBoc\-label(1)\fP, \fBoc\-annotate(1)\fP, \fBoc\-expose(1)\fP, \fBoc\-delete(1)\fP, \fBoc\-scale(1)\fP, \fBoc\-autoscale(1)\fP, \fBoc\-secrets(1)\fP, \fBoc\-serviceaccounts(1)\fP, \fBoc\-logs(1)\fP, \fBoc\-rsh(1)\fP, \fBoc\-rsync(1)\fP, \fBoc\-port\-forward(1)\fP, \fBoc\-debug(1)\fP, \fBoc\-exec(1)\fP, \fBoc\-proxy(1)\fP, \fBoc\-attach(1)\fP, \fBoc\-run(1)\fP, \fBoc\-adm(1)\fP, \fBoc\-create(1)\fP, \fBoc\-replace(1)\fP, \fBoc\-apply(1)\fP, \fBoc\-patch(1)\fP, \fBoc\-process(1)\fP, \fBoc\-export(1)\fP, \fBoc\-policy(1)\fP, \fBoc\-convert(1)\fP, \fBoc\-import(1)\fP, \fBoc\-logout(1)\fP, \fBoc\-config(1)\fP, \fBoc\-whoami(1)\fP, \fBoc\-completion(1)\fP, \fBoc\-env(1)\fP, \fBoc\-volumes(1)\fP, \fBoc\-build\-logs(1)\fP, \fBoc\-ex(1)\fP, \fBoc\-version(1)\fP, \fBoc\-options(1)\fP,
92
+\fBoc\-types(1)\fP, \fBoc\-login(1)\fP, \fBoc\-new\-project(1)\fP, \fBoc\-new\-app(1)\fP, \fBoc\-status(1)\fP, \fBoc\-project(1)\fP, \fBoc\-projects(1)\fP, \fBoc\-explain(1)\fP, \fBoc\-cluster(1)\fP, \fBoc\-rollout(1)\fP, \fBoc\-deploy(1)\fP, \fBoc\-rollback(1)\fP, \fBoc\-new\-build(1)\fP, \fBoc\-start\-build(1)\fP, \fBoc\-cancel\-build(1)\fP, \fBoc\-import\-image(1)\fP, \fBoc\-tag(1)\fP, \fBoc\-get(1)\fP, \fBoc\-describe(1)\fP, \fBoc\-edit(1)\fP, \fBoc\-set(1)\fP, \fBoc\-label(1)\fP, \fBoc\-annotate(1)\fP, \fBoc\-expose(1)\fP, \fBoc\-delete(1)\fP, \fBoc\-scale(1)\fP, \fBoc\-autoscale(1)\fP, \fBoc\-secrets(1)\fP, \fBoc\-serviceaccounts(1)\fP, \fBoc\-logs(1)\fP, \fBoc\-rsh(1)\fP, \fBoc\-rsync(1)\fP, \fBoc\-port\-forward(1)\fP, \fBoc\-debug(1)\fP, \fBoc\-exec(1)\fP, \fBoc\-proxy(1)\fP, \fBoc\-attach(1)\fP, \fBoc\-run(1)\fP, \fBoc\-adm(1)\fP, \fBoc\-create(1)\fP, \fBoc\-replace(1)\fP, \fBoc\-apply(1)\fP, \fBoc\-patch(1)\fP, \fBoc\-process(1)\fP, \fBoc\-export(1)\fP, \fBoc\-policy(1)\fP, \fBoc\-convert(1)\fP, \fBoc\-import(1)\fP, \fBoc\-logout(1)\fP, \fBoc\-config(1)\fP, \fBoc\-whoami(1)\fP, \fBoc\-completion(1)\fP, \fBoc\-env(1)\fP, \fBoc\-volumes(1)\fP, \fBoc\-build\-logs(1)\fP, \fBoc\-ex(1)\fP, \fBoc\-version(1)\fP, \fBoc\-options(1)\fP,
93 93
 
94 94
 
95 95
 .SH HISTORY
96 96
new file mode 100644
... ...
@@ -0,0 +1,125 @@
0
+.TH "OPENSHIFT CLI ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+openshift cli rollout history \- view rollout history
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBopenshift cli rollout history\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+View the history of rollouts for a specific deployment config
16
+
17
+.PP
18
+You can also view more detailed information for a specific revision
19
+by using the \-\-revision flag.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+.PP
32
+\fB\-\-revision\fP=0
33
+    See the details, including podTemplate of the revision specified
34
+
35
+
36
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
37
+.PP
38
+\fB\-\-api\-version\fP=""
39
+    DEPRECATED: The API version to use when talking to the server
40
+
41
+.PP
42
+\fB\-\-as\fP=""
43
+    Username to impersonate for the operation.
44
+
45
+.PP
46
+\fB\-\-certificate\-authority\fP=""
47
+    Path to a cert. file for the certificate authority.
48
+
49
+.PP
50
+\fB\-\-client\-certificate\fP=""
51
+    Path to a client certificate file for TLS.
52
+
53
+.PP
54
+\fB\-\-client\-key\fP=""
55
+    Path to a client key file for TLS.
56
+
57
+.PP
58
+\fB\-\-cluster\fP=""
59
+    The name of the kubeconfig cluster to use
60
+
61
+.PP
62
+\fB\-\-config\fP=""
63
+    Path to the config file to use for CLI requests.
64
+
65
+.PP
66
+\fB\-\-context\fP=""
67
+    The name of the kubeconfig context to use
68
+
69
+.PP
70
+\fB\-\-google\-json\-key\fP=""
71
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
72
+
73
+.PP
74
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
75
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
76
+
77
+.PP
78
+\fB\-\-log\-flush\-frequency\fP=0
79
+    Maximum number of seconds between log flushes
80
+
81
+.PP
82
+\fB\-\-match\-server\-version\fP=false
83
+    Require server version to match client version
84
+
85
+.PP
86
+\fB\-n\fP, \fB\-\-namespace\fP=""
87
+    If present, the namespace scope for this CLI request.
88
+
89
+.PP
90
+\fB\-\-server\fP=""
91
+    The address and port of the Kubernetes API server
92
+
93
+.PP
94
+\fB\-\-token\fP=""
95
+    Bearer token for authentication to the API server.
96
+
97
+.PP
98
+\fB\-\-user\fP=""
99
+    The name of the kubeconfig user to use
100
+
101
+
102
+.SH EXAMPLE
103
+.PP
104
+.RS
105
+
106
+.nf
107
+  # View the rollout history of a deployment
108
+  openshift cli rollout history dc/nginx
109
+
110
+  # View the details of deployment revision 3
111
+  openshift cli rollout history dc/nginx \-\-revision=3
112
+
113
+.fi
114
+.RE
115
+
116
+
117
+.SH SEE ALSO
118
+.PP
119
+\fBopenshift\-cli\-rollout(1)\fP,
120
+
121
+
122
+.SH HISTORY
123
+.PP
124
+June 2016, Ported from the Kubernetes man\-doc generator
0 125
new file mode 100644
... ...
@@ -0,0 +1,120 @@
0
+.TH "OPENSHIFT CLI ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+openshift cli rollout pause \- Mark the provided resource as paused
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBopenshift cli rollout pause\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Mark the provided resource as paused
16
+
17
+.PP
18
+Paused resources will not be reconciled by a controller.
19
+Use \\"%[1]s rollout resume\\" to resume a paused resource.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+
32
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
33
+.PP
34
+\fB\-\-api\-version\fP=""
35
+    DEPRECATED: The API version to use when talking to the server
36
+
37
+.PP
38
+\fB\-\-as\fP=""
39
+    Username to impersonate for the operation.
40
+
41
+.PP
42
+\fB\-\-certificate\-authority\fP=""
43
+    Path to a cert. file for the certificate authority.
44
+
45
+.PP
46
+\fB\-\-client\-certificate\fP=""
47
+    Path to a client certificate file for TLS.
48
+
49
+.PP
50
+\fB\-\-client\-key\fP=""
51
+    Path to a client key file for TLS.
52
+
53
+.PP
54
+\fB\-\-cluster\fP=""
55
+    The name of the kubeconfig cluster to use
56
+
57
+.PP
58
+\fB\-\-config\fP=""
59
+    Path to the config file to use for CLI requests.
60
+
61
+.PP
62
+\fB\-\-context\fP=""
63
+    The name of the kubeconfig context to use
64
+
65
+.PP
66
+\fB\-\-google\-json\-key\fP=""
67
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
68
+
69
+.PP
70
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
71
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
72
+
73
+.PP
74
+\fB\-\-log\-flush\-frequency\fP=0
75
+    Maximum number of seconds between log flushes
76
+
77
+.PP
78
+\fB\-\-match\-server\-version\fP=false
79
+    Require server version to match client version
80
+
81
+.PP
82
+\fB\-n\fP, \fB\-\-namespace\fP=""
83
+    If present, the namespace scope for this CLI request.
84
+
85
+.PP
86
+\fB\-\-server\fP=""
87
+    The address and port of the Kubernetes API server
88
+
89
+.PP
90
+\fB\-\-token\fP=""
91
+    Bearer token for authentication to the API server.
92
+
93
+.PP
94
+\fB\-\-user\fP=""
95
+    The name of the kubeconfig user to use
96
+
97
+
98
+.SH EXAMPLE
99
+.PP
100
+.RS
101
+
102
+.nf
103
+  # Mark the nginx deployment as paused. Any current state of
104
+  # the deployment will continue its function, new updates to the deployment will not
105
+  # have an effect as long as the deployment is paused.
106
+  openshift cli rollout pause dc/nginx
107
+
108
+.fi
109
+.RE
110
+
111
+
112
+.SH SEE ALSO
113
+.PP
114
+\fBopenshift\-cli\-rollout(1)\fP,
115
+
116
+
117
+.SH HISTORY
118
+.PP
119
+June 2016, Ported from the Kubernetes man\-doc generator
0 120
new file mode 100644
... ...
@@ -0,0 +1,118 @@
0
+.TH "OPENSHIFT CLI ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+openshift cli rollout resume \- Resume a paused resource
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBopenshift cli rollout resume\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Resume a paused resource
16
+
17
+.PP
18
+Paused resources will not be reconciled by a controller. By resuming a
19
+resource, we allow it to be reconciled again.
20
+
21
+
22
+.SH OPTIONS
23
+.PP
24
+\fB\-f\fP, \fB\-\-filename\fP=[]
25
+    Filename, directory, or URL to a file identifying the resource to get from a server.
26
+
27
+.PP
28
+\fB\-R\fP, \fB\-\-recursive\fP=false
29
+    If true, process directory recursively.
30
+
31
+
32
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
33
+.PP
34
+\fB\-\-api\-version\fP=""
35
+    DEPRECATED: The API version to use when talking to the server
36
+
37
+.PP
38
+\fB\-\-as\fP=""
39
+    Username to impersonate for the operation.
40
+
41
+.PP
42
+\fB\-\-certificate\-authority\fP=""
43
+    Path to a cert. file for the certificate authority.
44
+
45
+.PP
46
+\fB\-\-client\-certificate\fP=""
47
+    Path to a client certificate file for TLS.
48
+
49
+.PP
50
+\fB\-\-client\-key\fP=""
51
+    Path to a client key file for TLS.
52
+
53
+.PP
54
+\fB\-\-cluster\fP=""
55
+    The name of the kubeconfig cluster to use
56
+
57
+.PP
58
+\fB\-\-config\fP=""
59
+    Path to the config file to use for CLI requests.
60
+
61
+.PP
62
+\fB\-\-context\fP=""
63
+    The name of the kubeconfig context to use
64
+
65
+.PP
66
+\fB\-\-google\-json\-key\fP=""
67
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
68
+
69
+.PP
70
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
71
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
72
+
73
+.PP
74
+\fB\-\-log\-flush\-frequency\fP=0
75
+    Maximum number of seconds between log flushes
76
+
77
+.PP
78
+\fB\-\-match\-server\-version\fP=false
79
+    Require server version to match client version
80
+
81
+.PP
82
+\fB\-n\fP, \fB\-\-namespace\fP=""
83
+    If present, the namespace scope for this CLI request.
84
+
85
+.PP
86
+\fB\-\-server\fP=""
87
+    The address and port of the Kubernetes API server
88
+
89
+.PP
90
+\fB\-\-token\fP=""
91
+    Bearer token for authentication to the API server.
92
+
93
+.PP
94
+\fB\-\-user\fP=""
95
+    The name of the kubeconfig user to use
96
+
97
+
98
+.SH EXAMPLE
99
+.PP
100
+.RS
101
+
102
+.nf
103
+  # Resume an already paused deployment
104
+  openshift cli rollout resume dc/nginx
105
+
106
+.fi
107
+.RE
108
+
109
+
110
+.SH SEE ALSO
111
+.PP
112
+\fBopenshift\-cli\-rollout(1)\fP,
113
+
114
+
115
+.SH HISTORY
116
+.PP
117
+June 2016, Ported from the Kubernetes man\-doc generator
0 118
new file mode 100644
... ...
@@ -0,0 +1,141 @@
0
+.TH "OPENSHIFT CLI ROLLOUT" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+openshift cli rollout undo \- undoes a previous rollout
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBopenshift cli rollout undo\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Revert an application back to a previous deployment
16
+
17
+.PP
18
+When you run this command your deployment configuration will be updated to
19
+match a previous deployment. By default only the pod and container
20
+configuration will be changed and scaling or trigger settings will be left as\-
21
+is. Note that environment variables and volumes are included in rollbacks, so
22
+if you've recently updated security credentials in your environment your
23
+previous deployment may not have the correct values.
24
+
25
+.PP
26
+Any image triggers present in the rolled back configuration will be disabled
27
+with a warning. This is to help prevent your rolled back deployment from being
28
+replaced by a triggered deployment soon after your rollback. To re\-enable the
29
+triggers, use the 'deploy \-\-enable\-triggers' command.
30
+
31
+.PP
32
+If you would like to review the outcome of the rollback, pass '\-\-dry\-run' to print
33
+a human\-readable representation of the updated deployment configuration instead of
34
+executing the rollback. This is useful if you're not quite sure what the outcome
35
+will be.
36
+
37
+
38
+.SH OPTIONS
39
+.PP
40
+\fB\-f\fP, \fB\-\-filename\fP=[]
41
+    Filename, directory, or URL to a file identifying the resource to get from a server.
42
+
43
+.PP
44
+\fB\-R\fP, \fB\-\-recursive\fP=false
45
+    If true, process directory recursively.
46
+
47
+.PP
48
+\fB\-\-to\-revision\fP=0
49
+    The revision to rollback to. Default to 0 (last revision).
50
+
51
+
52
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
53
+.PP
54
+\fB\-\-api\-version\fP=""
55
+    DEPRECATED: The API version to use when talking to the server
56
+
57
+.PP
58
+\fB\-\-as\fP=""
59
+    Username to impersonate for the operation.
60
+
61
+.PP
62
+\fB\-\-certificate\-authority\fP=""
63
+    Path to a cert. file for the certificate authority.
64
+
65
+.PP
66
+\fB\-\-client\-certificate\fP=""
67
+    Path to a client certificate file for TLS.
68
+
69
+.PP
70
+\fB\-\-client\-key\fP=""
71
+    Path to a client key file for TLS.
72
+
73
+.PP
74
+\fB\-\-cluster\fP=""
75
+    The name of the kubeconfig cluster to use
76
+
77
+.PP
78
+\fB\-\-config\fP=""
79
+    Path to the config file to use for CLI requests.
80
+
81
+.PP
82
+\fB\-\-context\fP=""
83
+    The name of the kubeconfig context to use
84
+
85
+.PP
86
+\fB\-\-google\-json\-key\fP=""
87
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
88
+
89
+.PP
90
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
91
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
92
+
93
+.PP
94
+\fB\-\-log\-flush\-frequency\fP=0
95
+    Maximum number of seconds between log flushes
96
+
97
+.PP
98
+\fB\-\-match\-server\-version\fP=false
99
+    Require server version to match client version
100
+
101
+.PP
102
+\fB\-n\fP, \fB\-\-namespace\fP=""
103
+    If present, the namespace scope for this CLI request.
104
+
105
+.PP
106
+\fB\-\-server\fP=""
107
+    The address and port of the Kubernetes API server
108
+
109
+.PP
110
+\fB\-\-token\fP=""
111
+    Bearer token for authentication to the API server.
112
+
113
+.PP
114
+\fB\-\-user\fP=""
115
+    The name of the kubeconfig user to use
116
+
117
+
118
+.SH EXAMPLE
119
+.PP
120
+.RS
121
+
122
+.nf
123
+  # Rollback to the previous deployment
124
+  openshift cli rollout undo dc/nginx
125
+
126
+  # Rollback to deployment revision 3. The replication controller for that version must exist.
127
+  openshift cli rollout undo dc/nginx \-\-to\-revision=3
128
+
129
+.fi
130
+.RE
131
+
132
+
133
+.SH SEE ALSO
134
+.PP
135
+\fBopenshift\-cli\-rollout(1)\fP,
136
+
137
+
138
+.SH HISTORY
139
+.PP
140
+June 2016, Ported from the Kubernetes man\-doc generator
0 141
new file mode 100644
... ...
@@ -0,0 +1,92 @@
0
+.TH "OPENSHIFT CLI" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""
1
+
2
+
3
+.SH NAME
4
+.PP
5
+openshift cli rollout \- rollout manages a deployment
6
+
7
+
8
+.SH SYNOPSIS
9
+.PP
10
+\fBopenshift cli rollout\fP [OPTIONS]
11
+
12
+
13
+.SH DESCRIPTION
14
+.PP
15
+Manage deployments.
16
+
17
+
18
+.SH OPTIONS INHERITED FROM PARENT COMMANDS
19
+.PP
20
+\fB\-\-api\-version\fP=""
21
+    DEPRECATED: The API version to use when talking to the server
22
+
23
+.PP
24
+\fB\-\-as\fP=""
25
+    Username to impersonate for the operation.
26
+
27
+.PP
28
+\fB\-\-certificate\-authority\fP=""
29
+    Path to a cert. file for the certificate authority.
30
+
31
+.PP
32
+\fB\-\-client\-certificate\fP=""
33
+    Path to a client certificate file for TLS.
34
+
35
+.PP
36
+\fB\-\-client\-key\fP=""
37
+    Path to a client key file for TLS.
38
+
39
+.PP
40
+\fB\-\-cluster\fP=""
41
+    The name of the kubeconfig cluster to use
42
+
43
+.PP
44
+\fB\-\-config\fP=""
45
+    Path to the config file to use for CLI requests.
46
+
47
+.PP
48
+\fB\-\-context\fP=""
49
+    The name of the kubeconfig context to use
50
+
51
+.PP
52
+\fB\-\-google\-json\-key\fP=""
53
+    The Google Cloud Platform Service Account JSON Key to use for authentication.
54
+
55
+.PP
56
+\fB\-\-insecure\-skip\-tls\-verify\fP=false
57
+    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
58
+
59
+.PP
60
+\fB\-\-log\-flush\-frequency\fP=0
61
+    Maximum number of seconds between log flushes
62
+
63
+.PP
64
+\fB\-\-match\-server\-version\fP=false
65
+    Require server version to match client version
66
+
67
+.PP
68
+\fB\-n\fP, \fB\-\-namespace\fP=""
69
+    If present, the namespace scope for this CLI request.
70
+
71
+.PP
72
+\fB\-\-server\fP=""
73
+    The address and port of the Kubernetes API server
74
+
75
+.PP
76
+\fB\-\-token\fP=""
77
+    Bearer token for authentication to the API server.
78
+
79
+.PP
80
+\fB\-\-user\fP=""
81
+    The name of the kubeconfig user to use
82
+
83
+
84
+.SH SEE ALSO
85
+.PP
86
+\fBopenshift\-cli(1)\fP, \fBopenshift\-cli\-rollout\-history(1)\fP, \fBopenshift\-cli\-rollout\-pause(1)\fP, \fBopenshift\-cli\-rollout\-resume(1)\fP, \fBopenshift\-cli\-rollout\-undo(1)\fP,
87
+
88
+
89
+.SH HISTORY
90
+.PP
91
+June 2016, Ported from the Kubernetes man\-doc generator
... ...
@@ -91,7 +91,7 @@ cluster under the 'adm' subcommand.
91 91
 
92 92
 .SH SEE ALSO
93 93
 .PP
94
-\fBopenshift(1)\fP, \fBopenshift\-cli\-types(1)\fP, \fBopenshift\-cli\-login(1)\fP, \fBopenshift\-cli\-new\-project(1)\fP, \fBopenshift\-cli\-new\-app(1)\fP, \fBopenshift\-cli\-status(1)\fP, \fBopenshift\-cli\-project(1)\fP, \fBopenshift\-cli\-projects(1)\fP, \fBopenshift\-cli\-explain(1)\fP, \fBopenshift\-cli\-cluster(1)\fP, \fBopenshift\-cli\-deploy(1)\fP, \fBopenshift\-cli\-rollback(1)\fP, \fBopenshift\-cli\-new\-build(1)\fP, \fBopenshift\-cli\-start\-build(1)\fP, \fBopenshift\-cli\-cancel\-build(1)\fP, \fBopenshift\-cli\-import\-image(1)\fP, \fBopenshift\-cli\-tag(1)\fP, \fBopenshift\-cli\-get(1)\fP, \fBopenshift\-cli\-describe(1)\fP, \fBopenshift\-cli\-edit(1)\fP, \fBopenshift\-cli\-set(1)\fP, \fBopenshift\-cli\-label(1)\fP, \fBopenshift\-cli\-annotate(1)\fP, \fBopenshift\-cli\-expose(1)\fP, \fBopenshift\-cli\-delete(1)\fP, \fBopenshift\-cli\-scale(1)\fP, \fBopenshift\-cli\-autoscale(1)\fP, \fBopenshift\-cli\-secrets(1)\fP, \fBopenshift\-cli\-serviceaccounts(1)\fP, \fBopenshift\-cli\-logs(1)\fP, \fBopenshift\-cli\-rsh(1)\fP, \fBopenshift\-cli\-rsync(1)\fP, \fBopenshift\-cli\-port\-forward(1)\fP, \fBopenshift\-cli\-debug(1)\fP, \fBopenshift\-cli\-exec(1)\fP, \fBopenshift\-cli\-proxy(1)\fP, \fBopenshift\-cli\-attach(1)\fP, \fBopenshift\-cli\-run(1)\fP, \fBopenshift\-cli\-adm(1)\fP, \fBopenshift\-cli\-create(1)\fP, \fBopenshift\-cli\-replace(1)\fP, \fBopenshift\-cli\-apply(1)\fP, \fBopenshift\-cli\-patch(1)\fP, \fBopenshift\-cli\-process(1)\fP, \fBopenshift\-cli\-export(1)\fP, \fBopenshift\-cli\-policy(1)\fP, \fBopenshift\-cli\-convert(1)\fP, \fBopenshift\-cli\-import(1)\fP, \fBopenshift\-cli\-logout(1)\fP, \fBopenshift\-cli\-config(1)\fP, \fBopenshift\-cli\-whoami(1)\fP, \fBopenshift\-cli\-completion(1)\fP, \fBopenshift\-cli\-env(1)\fP, \fBopenshift\-cli\-volumes(1)\fP, \fBopenshift\-cli\-build\-logs(1)\fP, \fBopenshift\-cli\-ex(1)\fP, \fBopenshift\-cli\-options(1)\fP,
94
+\fBopenshift(1)\fP, \fBopenshift\-cli\-types(1)\fP, \fBopenshift\-cli\-login(1)\fP, \fBopenshift\-cli\-new\-project(1)\fP, \fBopenshift\-cli\-new\-app(1)\fP, \fBopenshift\-cli\-status(1)\fP, \fBopenshift\-cli\-project(1)\fP, \fBopenshift\-cli\-projects(1)\fP, \fBopenshift\-cli\-explain(1)\fP, \fBopenshift\-cli\-cluster(1)\fP, \fBopenshift\-cli\-rollout(1)\fP, \fBopenshift\-cli\-deploy(1)\fP, \fBopenshift\-cli\-rollback(1)\fP, \fBopenshift\-cli\-new\-build(1)\fP, \fBopenshift\-cli\-start\-build(1)\fP, \fBopenshift\-cli\-cancel\-build(1)\fP, \fBopenshift\-cli\-import\-image(1)\fP, \fBopenshift\-cli\-tag(1)\fP, \fBopenshift\-cli\-get(1)\fP, \fBopenshift\-cli\-describe(1)\fP, \fBopenshift\-cli\-edit(1)\fP, \fBopenshift\-cli\-set(1)\fP, \fBopenshift\-cli\-label(1)\fP, \fBopenshift\-cli\-annotate(1)\fP, \fBopenshift\-cli\-expose(1)\fP, \fBopenshift\-cli\-delete(1)\fP, \fBopenshift\-cli\-scale(1)\fP, \fBopenshift\-cli\-autoscale(1)\fP, \fBopenshift\-cli\-secrets(1)\fP, \fBopenshift\-cli\-serviceaccounts(1)\fP, \fBopenshift\-cli\-logs(1)\fP, \fBopenshift\-cli\-rsh(1)\fP, \fBopenshift\-cli\-rsync(1)\fP, \fBopenshift\-cli\-port\-forward(1)\fP, \fBopenshift\-cli\-debug(1)\fP, \fBopenshift\-cli\-exec(1)\fP, \fBopenshift\-cli\-proxy(1)\fP, \fBopenshift\-cli\-attach(1)\fP, \fBopenshift\-cli\-run(1)\fP, \fBopenshift\-cli\-adm(1)\fP, \fBopenshift\-cli\-create(1)\fP, \fBopenshift\-cli\-replace(1)\fP, \fBopenshift\-cli\-apply(1)\fP, \fBopenshift\-cli\-patch(1)\fP, \fBopenshift\-cli\-process(1)\fP, \fBopenshift\-cli\-export(1)\fP, \fBopenshift\-cli\-policy(1)\fP, \fBopenshift\-cli\-convert(1)\fP, \fBopenshift\-cli\-import(1)\fP, \fBopenshift\-cli\-logout(1)\fP, \fBopenshift\-cli\-config(1)\fP, \fBopenshift\-cli\-whoami(1)\fP, \fBopenshift\-cli\-completion(1)\fP, \fBopenshift\-cli\-env(1)\fP, \fBopenshift\-cli\-volumes(1)\fP, \fBopenshift\-cli\-build\-logs(1)\fP, \fBopenshift\-cli\-ex(1)\fP, \fBopenshift\-cli\-options(1)\fP,
95 95
 
96 96
 
97 97
 .SH HISTORY
... ...
@@ -18,6 +18,7 @@ import (
18 18
 	"github.com/openshift/origin/pkg/cmd/cli/cmd/cluster"
19 19
 	"github.com/openshift/origin/pkg/cmd/cli/cmd/dockerbuild"
20 20
 	"github.com/openshift/origin/pkg/cmd/cli/cmd/importer"
21
+	"github.com/openshift/origin/pkg/cmd/cli/cmd/rollout"
21 22
 	"github.com/openshift/origin/pkg/cmd/cli/cmd/rsync"
22 23
 	"github.com/openshift/origin/pkg/cmd/cli/cmd/set"
23 24
 	"github.com/openshift/origin/pkg/cmd/cli/policy"
... ...
@@ -105,6 +106,7 @@ func NewCommandCLI(name, fullName string, in io.Reader, out, errout io.Writer) *
105 105
 		{
106 106
 			Message: "Build and Deploy Commands:",
107 107
 			Commands: []*cobra.Command{
108
+				rollout.NewCmdRollout(fullName, f, out),
108 109
 				cmd.NewCmdDeploy(fullName, f, out),
109 110
 				cmd.NewCmdRollback(fullName, f, out),
110 111
 				cmd.NewCmdNewBuild(fullName, f, in, out),
111 112
new file mode 100644
... ...
@@ -0,0 +1,379 @@
0
+package create
1
+
2
+import (
3
+	"fmt"
4
+	"io"
5
+
6
+	"github.com/spf13/cobra"
7
+
8
+	kapi "k8s.io/kubernetes/pkg/api"
9
+	kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
10
+	"k8s.io/kubernetes/pkg/kubectl/resource"
11
+
12
+	cmdutil "github.com/openshift/origin/pkg/cmd/util"
13
+	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
14
+	"github.com/openshift/origin/pkg/route/api"
15
+	fileutil "github.com/openshift/origin/pkg/util/file"
16
+)
17
+
18
+const (
19
+	routeLong = `
20
+Expose containers externally via secured routes
21
+
22
+Three types of secured routes are supported: edge, passthrough, and reencrypt.
23
+If you wish to create unsecured routes, see "%[1]s expose -h"
24
+`
25
+)
26
+
27
+// NewCmdCreateRoute is a macro command to create a secured route.
28
+func NewCmdCreateRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
29
+	cmd := &cobra.Command{
30
+		Use:   "route",
31
+		Short: "Expose containers externally via secured routes",
32
+		Long:  fmt.Sprintf(routeLong, fullName),
33
+		Run:   cmdutil.DefaultSubCommandRun(out),
34
+	}
35
+
36
+	cmd.AddCommand(NewCmdCreateEdgeRoute(fullName, f, out))
37
+	cmd.AddCommand(NewCmdCreatePassthroughRoute(fullName, f, out))
38
+	cmd.AddCommand(NewCmdCreateReencryptRoute(fullName, f, out))
39
+
40
+	return cmd
41
+}
42
+
43
+const (
44
+	edgeRouteLong = `
45
+Create a route that uses edge TLS termination
46
+
47
+Specify the service (either just its name or using type/name syntax) that the
48
+generated route should expose via the --service flag.`
49
+
50
+	edgeRouteExample = `  # Create an edge route named "my-route" that exposes frontend service.
51
+  %[1]s create route edge my-route --service=frontend
52
+
53
+  # Create an edge route that exposes the frontend service and specify a path.
54
+  # If the route name is omitted, the service name will be re-used.
55
+  %[1]s create route edge --service=frontend --path /assets`
56
+)
57
+
58
+// NewCmdCreateEdgeRoute is a macro command to create an edge route.
59
+func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
60
+	cmd := &cobra.Command{
61
+		Use:     "edge [NAME] --service=SERVICE",
62
+		Short:   "Create a route that uses edge TLS termination",
63
+		Long:    edgeRouteLong,
64
+		Example: fmt.Sprintf(edgeRouteExample, fullName),
65
+		Run: func(cmd *cobra.Command, args []string) {
66
+			err := CreateEdgeRoute(f, out, cmd, args)
67
+			kcmdutil.CheckErr(err)
68
+		},
69
+	}
70
+
71
+	kcmdutil.AddValidateFlags(cmd)
72
+	kcmdutil.AddOutputFlagsForMutation(cmd)
73
+	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
74
+	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
75
+	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
76
+	cmd.MarkFlagRequired("service")
77
+	cmd.Flags().String("path", "", "Path that the router watches to route traffic to the service.")
78
+	cmd.Flags().String("cert", "", "Path to a certificate file.")
79
+	cmd.MarkFlagFilename("cert")
80
+	cmd.Flags().String("key", "", "Path to a key file.")
81
+	cmd.MarkFlagFilename("key")
82
+	cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
83
+	cmd.MarkFlagFilename("ca-cert")
84
+
85
+	return cmd
86
+}
87
+
88
+// CreateEdgeRoute implements the behavior to run the create edge route command.
89
+func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
90
+	oc, kc, err := f.Clients()
91
+	if err != nil {
92
+		return err
93
+	}
94
+	ns, _, err := f.DefaultNamespace()
95
+	if err != nil {
96
+		return err
97
+	}
98
+	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
99
+	if err != nil {
100
+		return err
101
+	}
102
+	routeName, err := resolveRouteName(args)
103
+	if err != nil {
104
+		return err
105
+	}
106
+	route, err := cmdutil.UnsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
107
+	if err != nil {
108
+		return err
109
+	}
110
+
111
+	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
112
+	route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
113
+
114
+	route.Spec.TLS = new(api.TLSConfig)
115
+	route.Spec.TLS.Termination = api.TLSTerminationEdge
116
+	cert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "cert"))
117
+	if err != nil {
118
+		return err
119
+	}
120
+	route.Spec.TLS.Certificate = string(cert)
121
+	key, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "key"))
122
+	if err != nil {
123
+		return err
124
+	}
125
+	route.Spec.TLS.Key = string(key)
126
+	caCert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "ca-cert"))
127
+	if err != nil {
128
+		return err
129
+	}
130
+	route.Spec.TLS.CACertificate = string(caCert)
131
+
132
+	route, err = oc.Routes(ns).Create(route)
133
+	if err != nil {
134
+		return err
135
+	}
136
+	mapper, typer := f.Object(false)
137
+	resourceMapper := &resource.Mapper{
138
+		ObjectTyper:  typer,
139
+		RESTMapper:   mapper,
140
+		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
141
+	}
142
+	info, err := resourceMapper.InfoForObject(route, nil)
143
+	if err != nil {
144
+		return err
145
+	}
146
+	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
147
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
148
+	return nil
149
+}
150
+
151
+const (
152
+	passthroughRouteLong = `
153
+Create a route that uses passthrough TLS termination
154
+
155
+Specify the service (either just its name or using type/name syntax) that the
156
+generated route should expose via the --service flag.`
157
+
158
+	passthroughRouteExample = `  # Create a passthrough route named "my-route" that exposes the frontend service.
159
+  %[1]s create route passthrough my-route --service=frontend
160
+
161
+  # Create a passthrough route that exposes the frontend service and specify
162
+  # a hostname. If the route name is omitted, the service name will be re-used.
163
+  %[1]s create route passthrough --service=frontend --hostname=www.example.com`
164
+)
165
+
166
+// NewCmdCreatePassthroughRoute is a macro command to create a passthrough route.
167
+func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
168
+	cmd := &cobra.Command{
169
+		Use:     "passthrough [NAME] --service=SERVICE",
170
+		Short:   "Create a route that uses passthrough TLS termination",
171
+		Long:    passthroughRouteLong,
172
+		Example: fmt.Sprintf(passthroughRouteExample, fullName),
173
+		Run: func(cmd *cobra.Command, args []string) {
174
+			err := CreatePassthroughRoute(f, out, cmd, args)
175
+			kcmdutil.CheckErr(err)
176
+		},
177
+	}
178
+
179
+	kcmdutil.AddValidateFlags(cmd)
180
+	kcmdutil.AddOutputFlagsForMutation(cmd)
181
+	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
182
+	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
183
+	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
184
+	cmd.MarkFlagRequired("service")
185
+
186
+	return cmd
187
+}
188
+
189
+// CreatePassthroughRoute implements the behavior to run the create passthrough route command.
190
+func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
191
+	oc, kc, err := f.Clients()
192
+	if err != nil {
193
+		return err
194
+	}
195
+	ns, _, err := f.DefaultNamespace()
196
+	if err != nil {
197
+		return err
198
+	}
199
+	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
200
+	if err != nil {
201
+		return err
202
+	}
203
+	routeName, err := resolveRouteName(args)
204
+	if err != nil {
205
+		return err
206
+	}
207
+	route, err := cmdutil.UnsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
208
+	if err != nil {
209
+		return err
210
+	}
211
+
212
+	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
213
+
214
+	route.Spec.TLS = new(api.TLSConfig)
215
+	route.Spec.TLS.Termination = api.TLSTerminationPassthrough
216
+
217
+	route, err = oc.Routes(ns).Create(route)
218
+	if err != nil {
219
+		return err
220
+	}
221
+	mapper, typer := f.Object(false)
222
+	resourceMapper := &resource.Mapper{
223
+		ObjectTyper:  typer,
224
+		RESTMapper:   mapper,
225
+		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
226
+	}
227
+	info, err := resourceMapper.InfoForObject(route, nil)
228
+	if err != nil {
229
+		return err
230
+	}
231
+	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
232
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
233
+	return nil
234
+}
235
+
236
+const (
237
+	reencryptRouteLong = `
238
+Create a route that uses reencrypt TLS termination
239
+
240
+Specify the service (either just its name or using type/name syntax) that the
241
+generated route should expose via the --service flag. A destination CA certificate
242
+is needed for reencrypt routes, specify one with the --dest-ca-cert flag.`
243
+
244
+	reencryptRouteExample = `  # Create a route named "my-route" that exposes the frontend service.
245
+  %[1]s create route reencrypt my-route --service=frontend --dest-ca-cert cert.cert
246
+
247
+  # Create a reencrypt route that exposes the frontend service and re-use
248
+  # the service name as the route name.
249
+  %[1]s create route reencrypt --service=frontend --dest-ca-cert cert.cert`
250
+)
251
+
252
+// NewCmdCreateReencryptRoute is a macro command to create a reencrypt route.
253
+func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
254
+	cmd := &cobra.Command{
255
+		Use:     "reencrypt [NAME] --dest-ca-cert=FILENAME --service=SERVICE",
256
+		Short:   "Create a route that uses reencrypt TLS termination",
257
+		Long:    reencryptRouteLong,
258
+		Example: fmt.Sprintf(reencryptRouteExample, fullName),
259
+		Run: func(cmd *cobra.Command, args []string) {
260
+			err := CreateReencryptRoute(f, out, cmd, args)
261
+			kcmdutil.CheckErr(err)
262
+		},
263
+	}
264
+
265
+	kcmdutil.AddValidateFlags(cmd)
266
+	kcmdutil.AddOutputFlagsForMutation(cmd)
267
+	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
268
+	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
269
+	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
270
+	cmd.MarkFlagRequired("service")
271
+	cmd.Flags().String("path", "", "Path that the router watches to route traffic to the service.")
272
+	cmd.Flags().String("cert", "", "Path to a certificate file.")
273
+	cmd.MarkFlagFilename("cert")
274
+	cmd.Flags().String("key", "", "Path to a key file.")
275
+	cmd.MarkFlagFilename("key")
276
+	cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
277
+	cmd.MarkFlagFilename("ca-cert")
278
+	cmd.Flags().String("dest-ca-cert", "", "Path to a CA certificate file, used for securing the connection from the router to the destination.")
279
+	cmd.MarkFlagRequired("dest-ca-cert")
280
+	cmd.MarkFlagFilename("dest-ca-cert")
281
+
282
+	return cmd
283
+}
284
+
285
+// CreateReencryptRoute implements the behavior to run the create reencrypt route command.
286
+func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
287
+	oc, kc, err := f.Clients()
288
+	if err != nil {
289
+		return err
290
+	}
291
+	ns, _, err := f.DefaultNamespace()
292
+	if err != nil {
293
+		return err
294
+	}
295
+	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
296
+	if err != nil {
297
+		return err
298
+	}
299
+	routeName, err := resolveRouteName(args)
300
+	if err != nil {
301
+		return err
302
+	}
303
+	route, err := cmdutil.UnsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
304
+	if err != nil {
305
+		return err
306
+	}
307
+
308
+	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
309
+	route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
310
+
311
+	route.Spec.TLS = new(api.TLSConfig)
312
+	route.Spec.TLS.Termination = api.TLSTerminationReencrypt
313
+
314
+	cert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "cert"))
315
+	if err != nil {
316
+		return err
317
+	}
318
+	route.Spec.TLS.Certificate = string(cert)
319
+	key, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "key"))
320
+	if err != nil {
321
+		return err
322
+	}
323
+	route.Spec.TLS.Key = string(key)
324
+	caCert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "ca-cert"))
325
+	if err != nil {
326
+		return err
327
+	}
328
+	route.Spec.TLS.CACertificate = string(caCert)
329
+	destCACert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "dest-ca-cert"))
330
+	if err != nil {
331
+		return err
332
+	}
333
+	route.Spec.TLS.DestinationCACertificate = string(destCACert)
334
+
335
+	route, err = oc.Routes(ns).Create(route)
336
+	if err != nil {
337
+		return err
338
+	}
339
+	mapper, typer := f.Object(false)
340
+	resourceMapper := &resource.Mapper{
341
+		ObjectTyper:  typer,
342
+		RESTMapper:   mapper,
343
+		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
344
+	}
345
+	info, err := resourceMapper.InfoForObject(route, nil)
346
+	if err != nil {
347
+		return err
348
+	}
349
+	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
350
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
351
+	return nil
352
+}
353
+
354
+func resolveServiceName(f *clientcmd.Factory, resource string) (string, error) {
355
+	if len(resource) == 0 {
356
+		return "", fmt.Errorf("you need to provide a service name via --service")
357
+	}
358
+	mapper, _ := f.Object(false)
359
+	rType, name, err := cmdutil.ResolveResource(kapi.Resource("services"), resource, mapper)
360
+	if err != nil {
361
+		return "", err
362
+	}
363
+	if rType != kapi.Resource("services") {
364
+		return "", fmt.Errorf("cannot expose %v as routes", rType)
365
+	}
366
+	return name, nil
367
+}
368
+
369
+func resolveRouteName(args []string) (string, error) {
370
+	switch len(args) {
371
+	case 0:
372
+	case 1:
373
+		return args[0], nil
374
+	default:
375
+		return "", fmt.Errorf("multiple names provided. Please specify at most one")
376
+	}
377
+	return "", nil
378
+}
0 379
deleted file mode 100644
... ...
@@ -1,463 +0,0 @@
1
-package cmd
2
-
3
-import (
4
-	"fmt"
5
-	"io"
6
-	"strconv"
7
-
8
-	"github.com/spf13/cobra"
9
-
10
-	kapi "k8s.io/kubernetes/pkg/api"
11
-	kclient "k8s.io/kubernetes/pkg/client/unversioned"
12
-	kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
13
-	"k8s.io/kubernetes/pkg/kubectl/resource"
14
-	"k8s.io/kubernetes/pkg/util/intstr"
15
-
16
-	cmdutil "github.com/openshift/origin/pkg/cmd/util"
17
-	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
18
-	"github.com/openshift/origin/pkg/route/api"
19
-	fileutil "github.com/openshift/origin/pkg/util/file"
20
-)
21
-
22
-const (
23
-	routeLong = `
24
-Expose containers externally via secured routes
25
-
26
-Three types of secured routes are supported: edge, passthrough, and reencrypt.
27
-If you wish to create unsecured routes, see "%[1]s expose -h"
28
-`
29
-)
30
-
31
-// NewCmdCreateRoute is a macro command to create a secured route.
32
-func NewCmdCreateRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
33
-	cmd := &cobra.Command{
34
-		Use:   "route",
35
-		Short: "Expose containers externally via secured routes",
36
-		Long:  fmt.Sprintf(routeLong, fullName),
37
-		Run:   cmdutil.DefaultSubCommandRun(out),
38
-	}
39
-
40
-	cmd.AddCommand(NewCmdCreateEdgeRoute(fullName, f, out))
41
-	cmd.AddCommand(NewCmdCreatePassthroughRoute(fullName, f, out))
42
-	cmd.AddCommand(NewCmdCreateReencryptRoute(fullName, f, out))
43
-
44
-	return cmd
45
-}
46
-
47
-const (
48
-	edgeRouteLong = `
49
-Create a route that uses edge TLS termination
50
-
51
-Specify the service (either just its name or using type/name syntax) that the
52
-generated route should expose via the --service flag.`
53
-
54
-	edgeRouteExample = `  # Create an edge route named "my-route" that exposes frontend service.
55
-  %[1]s create route edge my-route --service=frontend
56
-
57
-  # Create an edge route that exposes the frontend service and specify a path.
58
-  # If the route name is omitted, the service name will be re-used.
59
-  %[1]s create route edge --service=frontend --path /assets`
60
-)
61
-
62
-// NewCmdCreateEdgeRoute is a macro command to create an edge route.
63
-func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
64
-	cmd := &cobra.Command{
65
-		Use:     "edge [NAME] --service=SERVICE",
66
-		Short:   "Create a route that uses edge TLS termination",
67
-		Long:    edgeRouteLong,
68
-		Example: fmt.Sprintf(edgeRouteExample, fullName),
69
-		Run: func(cmd *cobra.Command, args []string) {
70
-			err := CreateEdgeRoute(f, out, cmd, args)
71
-			kcmdutil.CheckErr(err)
72
-		},
73
-	}
74
-
75
-	kcmdutil.AddValidateFlags(cmd)
76
-	kcmdutil.AddOutputFlagsForMutation(cmd)
77
-	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
78
-	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
79
-	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
80
-	cmd.MarkFlagRequired("service")
81
-	cmd.Flags().String("path", "", "Path that the router watches to route traffic to the service.")
82
-	cmd.Flags().String("cert", "", "Path to a certificate file.")
83
-	cmd.MarkFlagFilename("cert")
84
-	cmd.Flags().String("key", "", "Path to a key file.")
85
-	cmd.MarkFlagFilename("key")
86
-	cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
87
-	cmd.MarkFlagFilename("ca-cert")
88
-
89
-	return cmd
90
-}
91
-
92
-// CreateEdgeRoute implements the behavior to run the create edge route command.
93
-func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
94
-	oc, kc, err := f.Clients()
95
-	if err != nil {
96
-		return err
97
-	}
98
-	ns, _, err := f.DefaultNamespace()
99
-	if err != nil {
100
-		return err
101
-	}
102
-	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
103
-	if err != nil {
104
-		return err
105
-	}
106
-	routeName, err := resolveRouteName(args)
107
-	if err != nil {
108
-		return err
109
-	}
110
-	route, err := unsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
111
-	if err != nil {
112
-		return err
113
-	}
114
-
115
-	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
116
-	route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
117
-
118
-	route.Spec.TLS = new(api.TLSConfig)
119
-	route.Spec.TLS.Termination = api.TLSTerminationEdge
120
-	cert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "cert"))
121
-	if err != nil {
122
-		return err
123
-	}
124
-	route.Spec.TLS.Certificate = string(cert)
125
-	key, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "key"))
126
-	if err != nil {
127
-		return err
128
-	}
129
-	route.Spec.TLS.Key = string(key)
130
-	caCert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "ca-cert"))
131
-	if err != nil {
132
-		return err
133
-	}
134
-	route.Spec.TLS.CACertificate = string(caCert)
135
-
136
-	route, err = oc.Routes(ns).Create(route)
137
-	if err != nil {
138
-		return err
139
-	}
140
-	mapper, typer := f.Object(false)
141
-	resourceMapper := &resource.Mapper{
142
-		ObjectTyper:  typer,
143
-		RESTMapper:   mapper,
144
-		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
145
-	}
146
-	info, err := resourceMapper.InfoForObject(route, nil)
147
-	if err != nil {
148
-		return err
149
-	}
150
-	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
151
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
152
-	return nil
153
-}
154
-
155
-const (
156
-	passthroughRouteLong = `
157
-Create a route that uses passthrough TLS termination
158
-
159
-Specify the service (either just its name or using type/name syntax) that the
160
-generated route should expose via the --service flag.`
161
-
162
-	passthroughRouteExample = `  # Create a passthrough route named "my-route" that exposes the frontend service.
163
-  %[1]s create route passthrough my-route --service=frontend
164
-
165
-  # Create a passthrough route that exposes the frontend service and specify
166
-  # a hostname. If the route name is omitted, the service name will be re-used.
167
-  %[1]s create route passthrough --service=frontend --hostname=www.example.com`
168
-)
169
-
170
-// NewCmdCreatePassthroughRoute is a macro command to create a passthrough route.
171
-func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
172
-	cmd := &cobra.Command{
173
-		Use:     "passthrough [NAME] --service=SERVICE",
174
-		Short:   "Create a route that uses passthrough TLS termination",
175
-		Long:    passthroughRouteLong,
176
-		Example: fmt.Sprintf(passthroughRouteExample, fullName),
177
-		Run: func(cmd *cobra.Command, args []string) {
178
-			err := CreatePassthroughRoute(f, out, cmd, args)
179
-			kcmdutil.CheckErr(err)
180
-		},
181
-	}
182
-
183
-	kcmdutil.AddValidateFlags(cmd)
184
-	kcmdutil.AddOutputFlagsForMutation(cmd)
185
-	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
186
-	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
187
-	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
188
-	cmd.MarkFlagRequired("service")
189
-
190
-	return cmd
191
-}
192
-
193
-// CreatePassthroughRoute implements the behavior to run the create passthrough route command.
194
-func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
195
-	oc, kc, err := f.Clients()
196
-	if err != nil {
197
-		return err
198
-	}
199
-	ns, _, err := f.DefaultNamespace()
200
-	if err != nil {
201
-		return err
202
-	}
203
-	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
204
-	if err != nil {
205
-		return err
206
-	}
207
-	routeName, err := resolveRouteName(args)
208
-	if err != nil {
209
-		return err
210
-	}
211
-	route, err := unsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
212
-	if err != nil {
213
-		return err
214
-	}
215
-
216
-	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
217
-
218
-	route.Spec.TLS = new(api.TLSConfig)
219
-	route.Spec.TLS.Termination = api.TLSTerminationPassthrough
220
-
221
-	route, err = oc.Routes(ns).Create(route)
222
-	if err != nil {
223
-		return err
224
-	}
225
-	mapper, typer := f.Object(false)
226
-	resourceMapper := &resource.Mapper{
227
-		ObjectTyper:  typer,
228
-		RESTMapper:   mapper,
229
-		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
230
-	}
231
-	info, err := resourceMapper.InfoForObject(route, nil)
232
-	if err != nil {
233
-		return err
234
-	}
235
-	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
236
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
237
-	return nil
238
-}
239
-
240
-const (
241
-	reencryptRouteLong = `
242
-Create a route that uses reencrypt TLS termination
243
-
244
-Specify the service (either just its name or using type/name syntax) that the
245
-generated route should expose via the --service flag. A destination CA certificate
246
-is needed for reencrypt routes, specify one with the --dest-ca-cert flag.`
247
-
248
-	reencryptRouteExample = `  # Create a route named "my-route" that exposes the frontend service.
249
-  %[1]s create route reencrypt my-route --service=frontend --dest-ca-cert cert.cert
250
-
251
-  # Create a reencrypt route that exposes the frontend service and re-use
252
-  # the service name as the route name.
253
-  %[1]s create route reencrypt --service=frontend --dest-ca-cert cert.cert`
254
-)
255
-
256
-// NewCmdCreateReencryptRoute is a macro command to create a reencrypt route.
257
-func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
258
-	cmd := &cobra.Command{
259
-		Use:     "reencrypt [NAME] --dest-ca-cert=FILENAME --service=SERVICE",
260
-		Short:   "Create a route that uses reencrypt TLS termination",
261
-		Long:    reencryptRouteLong,
262
-		Example: fmt.Sprintf(reencryptRouteExample, fullName),
263
-		Run: func(cmd *cobra.Command, args []string) {
264
-			err := CreateReencryptRoute(f, out, cmd, args)
265
-			kcmdutil.CheckErr(err)
266
-		},
267
-	}
268
-
269
-	kcmdutil.AddValidateFlags(cmd)
270
-	kcmdutil.AddOutputFlagsForMutation(cmd)
271
-	cmd.Flags().String("hostname", "", "Set a hostname for the new route")
272
-	cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
273
-	cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
274
-	cmd.MarkFlagRequired("service")
275
-	cmd.Flags().String("path", "", "Path that the router watches to route traffic to the service.")
276
-	cmd.Flags().String("cert", "", "Path to a certificate file.")
277
-	cmd.MarkFlagFilename("cert")
278
-	cmd.Flags().String("key", "", "Path to a key file.")
279
-	cmd.MarkFlagFilename("key")
280
-	cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
281
-	cmd.MarkFlagFilename("ca-cert")
282
-	cmd.Flags().String("dest-ca-cert", "", "Path to a CA certificate file, used for securing the connection from the router to the destination.")
283
-	cmd.MarkFlagRequired("dest-ca-cert")
284
-	cmd.MarkFlagFilename("dest-ca-cert")
285
-
286
-	return cmd
287
-}
288
-
289
-// CreateReencryptRoute implements the behavior to run the create reencrypt route command.
290
-func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, args []string) error {
291
-	oc, kc, err := f.Clients()
292
-	if err != nil {
293
-		return err
294
-	}
295
-	ns, _, err := f.DefaultNamespace()
296
-	if err != nil {
297
-		return err
298
-	}
299
-	serviceName, err := resolveServiceName(f, kcmdutil.GetFlagString(cmd, "service"))
300
-	if err != nil {
301
-		return err
302
-	}
303
-	routeName, err := resolveRouteName(args)
304
-	if err != nil {
305
-		return err
306
-	}
307
-	route, err := unsecuredRoute(kc, ns, routeName, serviceName, kcmdutil.GetFlagString(cmd, "port"))
308
-	if err != nil {
309
-		return err
310
-	}
311
-
312
-	route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
313
-	route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
314
-
315
-	route.Spec.TLS = new(api.TLSConfig)
316
-	route.Spec.TLS.Termination = api.TLSTerminationReencrypt
317
-
318
-	cert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "cert"))
319
-	if err != nil {
320
-		return err
321
-	}
322
-	route.Spec.TLS.Certificate = string(cert)
323
-	key, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "key"))
324
-	if err != nil {
325
-		return err
326
-	}
327
-	route.Spec.TLS.Key = string(key)
328
-	caCert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "ca-cert"))
329
-	if err != nil {
330
-		return err
331
-	}
332
-	route.Spec.TLS.CACertificate = string(caCert)
333
-	destCACert, err := fileutil.LoadData(kcmdutil.GetFlagString(cmd, "dest-ca-cert"))
334
-	if err != nil {
335
-		return err
336
-	}
337
-	route.Spec.TLS.DestinationCACertificate = string(destCACert)
338
-
339
-	route, err = oc.Routes(ns).Create(route)
340
-	if err != nil {
341
-		return err
342
-	}
343
-	mapper, typer := f.Object(false)
344
-	resourceMapper := &resource.Mapper{
345
-		ObjectTyper:  typer,
346
-		RESTMapper:   mapper,
347
-		ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
348
-	}
349
-	info, err := resourceMapper.InfoForObject(route, nil)
350
-	if err != nil {
351
-		return err
352
-	}
353
-	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
354
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "created")
355
-	return nil
356
-}
357
-
358
-// unsecuredRoute will return a route with enough info so that it can direct traffic to
359
-// the service provided by --service. Callers of this helper are responsible for providing
360
-// tls configuration, path, and the hostname of the route.
361
-func unsecuredRoute(kc *kclient.Client, namespace, routeName, serviceName, portString string) (*api.Route, error) {
362
-	if len(routeName) == 0 {
363
-		routeName = serviceName
364
-	}
365
-
366
-	svc, err := kc.Services(namespace).Get(serviceName)
367
-	if err != nil {
368
-		if len(portString) == 0 {
369
-			return nil, fmt.Errorf("you need to provide a route port via --port when exposing a non-existent service")
370
-		}
371
-		return &api.Route{
372
-			ObjectMeta: kapi.ObjectMeta{
373
-				Name: routeName,
374
-			},
375
-			Spec: api.RouteSpec{
376
-				To: api.RouteTargetReference{
377
-					Name: serviceName,
378
-				},
379
-				Port: resolveRoutePort(portString),
380
-			},
381
-		}, nil
382
-	}
383
-
384
-	ok, port := supportsTCP(svc)
385
-	if !ok {
386
-		return nil, fmt.Errorf("service %q doesn't support TCP", svc.Name)
387
-	}
388
-
389
-	route := &api.Route{
390
-		ObjectMeta: kapi.ObjectMeta{
391
-			Name:   routeName,
392
-			Labels: svc.Labels,
393
-		},
394
-		Spec: api.RouteSpec{
395
-			To: api.RouteTargetReference{
396
-				Name: serviceName,
397
-			},
398
-		},
399
-	}
400
-
401
-	// If the service has multiple ports and the user didn't specify --port,
402
-	// then default the route port to a service port name.
403
-	if len(port.Name) > 0 && len(portString) == 0 {
404
-		route.Spec.Port = resolveRoutePort(port.Name)
405
-	}
406
-	// --port uber alles
407
-	if len(portString) > 0 {
408
-		route.Spec.Port = resolveRoutePort(portString)
409
-	}
410
-
411
-	return route, nil
412
-}
413
-
414
-func resolveServiceName(f *clientcmd.Factory, resource string) (string, error) {
415
-	if len(resource) == 0 {
416
-		return "", fmt.Errorf("you need to provide a service name via --service")
417
-	}
418
-	mapper, _ := f.Object(false)
419
-	rType, name, err := cmdutil.ResolveResource(kapi.Resource("services"), resource, mapper)
420
-	if err != nil {
421
-		return "", err
422
-	}
423
-	if rType != kapi.Resource("services") {
424
-		return "", fmt.Errorf("cannot expose %v as routes", rType)
425
-	}
426
-	return name, nil
427
-}
428
-
429
-func resolveRouteName(args []string) (string, error) {
430
-	switch len(args) {
431
-	case 0:
432
-	case 1:
433
-		return args[0], nil
434
-	default:
435
-		return "", fmt.Errorf("multiple names provided. Please specify at most one")
436
-	}
437
-	return "", nil
438
-}
439
-
440
-func resolveRoutePort(portString string) *api.RoutePort {
441
-	if len(portString) == 0 {
442
-		return nil
443
-	}
444
-	var routePort intstr.IntOrString
445
-	integer, err := strconv.Atoi(portString)
446
-	if err != nil {
447
-		routePort = intstr.FromString(portString)
448
-	} else {
449
-		routePort = intstr.FromInt(integer)
450
-	}
451
-	return &api.RoutePort{
452
-		TargetPort: routePort,
453
-	}
454
-}
455
-
456
-func supportsTCP(svc *kapi.Service) (bool, kapi.ServicePort) {
457
-	for _, port := range svc.Spec.Ports {
458
-		if port.Protocol == kapi.ProtocolTCP {
459
-			return true, port
460
-		}
461
-	}
462
-	return false, kapi.ServicePort{}
463
-}
... ...
@@ -10,6 +10,7 @@ import (
10 10
 	kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
11 11
 	"k8s.io/kubernetes/pkg/kubectl/resource"
12 12
 
13
+	cmdutil "github.com/openshift/origin/pkg/cmd/util"
13 14
 	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
14 15
 )
15 16
 
... ...
@@ -111,7 +112,7 @@ func validate(cmd *cobra.Command, f *clientcmd.Factory, args []string) error {
111 111
 			cmd.Flags().Set("generator", generator)
112 112
 			fallthrough
113 113
 		case "route/v1":
114
-			route, err := unsecuredRoute(kc, namespace, info.Name, info.Name, kcmdutil.GetFlagString(cmd, "port"))
114
+			route, err := cmdutil.UnsecuredRoute(kc, namespace, info.Name, info.Name, kcmdutil.GetFlagString(cmd, "port"))
115 115
 			if err != nil {
116 116
 				return err
117 117
 			}
118 118
new file mode 100644
... ...
@@ -0,0 +1,136 @@
0
+package rollout
1
+
2
+import (
3
+	"fmt"
4
+	"io"
5
+
6
+	"github.com/spf13/cobra"
7
+	"k8s.io/kubernetes/pkg/kubectl/cmd/rollout"
8
+
9
+	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
10
+)
11
+
12
+const (
13
+	rolloutLong = `
14
+Manage deployments.
15
+`
16
+)
17
+
18
+// NewCmdRollout facilitates kubectl rollout subcommands
19
+func NewCmdRollout(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
20
+	cmd := &cobra.Command{
21
+		Use:   "rollout SUBCOMMAND",
22
+		Short: "rollout manages a deployment",
23
+		Long:  rolloutLong,
24
+		Run: func(cmd *cobra.Command, args []string) {
25
+			cmd.Help()
26
+		},
27
+	}
28
+
29
+	// subcommands
30
+	cmd.AddCommand(NewCmdRolloutHistory(fullName, f, out))
31
+	cmd.AddCommand(NewCmdRolloutPause(fullName, f, out))
32
+	cmd.AddCommand(NewCmdRolloutResume(fullName, f, out))
33
+	cmd.AddCommand(NewCmdRolloutUndo(fullName, f, out))
34
+
35
+	return cmd
36
+}
37
+
38
+const (
39
+	rolloutHistoryLong = `
40
+View the history of rollouts for a specific deployment config
41
+
42
+You can also view more detailed information for a specific revision
43
+by using the --revision flag.
44
+`
45
+
46
+	rolloutHistoryExample = `  # View the rollout history of a deployment
47
+  %[1]s rollout history dc/nginx
48
+
49
+  # View the details of deployment revision 3
50
+  %[1]s rollout history dc/nginx --revision=3`
51
+)
52
+
53
+// NewCmdRolloutHistory is a wrapper for the Kubernetes cli rollout history command
54
+func NewCmdRolloutHistory(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
55
+	cmd := rollout.NewCmdRolloutHistory(f.Factory, out)
56
+	cmd.Long = rolloutHistoryLong
57
+	cmd.Example = fmt.Sprintf(rolloutHistoryExample, fullName)
58
+	return cmd
59
+}
60
+
61
+const (
62
+	rolloutPauseLong = `
63
+Mark the provided resource as paused
64
+
65
+Paused resources will not be reconciled by a controller.
66
+Use \"%[1]s rollout resume\" to resume a paused resource.`
67
+
68
+	rolloutPauseExample = `  # Mark the nginx deployment as paused. Any current state of
69
+  # the deployment will continue its function, new updates to the deployment will not
70
+  # have an effect as long as the deployment is paused.
71
+  %[1]s rollout pause dc/nginx`
72
+)
73
+
74
+// NewCmdRolloutPause is a wrapper for the Kubernetes cli rollout pause command
75
+func NewCmdRolloutPause(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
76
+	cmd := rollout.NewCmdRolloutPause(f.Factory, out)
77
+	cmd.Long = rolloutPauseLong
78
+	cmd.Example = fmt.Sprintf(rolloutPauseExample, fullName)
79
+	return cmd
80
+}
81
+
82
+const (
83
+	rolloutResumeLong = `
84
+Resume a paused resource
85
+
86
+Paused resources will not be reconciled by a controller. By resuming a
87
+resource, we allow it to be reconciled again.`
88
+
89
+	rolloutResumeExample = `  # Resume an already paused deployment
90
+  %[1]s rollout resume dc/nginx`
91
+)
92
+
93
+// NewCmdRolloutResume is a wrapper for the Kubernetes cli rollout resume command
94
+func NewCmdRolloutResume(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
95
+	cmd := rollout.NewCmdRolloutResume(f.Factory, out)
96
+	cmd.Long = rolloutResumeLong
97
+	cmd.Example = fmt.Sprintf(rolloutResumeExample, fullName)
98
+	return cmd
99
+}
100
+
101
+const (
102
+	rolloutUndoLong = `
103
+Revert an application back to a previous deployment
104
+
105
+When you run this command your deployment configuration will be updated to
106
+match a previous deployment. By default only the pod and container
107
+configuration will be changed and scaling or trigger settings will be left as-
108
+is. Note that environment variables and volumes are included in rollbacks, so
109
+if you've recently updated security credentials in your environment your
110
+previous deployment may not have the correct values.
111
+
112
+Any image triggers present in the rolled back configuration will be disabled
113
+with a warning. This is to help prevent your rolled back deployment from being
114
+replaced by a triggered deployment soon after your rollback. To re-enable the
115
+triggers, use the 'deploy --enable-triggers' command.
116
+
117
+If you would like to review the outcome of the rollback, pass '--dry-run' to print
118
+a human-readable representation of the updated deployment configuration instead of
119
+executing the rollback. This is useful if you're not quite sure what the outcome
120
+will be.`
121
+
122
+	rolloutUndoExample = `  # Rollback to the previous deployment
123
+  %[1]s rollout undo dc/nginx
124
+
125
+  # Rollback to deployment revision 3. The replication controller for that version must exist.
126
+  %[1]s rollout undo dc/nginx --to-revision=3`
127
+)
128
+
129
+// NewCmdRolloutUndo is a wrapper for the Kubernetes cli rollout undo command
130
+func NewCmdRolloutUndo(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
131
+	cmd := rollout.NewCmdRolloutUndo(f.Factory, out)
132
+	cmd.Long = rolloutUndoLong
133
+	cmd.Example = fmt.Sprintf(rolloutUndoExample, fullName)
134
+	return cmd
135
+}
... ...
@@ -20,13 +20,18 @@ import (
20 20
 	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
21 21
 )
22 22
 
23
-func tab(original string) string {
24
-	lines := []string{}
25
-	scanner := bufio.NewScanner(strings.NewReader(original))
23
+func adjustCmdExamples(cmd *cobra.Command, parentName string, name string) {
24
+	for _, subCmd := range cmd.Commands() {
25
+		adjustCmdExamples(subCmd, parentName, cmd.Name())
26
+	}
27
+	cmd.Example = strings.Replace(cmd.Example, "kubectl", parentName, -1)
28
+	tabbing := "  "
29
+	examples := []string{}
30
+	scanner := bufio.NewScanner(strings.NewReader(cmd.Example))
26 31
 	for scanner.Scan() {
27
-		lines = append(lines, "  "+scanner.Text())
32
+		examples = append(examples, tabbing+strings.TrimSpace(scanner.Text()))
28 33
 	}
29
-	return strings.Join(lines, "\n")
34
+	cmd.Example = strings.Join(examples, "\n")
30 35
 }
31 36
 
32 37
 const (
... ...
@@ -163,7 +168,7 @@ func NewCmdCreate(parentName string, f *clientcmd.Factory, out io.Writer) *cobra
163 163
 	cmd.Example = fmt.Sprintf(createExample, parentName)
164 164
 
165 165
 	// create subcommands
166
-	cmd.AddCommand(NewCmdCreateRoute(parentName, f, out))
166
+	cmd.AddCommand(create.NewCmdCreateRoute(parentName, f, out))
167 167
 	cmd.AddCommand(create.NewCmdCreatePolicyBinding(create.PolicyBindingRecommendedName, parentName+" create "+create.PolicyBindingRecommendedName, f, out))
168 168
 	cmd.AddCommand(create.NewCmdCreateDeploymentConfig(create.DeploymentConfigRecommendedName, parentName+" create "+create.DeploymentConfigRecommendedName, f, out))
169 169
 	cmd.AddCommand(create.NewCmdCreateClusterQuota(create.ClusterQuotaRecommendedName, parentName+" create "+create.ClusterQuotaRecommendedName, f, out))
... ...
@@ -514,6 +519,7 @@ JSON and YAML formats are accepted.`
514 514
 cat pod.json | %[1]s apply -f -`
515 515
 )
516 516
 
517
+// NewCmdApply is a wrapper for the Kubernetes cli apply command
517 518
 func NewCmdApply(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
518 519
 	cmd := kcmd.NewCmdApply(f.Factory, out)
519 520
 	cmd.Long = applyLong
... ...
@@ -536,6 +542,7 @@ resourcequotas (quota), namespaces (ns) or endpoints (ep).`
536 536
 %[1]s explain pods.spec.containers`
537 537
 )
538 538
 
539
+// NewCmdExplain is a wrapper for the Kubernetes cli explain command
539 540
 func NewCmdExplain(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
540 541
 	cmd := kcmd.NewCmdExplain(f.Factory, out)
541 542
 	cmd.Long = explainLong
... ...
@@ -566,6 +573,7 @@ to change to output destination.
566 566
 `
567 567
 )
568 568
 
569
+// NewCmdConvert is a wrapper for the Kubernetes cli convert command
569 570
 func NewCmdConvert(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
570 571
 	cmd := kcmd.NewCmdConvert(f.Factory, out)
571 572
 	cmd.Long = convertLong
... ...
@@ -608,6 +616,7 @@ saved copy to include the latest resource version.`
608 608
   %[1]s edit svc/docker-registry --output-version=v1beta3 -o json`
609 609
 )
610 610
 
611
+// NewCmdEdit is a wrapper for the Kubernetes cli edit command
611 612
 func NewCmdEdit(fullName string, f *clientcmd.Factory, out, errout io.Writer) *cobra.Command {
612 613
 	cmd := kcmd.NewCmdEdit(f.Factory, out, errout)
613 614
 	cmd.Long = editLong
... ...
@@ -632,6 +641,7 @@ Reference: https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/
632 632
   %[1]s %[2]s set preferences.some true`
633 633
 )
634 634
 
635
+// NewCmdConfig is a wrapper for the Kubernetes cli config command
635 636
 func NewCmdConfig(parentName, name string) *cobra.Command {
636 637
 	pathOptions := &kclientcmd.PathOptions{
637 638
 		GlobalFile:       cmdconfig.RecommendedHomeFile,
... ...
@@ -651,17 +661,3 @@ func NewCmdConfig(parentName, name string) *cobra.Command {
651 651
 	adjustCmdExamples(cmd, parentName, name)
652 652
 	return cmd
653 653
 }
654
-
655
-func adjustCmdExamples(cmd *cobra.Command, parentName string, name string) {
656
-	for _, subCmd := range cmd.Commands() {
657
-		adjustCmdExamples(subCmd, parentName, cmd.Name())
658
-	}
659
-	cmd.Example = strings.Replace(cmd.Example, "kubectl", parentName, -1)
660
-	tabbing := "  "
661
-	examples := []string{}
662
-	scanner := bufio.NewScanner(strings.NewReader(cmd.Example))
663
-	for scanner.Scan() {
664
-		examples = append(examples, tabbing+strings.TrimSpace(scanner.Text()))
665
-	}
666
-	cmd.Example = strings.Join(examples, "\n")
667
-}
... ...
@@ -23,7 +23,6 @@ var MissingCommands = sets.NewString(
23 23
 	"cordon",
24 24
 	"drain",
25 25
 	"uncordon",
26
-	"rollout",
27 26
 )
28 27
 
29 28
 // WhitelistedCommands is the list of commands we're never going to have in oc
... ...
@@ -48,6 +48,7 @@ import (
48 48
 	"github.com/openshift/origin/pkg/cmd/cli/describe"
49 49
 	"github.com/openshift/origin/pkg/cmd/util"
50 50
 	deployapi "github.com/openshift/origin/pkg/deploy/api"
51
+	deploycmd "github.com/openshift/origin/pkg/deploy/cmd"
51 52
 	deploygen "github.com/openshift/origin/pkg/deploy/generator"
52 53
 	deployreaper "github.com/openshift/origin/pkg/deploy/reaper"
53 54
 	deployscaler "github.com/openshift/origin/pkg/deploy/scaler"
... ...
@@ -425,6 +426,72 @@ func NewFactory(clientConfig kclientcmd.ClientConfig) *Factory {
425 425
 		return []string{"OC_EDITOR", "EDITOR"}
426 426
 	}
427 427
 	w.PrintObjectSpecificMessage = func(obj runtime.Object, out io.Writer) {}
428
+	kPauseObjectFunc := w.Factory.PauseObject
429
+	w.Factory.PauseObject = func(object runtime.Object) (bool, error) {
430
+		oc, _, err := w.Clients()
431
+		if err != nil {
432
+			return false, err
433
+		}
434
+
435
+		switch t := object.(type) {
436
+		case *deployapi.DeploymentConfig:
437
+			if t.Spec.Paused {
438
+				return true, nil
439
+			}
440
+			t.Spec.Paused = true
441
+			_, err := oc.DeploymentConfigs(t.Namespace).Update(t)
442
+			// TODO: Pause the deployer containers.
443
+			return false, err
444
+		default:
445
+			return kPauseObjectFunc(object)
446
+		}
447
+	}
448
+	kResumeObjectFunc := w.Factory.ResumeObject
449
+	w.Factory.ResumeObject = func(object runtime.Object) (bool, error) {
450
+		oc, _, err := w.Clients()
451
+		if err != nil {
452
+			return false, err
453
+		}
454
+
455
+		switch t := object.(type) {
456
+		case *deployapi.DeploymentConfig:
457
+			if !t.Spec.Paused {
458
+				return true, nil
459
+			}
460
+			t.Spec.Paused = false
461
+			_, err := oc.DeploymentConfigs(t.Namespace).Update(t)
462
+			// TODO: Resume the deployer containers.
463
+			return false, err
464
+		default:
465
+			return kResumeObjectFunc(object)
466
+		}
467
+	}
468
+	kHistoryViewerFunc := w.Factory.HistoryViewer
469
+	w.Factory.HistoryViewer = func(mapping *meta.RESTMapping) (kubectl.HistoryViewer, error) {
470
+		oc, kc, err := w.Clients()
471
+		if err != nil {
472
+			return nil, err
473
+		}
474
+
475
+		switch mapping.GroupVersionKind.GroupKind() {
476
+		case deployapi.Kind("DeploymentConfig"):
477
+			return deploycmd.NewDeploymentConfigHistoryViewer(oc, kc), nil
478
+		}
479
+		return kHistoryViewerFunc(mapping)
480
+	}
481
+	kRollbackerFunc := w.Factory.Rollbacker
482
+	w.Factory.Rollbacker = func(mapping *meta.RESTMapping) (kubectl.Rollbacker, error) {
483
+		oc, _, err := w.Clients()
484
+		if err != nil {
485
+			return nil, err
486
+		}
487
+
488
+		switch mapping.GroupVersionKind.GroupKind() {
489
+		case deployapi.Kind("DeploymentConfig"):
490
+			return deploycmd.NewDeploymentConfigRollbacker(oc), nil
491
+		}
492
+		return kRollbackerFunc(mapping)
493
+	}
428 494
 
429 495
 	return w
430 496
 }
431 497
new file mode 100644
... ...
@@ -0,0 +1,93 @@
0
+package util
1
+
2
+import (
3
+	"fmt"
4
+	"strconv"
5
+
6
+	kapi "k8s.io/kubernetes/pkg/api"
7
+	kclient "k8s.io/kubernetes/pkg/client/unversioned"
8
+	"k8s.io/kubernetes/pkg/util/intstr"
9
+
10
+	"github.com/openshift/origin/pkg/route/api"
11
+)
12
+
13
+// UnsecuredRoute will return a route with enough info so that it can direct traffic to
14
+// the service provided by --service. Callers of this helper are responsible for providing
15
+// tls configuration, path, and the hostname of the route.
16
+func UnsecuredRoute(kc *kclient.Client, namespace, routeName, serviceName, portString string) (*api.Route, error) {
17
+	if len(routeName) == 0 {
18
+		routeName = serviceName
19
+	}
20
+
21
+	svc, err := kc.Services(namespace).Get(serviceName)
22
+	if err != nil {
23
+		if len(portString) == 0 {
24
+			return nil, fmt.Errorf("you need to provide a route port via --port when exposing a non-existent service")
25
+		}
26
+		return &api.Route{
27
+			ObjectMeta: kapi.ObjectMeta{
28
+				Name: routeName,
29
+			},
30
+			Spec: api.RouteSpec{
31
+				To: api.RouteTargetReference{
32
+					Name: serviceName,
33
+				},
34
+				Port: resolveRoutePort(portString),
35
+			},
36
+		}, nil
37
+	}
38
+
39
+	ok, port := supportsTCP(svc)
40
+	if !ok {
41
+		return nil, fmt.Errorf("service %q doesn't support TCP", svc.Name)
42
+	}
43
+
44
+	route := &api.Route{
45
+		ObjectMeta: kapi.ObjectMeta{
46
+			Name:   routeName,
47
+			Labels: svc.Labels,
48
+		},
49
+		Spec: api.RouteSpec{
50
+			To: api.RouteTargetReference{
51
+				Name: serviceName,
52
+			},
53
+		},
54
+	}
55
+
56
+	// If the service has multiple ports and the user didn't specify --port,
57
+	// then default the route port to a service port name.
58
+	if len(port.Name) > 0 && len(portString) == 0 {
59
+		route.Spec.Port = resolveRoutePort(port.Name)
60
+	}
61
+	// --port uber alles
62
+	if len(portString) > 0 {
63
+		route.Spec.Port = resolveRoutePort(portString)
64
+	}
65
+
66
+	return route, nil
67
+}
68
+
69
+func resolveRoutePort(portString string) *api.RoutePort {
70
+	if len(portString) == 0 {
71
+		return nil
72
+	}
73
+	var routePort intstr.IntOrString
74
+	integer, err := strconv.Atoi(portString)
75
+	if err != nil {
76
+		routePort = intstr.FromString(portString)
77
+	} else {
78
+		routePort = intstr.FromInt(integer)
79
+	}
80
+	return &api.RoutePort{
81
+		TargetPort: routePort,
82
+	}
83
+}
84
+
85
+func supportsTCP(svc *kapi.Service) (bool, kapi.ServicePort) {
86
+	for _, port := range svc.Spec.Ports {
87
+		if port.Protocol == kapi.ProtocolTCP {
88
+			return true, port
89
+		}
90
+	}
91
+	return false, kapi.ServicePort{}
92
+}
... ...
@@ -257,7 +257,7 @@ const (
257 257
 // or for a deployment being placed in a failed state
258 258
 const (
259 259
 	DeploymentCancelledByUser                 = "cancelled by the user"
260
-	DeploymentCancelledNewerDeploymentExists  = "cancelled as a newer deployment was found running"
260
+	DeploymentCancelledNewerDeploymentExists  = "newer deployment was found running"
261 261
 	DeploymentFailedUnrelatedDeploymentExists = "unrelated pod with the same name as this deployment is already running"
262 262
 	DeploymentFailedDeployerPodNoLongerExists = "deployer pod no longer exists"
263 263
 )
264 264
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+// Package cmd contains various interface implementations for command-line tools
1
+// associated with deploymentconfigs.
2
+package cmd
0 3
new file mode 100644
... ...
@@ -0,0 +1,99 @@
0
+package cmd
1
+
2
+import (
3
+	"bytes"
4
+	"fmt"
5
+	"sort"
6
+	"text/tabwriter"
7
+
8
+	kapi "k8s.io/kubernetes/pkg/api"
9
+	kclient "k8s.io/kubernetes/pkg/client/unversioned"
10
+	"k8s.io/kubernetes/pkg/kubectl"
11
+
12
+	"github.com/openshift/origin/pkg/client"
13
+	deployapi "github.com/openshift/origin/pkg/deploy/api"
14
+	deployutil "github.com/openshift/origin/pkg/deploy/util"
15
+)
16
+
17
+func NewDeploymentConfigHistoryViewer(oc client.Interface, kc kclient.Interface) kubectl.HistoryViewer {
18
+	return &DeploymentConfigHistoryViewer{dn: oc, rn: kc}
19
+}
20
+
21
+// DeploymentConfigHistoryViewer is an implementation of the kubectl HistoryViewer interface
22
+// for deployment configs.
23
+type DeploymentConfigHistoryViewer struct {
24
+	rn kclient.ReplicationControllersNamespacer
25
+	dn client.DeploymentConfigsNamespacer
26
+}
27
+
28
+var _ kubectl.HistoryViewer = &DeploymentConfigHistoryViewer{}
29
+
30
+// ViewHistory returns a description of all the history it can find for a deployment config.
31
+func (h *DeploymentConfigHistoryViewer) ViewHistory(namespace, name string, revision int64) (string, error) {
32
+	opts := kapi.ListOptions{LabelSelector: deployutil.ConfigSelector(name)}
33
+	deploymentList, err := h.rn.ReplicationControllers(namespace).List(opts)
34
+	if err != nil {
35
+		return "", err
36
+	}
37
+	history := deploymentList.Items
38
+
39
+	if len(deploymentList.Items) == 0 {
40
+		return "No rollout history found.", nil
41
+	}
42
+
43
+	// Print details of a specific revision
44
+	if revision > 0 {
45
+		var desired *kapi.PodTemplateSpec
46
+		// We could use a binary search here but brute-force is always faster to write
47
+		for i := range history {
48
+			rc := history[i]
49
+
50
+			if deployutil.DeploymentVersionFor(&rc) == revision {
51
+				desired = rc.Spec.Template
52
+				break
53
+			}
54
+		}
55
+
56
+		if desired == nil {
57
+			return "", fmt.Errorf("unable to find the specified revision")
58
+		}
59
+
60
+		buf := bytes.NewBuffer([]byte{})
61
+		kubectl.DescribePodTemplate(desired, buf)
62
+		return buf.String(), nil
63
+	}
64
+
65
+	sort.Sort(deployutil.ByLatestVersionAsc(history))
66
+
67
+	return tabbedString(func(out *tabwriter.Writer) error {
68
+		fmt.Fprintf(out, "REVISION\tSTATUS\tCAUSE\n")
69
+		for i := range history {
70
+			rc := history[i]
71
+
72
+			rev := deployutil.DeploymentVersionFor(&rc)
73
+			status := deployutil.DeploymentStatusFor(&rc)
74
+			cause := rc.Annotations[deployapi.DeploymentStatusReasonAnnotation]
75
+			if len(cause) == 0 {
76
+				cause = "<unknown>"
77
+			}
78
+			fmt.Fprintf(out, "%d\t%s\t%s\n", rev, status, cause)
79
+		}
80
+		return nil
81
+	})
82
+}
83
+
84
+// TODO: Re-use from an utility package
85
+func tabbedString(f func(*tabwriter.Writer) error) (string, error) {
86
+	out := new(tabwriter.Writer)
87
+	buf := &bytes.Buffer{}
88
+	out.Init(buf, 0, 8, 1, '\t', 0)
89
+
90
+	err := f(out)
91
+	if err != nil {
92
+		return "", err
93
+	}
94
+
95
+	out.Flush()
96
+	str := string(buf.String())
97
+	return str, nil
98
+}
0 99
new file mode 100644
... ...
@@ -0,0 +1,56 @@
0
+package cmd
1
+
2
+import (
3
+	"fmt"
4
+
5
+	"k8s.io/kubernetes/pkg/kubectl"
6
+	"k8s.io/kubernetes/pkg/runtime"
7
+
8
+	"github.com/openshift/origin/pkg/client"
9
+	deployapi "github.com/openshift/origin/pkg/deploy/api"
10
+)
11
+
12
+func NewDeploymentConfigRollbacker(oc client.Interface) kubectl.Rollbacker {
13
+	return &DeploymentConfigRollbacker{dn: oc}
14
+}
15
+
16
+// DeploymentConfigRollbacker is an implementation of the kubectl Rollbacker interface
17
+// for deployment configs.
18
+type DeploymentConfigRollbacker struct {
19
+	dn client.DeploymentConfigsNamespacer
20
+}
21
+
22
+var _ kubectl.Rollbacker = &DeploymentConfigRollbacker{}
23
+
24
+// Rollback the provided deployment config to a specific revision. If revision is zero, we will
25
+// rollback to the previous deployment.
26
+func (r *DeploymentConfigRollbacker) Rollback(namespace, name string, updatedAnnotations map[string]string, toRevision int64, obj runtime.Object) (string, error) {
27
+	config, ok := obj.(*deployapi.DeploymentConfig)
28
+	if !ok {
29
+		return "", fmt.Errorf("passed object is not a deployment config: %#v", obj)
30
+	}
31
+	if config.Spec.Paused {
32
+		return "", fmt.Errorf("cannot rollback a paused config; resume it first with 'oc rollout resume dc/%s' and try again", config.Name)
33
+	}
34
+
35
+	rollback := &deployapi.DeploymentConfigRollback{
36
+		Name:               config.Name,
37
+		UpdatedAnnotations: updatedAnnotations,
38
+		Spec: deployapi.DeploymentConfigRollbackSpec{
39
+			Revision:        toRevision,
40
+			IncludeTemplate: true,
41
+		},
42
+	}
43
+
44
+	rolledback, err := r.dn.DeploymentConfigs(config.Namespace).Rollback(rollback)
45
+	if err != nil {
46
+		return "", err
47
+	}
48
+
49
+	_, err = r.dn.DeploymentConfigs(config.Namespace).Update(rolledback)
50
+	if err != nil {
51
+		return "", err
52
+	}
53
+
54
+	return "rolled back", nil
55
+}
... ...
@@ -204,6 +204,12 @@ func (c *DeploymentTriggerController) update(config *deployapi.DeploymentConfig,
204 204
 	config.Status.LatestVersion++
205 205
 	config.Status.Details = new(deployapi.DeploymentDetails)
206 206
 	config.Status.Details.Causes = causes
207
+	switch causes[0].Type {
208
+	case deployapi.DeploymentTriggerOnConfigChange:
209
+		config.Status.Details.Message = "caused by a config change"
210
+	case deployapi.DeploymentTriggerOnImageChange:
211
+		config.Status.Details.Message = "caused by an image change"
212
+	}
207 213
 	_, err := c.dn.DeploymentConfigs(config.Namespace).UpdateStatus(config)
208 214
 	return err
209 215
 }
... ...
@@ -1,3 +1,4 @@
1
+// TODO: Move to pkg/deploy/cmd
1 2
 package reaper
2 3
 
3 4
 import (
... ...
@@ -1,3 +1,4 @@
1
+// TODO: Move to pkg/deploy/cmd
1 2
 package scaler
2 3
 
3 4
 import (
... ...
@@ -230,6 +230,9 @@ func MakeDeployment(config *deployapi.DeploymentConfig, codec runtime.Codec) (*a
230 230
 			},
231 231
 		},
232 232
 	}
233
+	if config.Status.Details != nil && len(config.Status.Details.Message) > 0 {
234
+		deployment.Annotations[deployapi.DeploymentStatusReasonAnnotation] = config.Status.Details.Message
235
+	}
233 236
 	if value, ok := config.Annotations[deployapi.DeploymentIgnorePodAnnotation]; ok {
234 237
 		deployment.Annotations[deployapi.DeploymentIgnorePodAnnotation] = value
235 238
 	}
... ...
@@ -96,6 +96,14 @@ os::cmd::expect_success_and_not_text "oc get dc frontend" "app=dockerbuild,templ
96 96
 echo "get: ok"
97 97
 os::test::junit::declare_suite_end
98 98
 
99
+os::test::junit::declare_suite_start "cmd/deployments/rollout"
100
+os::cmd::try_until_success 'oc rollout pause dc/database'
101
+os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "true"
102
+os::cmd::try_until_success 'oc rollout resume dc/database'
103
+os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "<no value>"
104
+echo "rollout: ok"
105
+os::test::junit::declare_suite_end
106
+
99 107
 os::test::junit::declare_suite_start "cmd/deployments/rollback"
100 108
 # should fail because there's no previous deployment
101 109
 os::cmd::expect_failure 'oc rollback database --to-version=1 -o=yaml'
... ...
@@ -241,6 +241,30 @@ var _ = g.Describe("deploymentconfigs", func() {
241 241
 		})
242 242
 	})
243 243
 
244
+	g.Describe("viewing rollout history", func() {
245
+		g.It("should print the rollout history [Conformance]", func() {
246
+			resource, name, err := createFixture(oc, simpleDeploymentFixture)
247
+			o.Expect(err).NotTo(o.HaveOccurred())
248
+			o.Expect(waitForLatestCondition(oc, name, deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
249
+
250
+			config, err := oc.REST().DeploymentConfigs(oc.Namespace()).Get(name)
251
+			o.Expect(err).NotTo(o.HaveOccurred())
252
+			one := int64(1)
253
+			config.Spec.Template.Spec.TerminationGracePeriodSeconds = &one
254
+			_, err = oc.REST().DeploymentConfigs(oc.Namespace()).Update(config)
255
+			o.Expect(err).NotTo(o.HaveOccurred())
256
+			o.Expect(waitForLatestCondition(oc, name, deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
257
+
258
+			out, err := oc.Run("rollout").Args("history", resource).Output()
259
+			o.Expect(err).NotTo(o.HaveOccurred())
260
+			g.By(fmt.Sprintf("checking the history for substrings\n%s", out))
261
+			o.Expect(out).To(o.ContainSubstring("deploymentconfigs \"deployment-simple\" history viewed"))
262
+			o.Expect(out).To(o.ContainSubstring("REVISION	STATUS		CAUSE"))
263
+			o.Expect(out).To(o.ContainSubstring("1		Complete	caused by a config change"))
264
+			o.Expect(out).To(o.ContainSubstring("2		Complete	caused by a config change"))
265
+		})
266
+	})
267
+
244 268
 	g.Describe("generation", func() {
245 269
 		g.It("should deploy based on a status version bump [Conformance]", func() {
246 270
 			resource, name, err := createFixture(oc, generationFixture)
... ...
@@ -378,7 +402,7 @@ var _ = g.Describe("deploymentconfigs", func() {
378 378
 			o.Expect(version).To(o.ContainSubstring("2"))
379 379
 
380 380
 			g.By("verifying that we can rollback")
381
-			_, err = oc.Run("rollback").Args(resource).Output()
381
+			_, err = oc.Run("rollout").Args("undo", resource).Output()
382 382
 			o.Expect(err).NotTo(o.HaveOccurred())
383 383
 
384 384
 			o.Expect(waitForLatestCondition(oc, name, deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())