Browse code

Add v1 descriptions to all build fields

derekwaynecarr authored on 2015/06/04 02:14:54
Showing 1 changed files
... ...
@@ -17,10 +17,10 @@ type Build struct {
17 17
 	kapi.ObjectMeta `json:"metadata,omitempty"`
18 18
 
19 19
 	// Spec is all the inputs used to execute the build.
20
-	Spec BuildSpec `json:"spec,omitempty"`
20
+	Spec BuildSpec `json:"spec,omitempty" description:"specification of the desired behavior for a build"`
21 21
 
22 22
 	// Status is the current status of the build.
23
-	Status BuildStatus `json:"status,omitempty"`
23
+	Status BuildStatus `json:"status,omitempty" description:"most recently observed status of a build as populated by the system"`
24 24
 }
25 25
 
26 26
 // BuildSpec encapsulates all the inputs necessary to represent a build.
... ...
@@ -28,20 +28,20 @@ type BuildSpec struct {
28 28
 	// ServiceAccount is the name of the ServiceAccount to use to run the pod
29 29
 	// created by this build.
30 30
 	// The pod will be allowed to use secrets referenced by the ServiceAccount
31
-	ServiceAccount string `json:"serviceAccount,omitempty"`
31
+	ServiceAccount string `json:"serviceAccount,omitempty" description:"the name of the service account to use to run pods created by the build, pod will be allowed to use secrets referenced by the service account"`
32 32
 
33 33
 	// Source describes the SCM in use.
34
-	Source BuildSource `json:"source,omitempty"`
34
+	Source BuildSource `json:"source,omitempty" description:"describes the source control management system in use"`
35 35
 
36 36
 	// Revision is the information from the source for a specific repo snapshot.
37 37
 	// This is optional.
38
-	Revision *SourceRevision `json:"revision,omitempty"`
38
+	Revision *SourceRevision `json:"revision,omitempty" description:"specific revision in the source repository"`
39 39
 
40 40
 	// Strategy defines how to perform a build.
41
-	Strategy BuildStrategy `json:"strategy"`
41
+	Strategy BuildStrategy `json:"strategy" description:"defines how to perform a build"`
42 42
 
43 43
 	// Output describes the Docker image the Strategy should produce.
44
-	Output BuildOutput `json:"output,omitempty"`
44
+	Output BuildOutput `json:"output,omitempty" description:"describes the output of a build that a strategy should produce"`
45 45
 
46 46
 	// Compute resource requirements to execute the build
47 47
 	Resources kapi.ResourceRequirements `json:"resources,omitempty" description:"the desired compute resources the build should have"`
... ...
@@ -50,30 +50,30 @@ type BuildSpec struct {
50 50
 // BuildStatus contains the status of a build
51 51
 type BuildStatus struct {
52 52
 	// Phase is the point in the build lifecycle.
53
-	Phase BuildPhase `json:"phase"`
53
+	Phase BuildPhase `json:"phase" description:"observed point in the build lifecycle"`
54 54
 
55 55
 	// Cancelled describes if a cancelling event was triggered for the build.
56
-	Cancelled bool `json:"cancelled,omitempty"`
56
+	Cancelled bool `json:"cancelled,omitempty" description:"describes if a canceling event was triggered for the build"`
57 57
 
58
-	// A human readable message indicating details about why the build has this status
59
-	Message string `json:"message,omitempty"`
58
+	// A human-readable message indicating details about why the build has this status
59
+	Message string `json:"message,omitempty" description:"human-readable message indicating details about why the build has this status"`
60 60
 
61 61
 	// StartTimestamp is a timestamp representing the server time when this Build started
62 62
 	// running in a Pod.
63 63
 	// It is represented in RFC3339 form and is in UTC.
64
-	StartTimestamp *util.Time `json:"startTimestamp,omitempty"`
64
+	StartTimestamp *util.Time `json:"startTimestamp,omitempty" description:"server time when this build started running in a pod"`
65 65
 
66 66
 	// CompletionTimestamp is a timestamp representing the server time when this Build was
67 67
 	// finished, whether that build failed or succeeded.  It reflects the time at which
68 68
 	// the Pod running the Build terminated.
69 69
 	// It is represented in RFC3339 form and is in UTC.
70
-	CompletionTimestamp *util.Time `json:"completionTimestamp,omitempty"`
70
+	CompletionTimestamp *util.Time `json:"completionTimestamp,omitempty" description:"server time when the pod running this build stopped running"`
71 71
 
72 72
 	// Duration contains time.Duration object describing build time.
73
-	Duration time.Duration `json:"duration,omitempty"`
73
+	Duration time.Duration `json:"duration,omitempty" description:"amount of time the build has been running"`
74 74
 
75 75
 	// Config is an ObjectReference to the BuildConfig this Build is based on.
76
-	Config *kapi.ObjectReference `json:"config,omitempty"`
76
+	Config *kapi.ObjectReference `json:"config,omitempty" description:"reference to build config from which this build was derived"`
77 77
 }
78 78
 
79 79
 // BuildPhase represents the status of a build at a point in time.
... ...
@@ -115,13 +115,13 @@ const (
115 115
 
116 116
 // BuildSource is the SCM used for the build
117 117
 type BuildSource struct {
118
-	Type BuildSourceType `json:"type,omitempty"`
119
-	Git  *GitBuildSource `json:"git,omitempty"`
118
+	Type BuildSourceType `json:"type,omitempty" description:"type of source control management system"`
119
+	Git  *GitBuildSource `json:"git,omitempty" description:"optional information about git build source"`
120 120
 
121 121
 	// Specify the sub-directory where the source code for the application exists.
122 122
 	// This allows to have buildable sources in directory other than root of
123 123
 	// repository.
124
-	ContextDir string `json:"contextDir,omitempty"`
124
+	ContextDir string `json:"contextDir,omitempty" description:"specifies sub-directory where the source code for the application exists, allows for sources to be built from a directory other than the root of a repository"`
125 125
 
126 126
 	// SourceSecret is the name of a Secret that would be used for setting
127 127
 	// up the authentication for cloning private repository.
... ...
@@ -133,54 +133,54 @@ type BuildSource struct {
133 133
 
134 134
 // SourceRevision is the revision or commit information from the source for the build
135 135
 type SourceRevision struct {
136
-	Type BuildSourceType    `json:"type,omitempty"`
137
-	Git  *GitSourceRevision `json:"git,omitempty"`
136
+	Type BuildSourceType    `json:"type,omitempty" description:"type of the build source"`
137
+	Git  *GitSourceRevision `json:"git,omitempty" description:"information about git-based build source"`
138 138
 }
139 139
 
140 140
 // GitSourceRevision is the commit information from a git source for a build
141 141
 type GitSourceRevision struct {
142 142
 	// Commit is the commit hash identifying a specific commit
143
-	Commit string `json:"commit,omitempty"`
143
+	Commit string `json:"commit,omitempty" description:"hash identifying a specific commit"`
144 144
 
145 145
 	// Author is the author of a specific commit
146
-	Author SourceControlUser `json:"author,omitempty"`
146
+	Author SourceControlUser `json:"author,omitempty" description:"author of a specific commit"`
147 147
 
148 148
 	// Committer is the committer of a specific commit
149
-	Committer SourceControlUser `json:"committer,omitempty"`
149
+	Committer SourceControlUser `json:"committer,omitempty" description:"committer of a specific commit"`
150 150
 
151 151
 	// Message is the description of a specific commit
152
-	Message string `json:"message,omitempty"`
152
+	Message string `json:"message,omitempty" description:"description of a specific commit"`
153 153
 }
154 154
 
155 155
 // GitBuildSource defines the parameters of a Git SCM
156 156
 type GitBuildSource struct {
157 157
 	// URI points to the source that will be built. The structure of the source
158 158
 	// will depend on the type of build to run
159
-	URI string `json:"uri,omitempty"`
159
+	URI string `json:"uri,omitempty" description:"points to the source that will be built, structure of the source will depend on the type of build to run"`
160 160
 
161 161
 	// Ref is the branch/tag/ref to build.
162
-	Ref string `json:"ref,omitempty"`
162
+	Ref string `json:"ref,omitempty" description:"identifies the branch/tag/ref to build"`
163 163
 }
164 164
 
165 165
 // SourceControlUser defines the identity of a user of source control
166 166
 type SourceControlUser struct {
167
-	Name  string `json:"name,omitempty"`
168
-	Email string `json:"email,omitempty"`
167
+	Name  string `json:"name,omitempty" description:"name of the source control user"`
168
+	Email string `json:"email,omitempty" description:"e-mail of the source control user"`
169 169
 }
170 170
 
171 171
 // BuildStrategy contains the details of how to perform a build.
172 172
 type BuildStrategy struct {
173 173
 	// Type is the kind of build strategy.
174
-	Type BuildStrategyType `json:"type"`
174
+	Type BuildStrategyType `json:"type" description:"identifies the type of build strategy"`
175 175
 
176 176
 	// DockerStrategy holds the parameters to the Docker build strategy.
177
-	DockerStrategy *DockerBuildStrategy `json:"dockerStrategy,omitempty"`
177
+	DockerStrategy *DockerBuildStrategy `json:"dockerStrategy,omitempty" description:"holds parameters for the Docker build strategy"`
178 178
 
179 179
 	// SourceStrategy holds the parameters to the Source build strategy.
180
-	SourceStrategy *SourceBuildStrategy `json:"sourceStrategy,omitempty"`
180
+	SourceStrategy *SourceBuildStrategy `json:"sourceStrategy,omitempty" description:"holds parameters to the Source build strategy"`
181 181
 
182 182
 	// CustomStrategy holds the parameters to the Custom build strategy
183
-	CustomStrategy *CustomBuildStrategy `json:"customStrategy,omitempty"`
183
+	CustomStrategy *CustomBuildStrategy `json:"customStrategy,omitempty" description:"holds parameters to the Custom build strategy"`
184 184
 }
185 185
 
186 186
 // BuildStrategyType describes a particular way of performing a build.
... ...
@@ -203,7 +203,7 @@ const (
203 203
 type CustomBuildStrategy struct {
204 204
 	// From is reference to an ImageStream, ImageStreamTag, or ImageStreamImage from which
205 205
 	// the docker image should be pulled
206
-	From *kapi.ObjectReference `json:"from,omitempty"`
206
+	From *kapi.ObjectReference `json:"from,omitempty" description:"reference to an image stream, image stream tag, or image stream image from which the Docker image should be pulled"`
207 207
 
208 208
 	// PullSecret is the name of a Secret that would be used for setting up
209 209
 	// the authentication for pulling the Docker images from the private Docker
... ...
@@ -211,12 +211,12 @@ type CustomBuildStrategy struct {
211 211
 	PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty" description:"supported type: dockercfg"`
212 212
 
213 213
 	// Additional environment variables you want to pass into a builder container
214
-	Env []kapi.EnvVar `json:"env,omitempty"`
214
+	Env []kapi.EnvVar `json:"env,omitempty" description:"additional environment variables you want to pass into a builder container"`
215 215
 
216 216
 	// ExposeDockerSocket will allow running Docker commands (and build Docker images) from
217 217
 	// inside the Docker container.
218 218
 	// TODO: Allow admins to enforce 'false' for this option
219
-	ExposeDockerSocket bool `json:"exposeDockerSocket,omitempty"`
219
+	ExposeDockerSocket bool `json:"exposeDockerSocket,omitempty" description:"allow running Docker commands (and build Docker images) from inside the container"`
220 220
 }
221 221
 
222 222
 // DockerBuildStrategy defines input parameters specific to Docker build.
... ...
@@ -224,7 +224,7 @@ type DockerBuildStrategy struct {
224 224
 	// From is reference to an ImageStream, ImageStreamTag, or ImageStreamImage from which
225 225
 	// the docker image should be pulled
226 226
 	// the resulting image will be used in the FROM line of the Dockerfile for this build.
227
-	From *kapi.ObjectReference `json:"from,omitempty"`
227
+	From *kapi.ObjectReference `json:"from,omitempty" description:"reference to image stream, image stream tag, or image stream image from which docker image should be pulled, resulting image will be used in the FROM line for the Dockerfile for this build"`
228 228
 
229 229
 	// PullSecret is the name of a Secret that would be used for setting up
230 230
 	// the authentication for pulling the Docker images from the private Docker
... ...
@@ -233,14 +233,14 @@ type DockerBuildStrategy struct {
233 233
 
234 234
 	// NoCache if set to true indicates that the docker build must be executed with the
235 235
 	// --no-cache=true flag
236
-	NoCache bool `json:"noCache,omitempty"`
236
+	NoCache bool `json:"noCache,omitempty" description:"if true, indicates that the Docker build must be executed with the --no-cache=true flag"`
237 237
 }
238 238
 
239 239
 // SourceBuildStrategy defines input parameters specific to an Source build.
240 240
 type SourceBuildStrategy struct {
241 241
 	// From is reference to an ImageStream, ImageStreamTag, or ImageStreamImage from which
242 242
 	// the docker image should be pulled
243
-	From *kapi.ObjectReference `json:"from,omitempty"`
243
+	From *kapi.ObjectReference `json:"from,omitempty" description:"reference to an image stream, image stream tag, or image stream image from which the Docker image should be pulled"`
244 244
 
245 245
 	// PullSecret is the name of a Secret that would be used for setting up
246 246
 	// the authentication for pulling the Docker images from the private Docker
... ...
@@ -248,13 +248,13 @@ type SourceBuildStrategy struct {
248 248
 	PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty" description:"supported type: dockercfg"`
249 249
 
250 250
 	// Additional environment variables you want to pass into a builder container
251
-	Env []kapi.EnvVar `json:"env,omitempty"`
251
+	Env []kapi.EnvVar `json:"env,omitempty" description:"additional environment variables you want to pass into a builder container"`
252 252
 
253 253
 	// Scripts is the location of Source scripts
254
-	Scripts string `json:"scripts,omitempty"`
254
+	Scripts string `json:"scripts,omitempty" description:"location of the source scripts"`
255 255
 
256 256
 	// Incremental flag forces the Source build to do incremental builds if true.
257
-	Incremental bool `json:"incremental,omitempty"`
257
+	Incremental bool `json:"incremental,omitempty" description:"forces the source build to do incremental builds if true"`
258 258
 }
259 259
 
260 260
 // BuildOutput is input to a build strategy and describes the Docker image that the strategy
... ...
@@ -264,7 +264,7 @@ type BuildOutput struct {
264 264
 	// may be empty, in which case the ImageStream will be looked for in the namespace of
265 265
 	// the build. Kind must be one of 'ImageStreamImage', 'ImageStreamTag' or 'DockerImage'.
266 266
 	// This value will be used to look up a Docker image repository to push to.
267
-	To *kapi.ObjectReference `json:"to,omitempty"`
267
+	To *kapi.ObjectReference `json:"to,omitempty" description:"The optional image stream to push the output of this build.  The namespace may be empty, in which case, the image stream will be looked up based on the namespace of the build."`
268 268
 
269 269
 	// PushSecret is the name of a Secret that would be used for setting
270 270
 	// up the authentication for executing the Docker push to authentication
... ...
@@ -283,52 +283,52 @@ type BuildConfig struct {
283 283
 
284 284
 	// Spec holds all the input necessary to produce a new build, and the conditions when
285 285
 	// to trigger them.
286
-	Spec BuildConfigSpec `json:"spec"`
286
+	Spec BuildConfigSpec `json:"spec" description:"holds all the input necessary to produce a new build, and the conditions when to trigger them"`
287 287
 	// Status holds any relevant information about a build config
288
-	Status BuildConfigStatus `json:"status"`
288
+	Status BuildConfigStatus `json:"status" description:"holds any relevant information about a build config derived by the system"`
289 289
 }
290 290
 
291 291
 // BuildConfigSpec describes when and how builds are created
292 292
 type BuildConfigSpec struct {
293 293
 	// Triggers determine how new Builds can be launched from a BuildConfig. If no triggers
294 294
 	// are defined, a new build can only occur as a result of an explicit client build creation.
295
-	Triggers []BuildTriggerPolicy `json:"triggers"`
295
+	Triggers []BuildTriggerPolicy `json:"triggers" description:"determines how new builds can be launched from a build config.  if no triggers are defined, a new build can only occur as a result of an explicit client build creation."`
296 296
 
297
-	BuildSpec `json:",inline"`
297
+	BuildSpec `json:",inline" description:"the desired build specification"`
298 298
 }
299 299
 
300 300
 // BuildConfigStatus contains current state of the build config object.
301 301
 type BuildConfigStatus struct {
302 302
 	// LastVersion is used to inform about number of last triggered build.
303
-	LastVersion int `json:"lastVersion"`
303
+	LastVersion int `json:"lastVersion" description:"used to inform about number of last triggered build"`
304 304
 }
305 305
 
306 306
 // WebHookTrigger is a trigger that gets invoked using a webhook type of post
307 307
 type WebHookTrigger struct {
308 308
 	// Secret used to validate requests.
309
-	Secret string `json:"secret,omitempty"`
309
+	Secret string `json:"secret,omitempty" description:"secret used to validate requests"`
310 310
 }
311 311
 
312 312
 // ImageChangeTrigger allows builds to be triggered when an ImageStream changes
313 313
 type ImageChangeTrigger struct {
314 314
 	// LastTriggeredImageID is used internally by the ImageChangeController to save last
315 315
 	// used image ID for build
316
-	LastTriggeredImageID string `json:"lastTriggeredImageID,omitempty"`
316
+	LastTriggeredImageID string `json:"lastTriggeredImageID,omitempty" description:"used internally to save last used image ID for build"`
317 317
 }
318 318
 
319 319
 // BuildTriggerPolicy describes a policy for a single trigger that results in a new Build.
320 320
 type BuildTriggerPolicy struct {
321 321
 	// Type is the type of build trigger
322
-	Type BuildTriggerType `json:"type,omitempty"`
322
+	Type BuildTriggerType `json:"type,omitempty" description:"type of build trigger"`
323 323
 
324 324
 	// GithubWebHook contains the parameters for a GitHub webhook type of trigger
325
-	GithubWebHook *WebHookTrigger `json:"github,omitempty"`
325
+	GithubWebHook *WebHookTrigger `json:"github,omitempty" description:"parameters for a GitHub webhook type of trigger"`
326 326
 
327 327
 	// GenericWebHook contains the parameters for a Generic webhook type of trigger
328
-	GenericWebHook *WebHookTrigger `json:"generic,omitempty"`
328
+	GenericWebHook *WebHookTrigger `json:"generic,omitempty" description:"parameters for a Generic webhook type of trigger"`
329 329
 
330 330
 	// ImageChange contains parameters for an ImageChange type of trigger
331
-	ImageChange *ImageChangeTrigger `json:"imageChange,omitempty"`
331
+	ImageChange *ImageChangeTrigger `json:"imageChange,omitempty" description:"parameters for an ImageChange type of trigger"`
332 332
 }
333 333
 
334 334
 // BuildTriggerType refers to a specific BuildTriggerPolicy implementation.
... ...
@@ -352,23 +352,23 @@ const (
352 352
 type BuildList struct {
353 353
 	kapi.TypeMeta `json:",inline"`
354 354
 	kapi.ListMeta `json:"metadata,omitempty"`
355
-	Items         []Build `json:"items"`
355
+	Items         []Build `json:"items" description:"list of builds"`
356 356
 }
357 357
 
358 358
 // BuildConfigList is a collection of BuildConfigs.
359 359
 type BuildConfigList struct {
360 360
 	kapi.TypeMeta `json:",inline"`
361 361
 	kapi.ListMeta `json:"metadata,omitempty"`
362
-	Items         []BuildConfig `json:"items"`
362
+	Items         []BuildConfig `json:"items" description:"list of build configs"`
363 363
 }
364 364
 
365 365
 // GenericWebHookEvent is the payload expected for a generic webhook post
366 366
 type GenericWebHookEvent struct {
367 367
 	// Type is the type of source repository
368
-	Type BuildSourceType `json:"type,omitempty"`
368
+	Type BuildSourceType `json:"type,omitempty" description:"type of source repository"`
369 369
 
370 370
 	// Git is the git information if the Type is BuildSourceGit
371
-	Git *GitInfo `json:"git,omitempty"`
371
+	Git *GitInfo `json:"git,omitempty" description:"git information if type is git"`
372 372
 }
373 373
 
374 374
 // GitInfo is the aggregated git information for a generic webhook post
... ...
@@ -389,10 +389,10 @@ type BuildRequest struct {
389 389
 	kapi.ObjectMeta `json:"metadata,omitempty"`
390 390
 
391 391
 	// Revision is the information from the source for a specific repo snapshot.
392
-	Revision *SourceRevision `json:"revision,omitempty"`
392
+	Revision *SourceRevision `json:"revision,omitempty" description:"information from the source for a specific repo snapshot"`
393 393
 
394 394
 	// TriggeredByImage is the Image that triggered this build.
395
-	TriggeredByImage *kapi.ObjectReference `json:"triggeredByImage,omitempty"`
395
+	TriggeredByImage *kapi.ObjectReference `json:"triggeredByImage,omitempty" description:"image that triggered this build"`
396 396
 }
397 397
 
398 398
 // BuildLogOptions is the REST options for a build log