File: generated.proto

package info (click to toggle)
golang-github-openshift-api 4.0%2Bgit20190508.81d064c-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 14,040 kB
  • sloc: sh: 171; makefile: 32
file content (467 lines) | stat: -rw-r--r-- 20,646 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.openshift.api.apps.v1;

import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1";

// CustomDeploymentStrategyParams are the input to the Custom deployment strategy.
message CustomDeploymentStrategyParams {
  // Image specifies a container image which can carry out a deployment.
  optional string image = 1;

  // Environment holds the environment which will be given to the container for Image.
  repeated k8s.io.api.core.v1.EnvVar environment = 2;

  // Command is optional and overrides CMD in the container Image.
  repeated string command = 3;
}

// DeploymentCause captures information about a particular cause of a deployment.
message DeploymentCause {
  // Type of the trigger that resulted in the creation of a new deployment
  optional string type = 1;

  // ImageTrigger contains the image trigger details, if this trigger was fired based on an image change
  optional DeploymentCauseImageTrigger imageTrigger = 2;
}

// DeploymentCauseImageTrigger represents details about the cause of a deployment originating
// from an image change trigger
message DeploymentCauseImageTrigger {
  // From is a reference to the changed object which triggered a deployment. The field may have
  // the kinds DockerImage, ImageStreamTag, or ImageStreamImage.
  optional k8s.io.api.core.v1.ObjectReference from = 1;
}

// DeploymentCondition describes the state of a deployment config at a certain point.
message DeploymentCondition {
  // Type of deployment condition.
  optional string type = 1;

  // Status of the condition, one of True, False, Unknown.
  optional string status = 2;

  // The last time this condition was updated.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;

  // The last time the condition transitioned from one status to another.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;

  // The reason for the condition's last transition.
  optional string reason = 4;

  // A human readable message indicating details about the transition.
  optional string message = 5;
}

// Deployment Configs define the template for a pod and manages deploying new images or configuration changes.
// A single deployment configuration is usually analogous to a single micro-service. Can support many different
// deployment patterns, including full restart, customizable rolling updates, and  fully custom behaviors, as
// well as pre- and post- deployment hooks. Each individual deployment is represented as a replication controller.
//
// A deployment is "triggered" when its configuration is changed or a tag in an Image Stream is changed.
// Triggers can be disabled to allow manual control over a deployment. The "strategy" determines how the deployment
// is carried out and may be changed at any time. The `latestVersion` field is updated when a new deployment
// is triggered by any means.
message DeploymentConfig {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  // Spec represents a desired deployment state and how to deploy to it.
  optional DeploymentConfigSpec spec = 2;

  // Status represents the current deployment state.
  optional DeploymentConfigStatus status = 3;
}

// DeploymentConfigList is a collection of deployment configs.
message DeploymentConfigList {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  // Items is a list of deployment configs
  repeated DeploymentConfig items = 2;
}

// DeploymentConfigRollback provides the input to rollback generation.
message DeploymentConfigRollback {
  // Name of the deployment config that will be rolled back.
  optional string name = 1;

  // UpdatedAnnotations is a set of new annotations that will be added in the deployment config.
  map<string, string> updatedAnnotations = 2;

  // Spec defines the options to rollback generation.
  optional DeploymentConfigRollbackSpec spec = 3;
}

// DeploymentConfigRollbackSpec represents the options for rollback generation.
message DeploymentConfigRollbackSpec {
  // From points to a ReplicationController which is a deployment.
  optional k8s.io.api.core.v1.ObjectReference from = 1;

  // Revision to rollback to. If set to 0, rollback to the last revision.
  optional int64 revision = 2;

  // IncludeTriggers specifies whether to include config Triggers.
  optional bool includeTriggers = 3;

  // IncludeTemplate specifies whether to include the PodTemplateSpec.
  optional bool includeTemplate = 4;

  // IncludeReplicationMeta specifies whether to include the replica count and selector.
  optional bool includeReplicationMeta = 5;

  // IncludeStrategy specifies whether to include the deployment Strategy.
  optional bool includeStrategy = 6;
}

