1
2// This file was autogenerated by go-to-protobuf. Do not edit it manually!
3
4syntax = "proto2";
5
6package github.com.openshift.api.apps.v1;
7
8import "k8s.io/api/core/v1/generated.proto";
9import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
10import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
11import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
12
13// Package-wide variables from generator "generated".
14option go_package = "github.com/openshift/api/apps/v1";
15
16// CustomDeploymentStrategyParams are the input to the Custom deployment strategy.
17message CustomDeploymentStrategyParams {
18 // Image specifies a container image which can carry out a deployment.
19 optional string image = 1;
20
21 // Environment holds the environment which will be given to the container for Image.
22 repeated k8s.io.api.core.v1.EnvVar environment = 2;
23
24 // Command is optional and overrides CMD in the container Image.
25 repeated string command = 3;
26}
27
28// DeploymentCause captures information about a particular cause of a deployment.
29message DeploymentCause {
30 // Type of the trigger that resulted in the creation of a new deployment
31 optional string type = 1;
32
33 // ImageTrigger contains the image trigger details, if this trigger was fired based on an image change
34 optional DeploymentCauseImageTrigger imageTrigger = 2;
35}
36
37// DeploymentCauseImageTrigger represents details about the cause of a deployment originating
38// from an image change trigger
39message DeploymentCauseImageTrigger {
40 // From is a reference to the changed object which triggered a deployment. The field may have
41 // the kinds DockerImage, ImageStreamTag, or ImageStreamImage.
42 optional k8s.io.api.core.v1.ObjectReference from = 1;
43}
44
45// DeploymentCondition describes the state of a deployment config at a certain point.
46message DeploymentCondition {
47 // Type of deployment condition.
48 optional string type = 1;
49
50 // Status of the condition, one of True, False, Unknown.
51 optional string status = 2;
52
53 // The last time this condition was updated.
54 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
55
56 // The last time the condition transitioned from one status to another.
57 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
58
59 // The reason for the condition's last transition.
60 optional string reason = 4;
61
62 // A human readable message indicating details about the transition.
63 optional string message = 5;
64}
65
66// Deployment Configs define the template for a pod and manages deploying new images or configuration changes.
67// A single deployment configuration is usually analogous to a single micro-service. Can support many different
68// deployment patterns, including full restart, customizable rolling updates, and fully custom behaviors, as
69// well as pre- and post- deployment hooks. Each individual deployment is represented as a replication controller.
70//
71// A deployment is "triggered" when its configuration is changed or a tag in an Image Stream is changed.
72// Triggers can be disabled to allow manual control over a deployment. The "strategy" determines how the deployment
73// is carried out and may be changed at any time. The `latestVersion` field is updated when a new deployment
74// is triggered by any means.
75//
76// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
77// +openshift:compatibility-gen:level=1
78message DeploymentConfig {
79 // metadata is the standard object's metadata.
80 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
81 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
82
83 // Spec represents a desired deployment state and how to deploy to it.
84 optional DeploymentConfigSpec spec = 2;
85
86 // Status represents the current deployment state.
87 // +optional
88 optional DeploymentConfigStatus status = 3;
89}
90
91// DeploymentConfigList is a collection of deployment configs.
92//
93// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
94// +openshift:compatibility-gen:level=1
95message DeploymentConfigList {
96 // metadata is the standard list's metadata.
97 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
98 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
99
100 // Items is a list of deployment configs
101 repeated DeploymentConfig items = 2;
102}
103
104// DeploymentConfigRollback provides the input to rollback generation.
105//
106// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
107// +openshift:compatibility-gen:level=1
108message DeploymentConfigRollback {
109 // Name of the deployment config that will be rolled back.
110 optional string name = 1;
111
112 // UpdatedAnnotations is a set of new annotations that will be added in the deployment config.
113 map<string, string> updatedAnnotations = 2;
114
115 // Spec defines the options to rollback generation.
116 optional DeploymentConfigRollbackSpec spec = 3;
117}
118
119// DeploymentConfigRollbackSpec represents the options for rollback generation.
120message DeploymentConfigRollbackSpec {
121 // From points to a ReplicationController which is a deployment.
122 optional k8s.io.api.core.v1.ObjectReference from = 1;
123
124 // Revision to rollback to. If set to 0, rollback to the last revision.
125 optional int64 revision = 2;
126
127 // IncludeTriggers specifies whether to include config Triggers.
128 optional bool includeTriggers = 3;
129
130 // IncludeTemplate specifies whether to include the PodTemplateSpec.
131 optional bool includeTemplate = 4;
132
133 // IncludeReplicationMeta specifies whether to include the replica count and selector.
134 optional bool includeReplicationMeta = 5;
135
136 // IncludeStrategy specifies whether to include the deployment Strategy.
137 optional bool includeStrategy = 6;
138}
139
140// DeploymentConfigSpec represents the desired state of the deployment.
141message DeploymentConfigSpec {
142 // Strategy describes how a deployment is executed.
143 // +optional
144 optional DeploymentStrategy strategy = 1;
145
146 // MinReadySeconds is the minimum number of seconds for which a newly created pod should
147 // be ready without any of its container crashing, for it to be considered available.
148 // Defaults to 0 (pod will be considered available as soon as it is ready)
149 optional int32 minReadySeconds = 9;
150
151 // Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers
152 // are defined, a new deployment can only occur as a result of an explicit client update to the
153 // DeploymentConfig with a new LatestVersion. If null, defaults to having a config change trigger.
154 // +optional
155 optional DeploymentTriggerPolicies triggers = 2;
156
157 // Replicas is the number of desired replicas.
158 // +optional
159 optional int32 replicas = 3;
160
161 // RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
162 // This field is a pointer to allow for differentiation between an explicit zero and not specified.
163 // Defaults to 10. (This only applies to DeploymentConfigs created via the new group API resource, not the legacy resource.)
164 optional int32 revisionHistoryLimit = 4;
165
166 // Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
167 // deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding
168 // or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.
169 // +optional
170 optional bool test = 5;
171
172 // Paused indicates that the deployment config is paused resulting in no new deployments on template
173 // changes or changes in the template caused by other triggers.
174 optional bool paused = 6;
175
176 // Selector is a label query over pods that should match the Replicas count.
177 map<string, string> selector = 7;
178
179 // Template is the object that describes the pod that will be created if
180 // insufficient replicas are detected.
181 optional k8s.io.api.core.v1.PodTemplateSpec template = 8;
182}
183
184// DeploymentConfigStatus represents the current deployment state.
185message DeploymentConfigStatus {
186 // LatestVersion is used to determine whether the current deployment associated with a deployment
187 // config is out of sync.
188 optional int64 latestVersion = 1;
189
190 // ObservedGeneration is the most recent generation observed by the deployment config controller.
191 optional int64 observedGeneration = 2;
192
193 // Replicas is the total number of pods targeted by this deployment config.
194 optional int32 replicas = 3;
195
196 // UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config
197 // that have the desired template spec.
198 optional int32 updatedReplicas = 4;
199
200 // AvailableReplicas is the total number of available pods targeted by this deployment config.
201 optional int32 availableReplicas = 5;
202
203 // UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.
204 optional int32 unavailableReplicas = 6;
205
206 // Details are the reasons for the update to this deployment config.
207 // This could be based on a change made by the user or caused by an automatic trigger
208 optional DeploymentDetails details = 7;
209
210 // Conditions represents the latest available observations of a deployment config's current state.
211 // +patchMergeKey=type
212 // +patchStrategy=merge
213 repeated DeploymentCondition conditions = 8;
214
215 // Total number of ready pods targeted by this deployment.
216 optional int32 readyReplicas = 9;
217}
218
219// DeploymentDetails captures information about the causes of a deployment.
220message DeploymentDetails {
221 // Message is the user specified change message, if this deployment was triggered manually by the user
222 optional string message = 1;
223
224 // Causes are extended data associated with all the causes for creating a new deployment
225 repeated DeploymentCause causes = 2;
226}
227
228// DeploymentLog represents the logs for a deployment
229//
230// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
231// +openshift:compatibility-gen:level=1
232message DeploymentLog {
233}
234
235// DeploymentLogOptions is the REST options for a deployment log
236//
237// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
238// +openshift:compatibility-gen:level=1
239message DeploymentLogOptions {
240 // The container for which to stream logs. Defaults to only container if there is one container in the pod.
241 optional string container = 1;
242
243 // Follow if true indicates that the build log should be streamed until
244 // the build terminates.
245 optional bool follow = 2;
246
247 // Return previous deployment logs. Defaults to false.
248 optional bool previous = 3;
249
250 // A relative time in seconds before the current time from which to show logs. If this value
251 // precedes the time a pod was started, only logs since the pod start will be returned.
252 // If this value is in the future, no logs will be returned.
253 // Only one of sinceSeconds or sinceTime may be specified.
254 optional int64 sinceSeconds = 4;
255
256 // An RFC3339 timestamp from which to show logs. If this value
257 // precedes the time a pod was started, only logs since the pod start will be returned.
258 // If this value is in the future, no logs will be returned.
259 // Only one of sinceSeconds or sinceTime may be specified.
260 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
261
262 // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
263 // of log output. Defaults to false.
264 optional bool timestamps = 6;
265
266 // If set, the number of lines from the end of the logs to show. If not specified,
267 // logs are shown from the creation of the container or sinceSeconds or sinceTime
268 optional int64 tailLines = 7;
269
270 // If set, the number of bytes to read from the server before terminating the
271 // log output. This may not display a complete final line of logging, and may return
272 // slightly more or slightly less than the specified limit.
273 optional int64 limitBytes = 8;
274
275 // NoWait if true causes the call to return immediately even if the deployment
276 // is not available yet. Otherwise the server will wait until the deployment has started.
277 // TODO: Fix the tag to 'noWait' in v2
278 optional bool nowait = 9;
279
280 // Version of the deployment for which to view logs.
281 optional int64 version = 10;
282}
283
284// DeploymentRequest is a request to a deployment config for a new deployment.
285//
286// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
287// +openshift:compatibility-gen:level=1
288message DeploymentRequest {
289 // Name of the deployment config for requesting a new deployment.
290 optional string name = 1;
291
292 // Latest will update the deployment config with the latest state from all triggers.
293 optional bool latest = 2;
294
295 // Force will try to force a new deployment to run. If the deployment config is paused,
296 // then setting this to true will return an Invalid error.
297 optional bool force = 3;
298
299 // ExcludeTriggers instructs the instantiator to avoid processing the specified triggers.
300 // This field overrides the triggers from latest and allows clients to control specific
301 // logic. This field is ignored if not specified.
302 repeated string excludeTriggers = 4;
303}
304
305// DeploymentStrategy describes how to perform a deployment.
306message DeploymentStrategy {
307 // Type is the name of a deployment strategy.
308 // +optional
309 optional string type = 1;
310
311 // CustomParams are the input to the Custom deployment strategy, and may also
312 // be specified for the Recreate and Rolling strategies to customize the execution
313 // process that runs the deployment.
314 optional CustomDeploymentStrategyParams customParams = 2;
315
316 // RecreateParams are the input to the Recreate deployment strategy.
317 optional RecreateDeploymentStrategyParams recreateParams = 3;
318
319 // RollingParams are the input to the Rolling deployment strategy.
320 optional RollingDeploymentStrategyParams rollingParams = 4;
321
322 // Resources contains resource requirements to execute the deployment and any hooks.
323 optional k8s.io.api.core.v1.ResourceRequirements resources = 5;
324
325 // Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
326 map<string, string> labels = 6;
327
328 // Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
329 map<string, string> annotations = 7;
330
331 // ActiveDeadlineSeconds is the duration in seconds that the deployer pods for this deployment
332 // config may be active on a node before the system actively tries to terminate them.
333 optional int64 activeDeadlineSeconds = 8;
334}
335
336// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.
337message DeploymentTriggerImageChangeParams {
338 // Automatic means that the detection of a new tag value should result in an image update
339 // inside the pod template.
340 optional bool automatic = 1;
341
342 // ContainerNames is used to restrict tag updates to the specified set of container names in a pod.
343 // If multiple triggers point to the same containers, the resulting behavior is undefined. Future
344 // API versions will make this a validation error. If ContainerNames does not point to a valid container,
345 // the trigger will be ignored. Future API versions will make this a validation error.
346 repeated string containerNames = 2;
347
348 // From is a reference to an image stream tag to watch for changes. From.Name is the only
349 // required subfield - if From.Namespace is blank, the namespace of the current deployment
350 // trigger will be used.
351 optional k8s.io.api.core.v1.ObjectReference from = 3;
352
353 // LastTriggeredImage is the last image to be triggered.
354 optional string lastTriggeredImage = 4;
355}
356
357// DeploymentTriggerPolicies is a list of policies where nil values and different from empty arrays.
358// +protobuf.nullable=true
359// +protobuf.options.(gogoproto.goproto_stringer)=false
360message DeploymentTriggerPolicies {
361 // items, if empty, will result in an empty slice
362
363 repeated DeploymentTriggerPolicy items = 1;
364}
365
366// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.
367message DeploymentTriggerPolicy {
368 // Type of the trigger
369 optional string type = 1;
370
371 // ImageChangeParams represents the parameters for the ImageChange trigger.
372 optional DeploymentTriggerImageChangeParams imageChangeParams = 2;
373}
374
375// ExecNewPodHook is a hook implementation which runs a command in a new pod
376// based on the specified container which is assumed to be part of the
377// deployment template.
378message ExecNewPodHook {
379 // Command is the action command and its arguments.
380 repeated string command = 1;
381
382 // Env is a set of environment variables to supply to the hook pod's container.
383 repeated k8s.io.api.core.v1.EnvVar env = 2;
384
385 // ContainerName is the name of a container in the deployment pod template
386 // whose container image will be used for the hook pod's container.
387 optional string containerName = 3;
388
389 // Volumes is a list of named volumes from the pod template which should be
390 // copied to the hook pod. Volumes names not found in pod spec are ignored.
391 // An empty list means no volumes will be copied.
392 repeated string volumes = 4;
393}
394
395// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.
396message LifecycleHook {
397 // FailurePolicy specifies what action to take if the hook fails.
398 optional string failurePolicy = 1;
399
400 // ExecNewPod specifies the options for a lifecycle hook backed by a pod.
401 optional ExecNewPodHook execNewPod = 2;
402
403 // TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.
404 repeated TagImageHook tagImages = 3;
405}
406
407// RecreateDeploymentStrategyParams are the input to the Recreate deployment
408// strategy.
409message RecreateDeploymentStrategyParams {
410 // TimeoutSeconds is the time to wait for updates before giving up. If the
411 // value is nil, a default will be used.
412 optional int64 timeoutSeconds = 1;
413
414 // Pre is a lifecycle hook which is executed before the strategy manipulates
415 // the deployment. All LifecycleHookFailurePolicy values are supported.
416 optional LifecycleHook pre = 2;
417
418 // Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new
419 // pod is created. All LifecycleHookFailurePolicy values are supported.
420 optional LifecycleHook mid = 3;
421
422 // Post is a lifecycle hook which is executed after the strategy has
423 // finished all deployment logic. All LifecycleHookFailurePolicy values are supported.
424 optional LifecycleHook post = 4;
425}
426
427// RollingDeploymentStrategyParams are the input to the Rolling deployment
428// strategy.
429message RollingDeploymentStrategyParams {
430 // UpdatePeriodSeconds is the time to wait between individual pod updates.
431 // If the value is nil, a default will be used.
432 optional int64 updatePeriodSeconds = 1;
433
434 // IntervalSeconds is the time to wait between polling deployment status
435 // after update. If the value is nil, a default will be used.
436 optional int64 intervalSeconds = 2;
437
438 // TimeoutSeconds is the time to wait for updates before giving up. If the
439 // value is nil, a default will be used.
440 optional int64 timeoutSeconds = 3;
441
442 // MaxUnavailable is the maximum number of pods that can be unavailable
443 // during the update. Value can be an absolute number (ex: 5) or a
444 // percentage of total pods at the start of update (ex: 10%). Absolute
445 // number is calculated from percentage by rounding down.
446 //
447 // This cannot be 0 if MaxSurge is 0. By default, 25% is used.
448 //
449 // Example: when this is set to 30%, the old RC can be scaled down by 30%
450 // immediately when the rolling update starts. Once new pods are ready, old
451 // RC can be scaled down further, followed by scaling up the new RC,
452 // ensuring that at least 70% of original number of pods are available at
453 // all times during the update.
454 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 4;
455
456 // MaxSurge is the maximum number of pods that can be scheduled above the
457 // original number of pods. Value can be an absolute number (ex: 5) or a
458 // percentage of total pods at the start of the update (ex: 10%). Absolute
459 // number is calculated from percentage by rounding up.
460 //
461 // This cannot be 0 if MaxUnavailable is 0. By default, 25% is used.
462 //
463 // Example: when this is set to 30%, the new RC can be scaled up by 30%
464 // immediately when the rolling update starts. Once old pods have been
465 // killed, new RC can be scaled up further, ensuring that total number of
466 // pods running at any time during the update is atmost 130% of original
467 // pods.
468 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 5;
469
470 // Pre is a lifecycle hook which is executed before the deployment process
471 // begins. All LifecycleHookFailurePolicy values are supported.
472 optional LifecycleHook pre = 7;
473
474 // Post is a lifecycle hook which is executed after the strategy has
475 // finished all deployment logic. All LifecycleHookFailurePolicy values
476 // are supported.
477 optional LifecycleHook post = 8;
478}
479
480// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.
481message TagImageHook {
482 // ContainerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single
483 // container this value will be defaulted to the name of that container.
484 optional string containerName = 1;
485
486 // To is the target ImageStreamTag to set the container's image onto.
487 optional k8s.io.api.core.v1.ObjectReference to = 2;
488}
489
View as plain text