// DeploymentConfigSpec represents the desired state of the deployment.
message DeploymentConfigSpec {
  // Strategy describes how a deployment is executed.
  // +optional
  optional DeploymentStrategy strategy = 1;

  // MinReadySeconds is the minimum number of seconds for which a newly created pod should
  // be ready without any of its container crashing, for it to be considered available.
  // Defaults to 0 (pod will be considered available as soon as it is ready)
  optional int32 minReadySeconds = 9;

  // Triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers
  // are defined, a new deployment can only occur as a result of an explicit client update to the
  // DeploymentConfig with a new LatestVersion. If null, defaults to having a config change trigger.
  // +optional
  optional DeploymentTriggerPolicies triggers = 2;

  // Replicas is the number of desired replicas.
  // +optional
  optional int32 replicas = 3;

  // RevisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks.
  // This field is a pointer to allow for differentiation between an explicit zero and not specified.
  // Defaults to 10. (This only applies to DeploymentConfigs created via the new group API resource, not the legacy resource.)
  optional int32 revisionHistoryLimit = 4;

  // Test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the
  // deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding
  // or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.
  // +optional
  optional bool test = 5;

  // Paused indicates that the deployment config is paused resulting in no new deployments on template
  // changes or changes in the template caused by other triggers.
  optional bool paused = 6;

  // Selector is a label query over pods that should match the Replicas count.
  map<string, string> selector = 7;

  // Template is the object that describes the pod that will be created if
  // insufficient replicas are detected.
  optional k8s.io.api.core.v1.PodTemplateSpec template = 8;
}

// DeploymentConfigStatus represents the current deployment state.
message DeploymentConfigStatus {
  // LatestVersion is used to determine whether the current deployment associated with a deployment
  // config is out of sync.
  optional int64 latestVersion = 1;

  // ObservedGeneration is the most recent generation observed by the deployment config controller.
  optional int64 observedGeneration = 2;

  // Replicas is the total number of pods targeted by this deployment config.
  optional int32 replicas = 3;

  // UpdatedReplicas is the total number of non-terminated pods targeted by this deployment config
  // that have the desired template spec.
  optional int32 updatedReplicas = 4;

  // AvailableReplicas is the total number of available pods targeted by this deployment config.
  optional int32 availableReplicas = 5;

  // UnavailableReplicas is the total number of unavailable pods targeted by this deployment config.
  optional int32 unavailableReplicas = 6;

  // Details are the reasons for the update to this deployment config.
  // This could be based on a change made by the user or caused by an automatic trigger
  optional DeploymentDetails details = 7;

  // Conditions represents the latest available observations of a deployment config's current state.
  // +patchMergeKey=type
  // +patchStrategy=merge
  repeated DeploymentCondition conditions = 8;

  // Total number of ready pods targeted by this deployment.
  optional int32 readyReplicas = 9;
}

// DeploymentDetails captures information about the causes of a deployment.
message DeploymentDetails {
  // Message is the user specified change message, if this deployment was triggered manually by the user
  optional string message = 1;

  // Causes are extended data associated with all the causes for creating a new deployment
  repeated DeploymentCause causes = 2;
}

// DeploymentLog represents the logs for a deployment
message DeploymentLog {
}

// DeploymentLogOptions is the REST options for a deployment log
message DeploymentLogOptions {
  // The container for which to stream logs. Defaults to only container if there is one container in the pod.
  optional string container = 1;

  // Follow if true indicates that the build log should be streamed until
  // the build terminates.
  optional bool follow = 2;

  // Return previous deployment logs. Defaults to false.
  optional bool previous = 3;

  // A relative time in seconds before the current time from which to show logs. If this value
  // precedes the time a pod was started, only logs since the pod start will be returned.
  // If this value is in the future, no logs will be returned.
  // Only one of sinceSeconds or sinceTime may be specified.
  optional int64 sinceSeconds = 4;

  // An RFC3339 timestamp from which to show logs. If this value
  // precedes the time a pod was started, only logs since the pod start will be returned.
  // If this value is in the future, no logs will be returned.
  // Only one of sinceSeconds or sinceTime may be specified.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;

  // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
  // of log output. Defaults to false.
  optional bool timestamps = 6;

  // If set, the number of lines from the end of the logs to show. If not specified,
  // logs are shown from the creation of the container or sinceSeconds or sinceTime
  optional int64 tailLines = 7;

  // If set, the number of bytes to read from the server before terminating the
  // log output. This may not display a complete final line of logging, and may return
  // slightly more or slightly less than the specified limit.
  optional int64 limitBytes = 8;

  // NoWait if true causes the call to return immediately even if the deployment
  // is not available yet. Otherwise the server will wait until the deployment has started.
  // TODO: Fix the tag to 'noWait' in v2
  optional bool nowait = 9;

  // Version of the deployment for which to view logs.
  optional int64 version = 10;
}

// DeploymentRequest is a request to a deployment config for a new deployment.
message DeploymentRequest {
  // Name of the deployment config for requesting a new deployment.
  optional string name = 1;

  // Latest will update the deployment config with the latest state from all triggers.
  optional bool latest = 2;

  // Force will try to force a new deployment to run. If the deployment config is paused,
  // then setting this to true will return an Invalid error.
  optional bool force = 3;

  // ExcludeTriggers instructs the instantiator to avoid processing the specified triggers.
  // This field overrides the triggers from latest and allows clients to control specific
  // logic. This field is ignored if not specified.
  repeated string excludeTriggers = 4;
}

// DeploymentStrategy describes how to perform a deployment.
message DeploymentStrategy {
  // Type is the name of a deployment strategy.
  optional string type = 1;

  // CustomParams are the input to the Custom deployment strategy, and may also
  // be specified for the Recreate and Rolling strategies to customize the execution
  // process that runs the deployment.
  optional CustomDeploymentStrategyParams customParams = 2;

  // RecreateParams are the input to the Recreate deployment strategy.
  optional RecreateDeploymentStrategyParams recreateParams = 3;

  // RollingParams are the input to the Rolling deployment strategy.
  optional RollingDeploymentStrategyParams rollingParams = 4;

  // Resources contains resource requirements to execute the deployment and any hooks.
  optional k8s.io.api.core.v1.ResourceRequirements resources = 5;

  // Labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
  map<string, string> labels = 6;

  // Annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.
  map<string, string> annotations = 7;

  // ActiveDeadlineSeconds is the duration in seconds that the deployer pods for this deployment
  // config may be active on a node before the system actively tries to terminate them.
  optional int64 activeDeadlineSeconds = 8;
}

// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.
message DeploymentTriggerImageChangeParams {
  // Automatic means that the detection of a new tag value should result in an image update
  // inside the pod template.
  optional bool automatic = 1;

  // ContainerNames is used to restrict tag updates to the specified set of container names in a pod.
  // If multiple triggers point to the same containers, the resulting behavior is undefined. Future
  // API versions will make this a validation error. If ContainerNames does not point to a valid container,
  // the trigger will be ignored. Future API versions will make this a validation error.
  repeated string containerNames = 2;

  // From is a reference to an image stream tag to watch for changes. From.Name is the only
  // required subfield - if From.Namespace is blank, the namespace of the current deployment
  // trigger will be used.
  optional k8s.io.api.core.v1.ObjectReference from = 3;

  // LastTriggeredImage is the last image to be triggered.
  optional string lastTriggeredImage = 4;
}

// DeploymentTriggerPolicies is a list of policies where nil values and different from empty arrays.
// +protobuf.nullable=true
// +protobuf.options.(gogoproto.goproto_stringer)=false
message DeploymentTriggerPolicies {
  // items, if empty, will result in an empty slice

  repeated DeploymentTriggerPolicy items = 1;
}

// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.
message DeploymentTriggerPolicy {
  // Type of the trigger
  optional string type = 1;

  // ImageChangeParams represents the parameters for the ImageChange trigger.
  optional DeploymentTriggerImageChangeParams imageChangeParams = 2;
}

// ExecNewPodHook is a hook implementation which runs a command in a new pod
// based on the specified container which is assumed to be part of the
// deployment template.
message ExecNewPodHook {
  // Command is the action command and its arguments.
  repeated string command = 1;

  // Env is a set of environment variables to supply to the hook pod's container.
  repeated k8s.io.api.core.v1.EnvVar env = 2;

  // ContainerName is the name of a container in the deployment pod template
  // whose container image will be used for the hook pod's container.
  optional string containerName = 3;

  // Volumes is a list of named volumes from the pod template which should be
  // copied to the hook pod. Volumes names not found in pod spec are ignored.
  // An empty list means no volumes will be copied.
  repeated string volumes = 4;
}

// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.
message LifecycleHook {
  // FailurePolicy specifies what action to take if the hook fails.
  optional string failurePolicy = 1;

  // ExecNewPod specifies the options for a lifecycle hook backed by a pod.
  optional ExecNewPodHook execNewPod = 2;

  // TagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.
  repeated TagImageHook tagImages = 3;
}

// RecreateDeploymentStrategyParams are the input to the Recreate deployment
// strategy.
message RecreateDeploymentStrategyParams {
  // TimeoutSeconds is the time to wait for updates before giving up. If the
  // value is nil, a default will be used.
  optional int64 timeoutSeconds = 1;

  // Pre is a lifecycle hook which is executed before the strategy manipulates
  // the deployment. All LifecycleHookFailurePolicy values are supported.
  optional LifecycleHook pre = 2;

  // Mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new
  // pod is created. All LifecycleHookFailurePolicy values are supported.
  optional LifecycleHook mid = 3;

  // Post is a lifecycle hook which is executed after the strategy has
  // finished all deployment logic. All LifecycleHookFailurePolicy values are supported.
  optional LifecycleHook post = 4;
}

// RollingDeploymentStrategyParams are the input to the Rolling deployment
// strategy.
message RollingDeploymentStrategyParams {
  // UpdatePeriodSeconds is the time to wait between individual pod updates.
  // If the value is nil, a default will be used.
  optional int64 updatePeriodSeconds = 1;

  // IntervalSeconds is the time to wait between polling deployment status
  // after update. If the value is nil, a default will be used.
  optional int64 intervalSeconds = 2;

  // TimeoutSeconds is the time to wait for updates before giving up. If the
  // value is nil, a default will be used.
  optional int64 timeoutSeconds = 3;

  // MaxUnavailable is the maximum number of pods that can be unavailable
  // during the update. Value can be an absolute number (ex: 5) or a
  // percentage of total pods at the start of update (ex: 10%). Absolute
  // number is calculated from percentage by rounding down.
  //
  // This cannot be 0 if MaxSurge is 0. By default, 25% is used.
  //
  // Example: when this is set to 30%, the old RC can be scaled down by 30%
  // immediately when the rolling update starts. Once new pods are ready, old
  // RC can be scaled down further, followed by scaling up the new RC,
  // ensuring that at least 70% of original number of pods are available at
  // all times during the update.
  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 4;

  // MaxSurge is the maximum number of pods that can be scheduled above the
  // original number of pods. Value can be an absolute number (ex: 5) or a
  // percentage of total pods at the start of the update (ex: 10%). Absolute
  // number is calculated from percentage by rounding up.
  //
  // This cannot be 0 if MaxUnavailable is 0. By default, 25% is used.
  //
  // Example: when this is set to 30%, the new RC can be scaled up by 30%
  // immediately when the rolling update starts. Once old pods have been
  // killed, new RC can be scaled up further, ensuring that total number of
  // pods running at any time during the update is atmost 130% of original
  // pods.
  optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 5;

  // Pre is a lifecycle hook which is executed before the deployment process
  // begins. All LifecycleHookFailurePolicy values are supported.
  optional LifecycleHook pre = 7;

  // Post is a lifecycle hook which is executed after the strategy has
  // finished all deployment logic. All LifecycleHookFailurePolicy values
  // are supported.
  optional LifecycleHook post = 8;
}

// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.
message TagImageHook {
  // 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
  // container this value will be defaulted to the name of that container.
  optional string containerName = 1;

  // To is the target ImageStreamTag to set the container's image onto.
  optional k8s.io.api.core.v1.ObjectReference to = 2;
}