-
Notifications
You must be signed in to change notification settings - Fork 540
/
operator.proto
777 lines (680 loc) · 27.2 KB
/
operator.proto
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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
// Copyright 2019 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
// $title: IstioOperator Options
// $description: Configuration affecting Istio control plane installation version and shape.
// $location: https://istio.io/docs/reference/config/istio.operator.v1alpha1.html
// $weight: 20
// $mode: package
// Configuration affecting Istio control plane installation version and shape.
// Note: unlike other Istio protos, field names must use camelCase. This is asserted in tests.
// Without camelCase, the `json` tag on the Go struct will not match the user's JSON representation.
// This leads to Kubernetes merge libraries, which rely on this tag, to fail.
// All other usages use jsonpb which does not use the `json` tag.
package istio.operator.v1alpha1;
option go_package="istio.io/api/operator/v1alpha1";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/api/core/v1/generated.proto";
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=install.istio.io/v1alpha1
// +genclient
// +k8s:deepcopy-gen=true
// -->
// IstioOperatorSpec defines the desired installed state of Istio components.
// The spec is a used to define a customization of the default profile values that are supplied with each Istio release.
// Because the spec is a customization API, specifying an empty IstioOperatorSpec results in a default Istio
// component values.
//
// ```yaml
// apiVersion: install.istio.io/v1alpha1
// kind: IstioOperator
// spec:
// profile: default
// hub: gcr.io/istio-testing
// tag: latest
// revision: 1-8-0
// meshConfig:
// accessLogFile: /dev/stdout
// enableTracing: true
// components:
// egressGateways:
// - name: istio-egressgateway
// enabled: true
// ```
//
message IstioOperatorSpec {
// Path or name for the profile e.g.
//
// * minimal (looks in profiles dir for a file called minimal.yaml)
// * /tmp/istio/install/values/custom/custom-install.yaml (local file path)
//
// default profile is used if this field is unset.
string profile = 10;
// Path for the install package. e.g.
//
// * /tmp/istio-installer/nightly (local file path)
//
string installPackagePath = 11;
// Root for docker image paths e.g. `docker.io/istio`
string hub = 12;
// Version tag for docker images e.g. `1.7.2`
google.protobuf.Value tag = 13;
// $hide_from_docs
// Resource suffix is appended to all resources installed by each component.
// Never implemented; replaced by revision.
string resourceSuffix = 14 [deprecated = true];
// Namespace to install control plane resources into. If unset, Istio will be installed into the same namespace
// as the `IstioOperator` CR. You must also set `values.global.istioNamespace` if you wish to install Istio in
// a custom namespace.
// If you have enabled CNI, you must exclude this namespace by adding it to the list `values.cni.excludeNamespaces`.
string namespace = 15;
// Identify the revision this installation is associated with.
// This option is currently experimental.
string revision = 16;
// Compatibility version allows configuring Istio to behave like an older version by tuning various settings to align with a
// previous versions defaults. This accepts a `major.minor` format, such as `1.23`.
// This option is currently experimental.
string compatibilityVersion = 18;
reserved 17; //
reserved "defaultRevision";
// Config used by control plane components internally.
google.protobuf.Struct meshConfig = 40;
// Kubernetes resource settings, enablement and component-specific settings that are not internal to the
// component.
IstioComponentSetSpec components = 50;
// Deprecated.
// Users should manage the installation of addon components on their own.
// Refer to samples/addons for demo installation of addon components.
map<string, ExternalComponentSpec> addonComponents = 51 [deprecated = true];
// Overrides for default `values.yaml`. This is a validated pass-through to Helm templates.
// See the [Helm installation options](https://istio.io/v1.5/docs/reference/config/installation-options/) for schema details.
// Anything that is available in `IstioOperatorSpec` should be set above rather than using the passthrough. This
// includes Kubernetes resource settings for components in `KubernetesResourcesSpec`.
google.protobuf.Struct values = 100;
// Unvalidated overrides for default `values.yaml`. Used for custom templates where new parameters are added.
google.protobuf.Struct unvalidatedValues = 101;
}
// Observed state of IstioOperator
message InstallStatus {
// Status describes the current state of a component.
enum Status {
// Component is not present.
NONE = 0;
// Component is being updated to a different version.
UPDATING = 1;
// Controller has started but not yet completed reconciliation loop for the component.
RECONCILING = 2;
// Component is healthy.
HEALTHY = 3;
// Component is in an error state.
ERROR = 4;
// Overall status only and would not be set as a component status.
// Action is needed from the user for reconciliation to proceed
// e.g. There are proxies still pointing to the control plane revision when try to remove an `IstioOperator` CR.
ACTION_REQUIRED = 5;
}
// VersionStatus is the status and version of a component.
message VersionStatus {
string version = 1;
Status status = 2;
string error = 4;
}
// Overall status of all components controlled by the operator.
//
// * If all components have status `NONE`, overall status is `NONE`.
// * If all components are `HEALTHY`, overall status is `HEALTHY`.
// * If one or more components are `RECONCILING` and others are `HEALTHY`, overall status is `RECONCILING`.
// * If one or more components are `UPDATING` and others are `HEALTHY`, overall status is `UPDATING`.
// * If components are a mix of `RECONCILING`, `UPDATING` and `HEALTHY`, overall status is `UPDATING`.
// * If any component is in `ERROR` state, overall status is `ERROR`.
// * If further action is needed for reconciliation to proceed, overall status is `ACTION_REQUIRED`.
//
Status status = 1;
// Optional message providing additional information about the existing overall status.
string message = 3;
// Individual status of each component controlled by the operator. The map key is the name of the component.
map<string, VersionStatus> componentStatus = 2;
}
// IstioComponentSpec defines the desired installed state of Istio components.
message IstioComponentSetSpec {
BaseComponentSpec base = 29;
ComponentSpec pilot = 30;
ComponentSpec cni = 38;
ComponentSpec ztunnel = 42;
// Remote cluster using an external control plane.
ComponentSpec istiodRemote = 39;
repeated GatewaySpec ingressGateways = 40;
repeated GatewaySpec egressGateways = 41;
reserved 31, 32, 33, 34, 35, 36, 37;
reserved "citadel", "policy", "telemetry", "galley", "node_agent", "proxy", "sidecar_injector";
}
// Configuration for base component.
message BaseComponentSpec {
// Selects whether this component is installed.
google.protobuf.BoolValue enabled = 1;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// Configuration for internal components.
message ComponentSpec {
// Selects whether this component is installed.
google.protobuf.BoolValue enabled = 1;
// Namespace for the component.
string namespace = 2;
// Hub for the component (overrides top level hub setting).
string hub = 10;
// Tag for the component (overrides top level tag setting).
google.protobuf.Value tag = 11;
// Arbitrary install time configuration for the component.
google.protobuf.Struct spec = 30;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// Configuration for external components.
message ExternalComponentSpec {
// Selects whether this component is installed.
google.protobuf.BoolValue enabled = 1;
// Namespace for the component.
string namespace = 2;
// Arbitrary install time configuration for the component.
google.protobuf.Struct spec = 10;
// Chart path for addon components.
string chartPath = 30;
// Optional schema to validate spec against.
google.protobuf.Any schema = 35;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// Configuration for gateways.
message GatewaySpec {
// Selects whether this gateway is installed.
google.protobuf.BoolValue enabled = 1;
// Namespace for the gateway.
string namespace = 2;
// Name for the gateway.
string name = 3;
// Labels for the gateway.
map <string, string> label = 4;
// Hub for the component (overrides top level hub setting).
string hub = 10;
// Tag for the component (overrides top level tag setting).
google.protobuf.Value tag = 11;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// KubernetesResourcesSpec is a common set of Kubernetes resource configs for components.
message KubernetesResourcesSpec {
// Kubernetes affinity.
// [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity)
Affinity affinity = 1;
// Deployment environment variables.
// [https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)
repeated EnvVar env = 2;
// Kubernetes HorizontalPodAutoscaler settings.
// [https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
HorizontalPodAutoscalerSpec hpaSpec = 3;
// Kubernetes imagePullPolicy.
// [https://kubernetes.io/docs/concepts/containers/images/](https://kubernetes.io/docs/concepts/containers/images/)
string imagePullPolicy = 4;
// Kubernetes nodeSelector.
// [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector)
map<string, string> nodeSelector = 5;
// Kubernetes PodDisruptionBudget settings.
// [https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#how-disruption-budgets-work](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#how-disruption-budgets-work)
PodDisruptionBudgetSpec podDisruptionBudget = 6;
// Kubernetes pod annotations.
// [https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
map<string, string> podAnnotations = 7;
// Kubernetes priorityClassName. Default for all resources unless overridden.
// [https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass)
string priorityClassName = 8;
// Kubernetes readinessProbe settings.
// [https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/)
// k8s.io.api.core.v1.Probe readiness_probe = 9;
ReadinessProbe readinessProbe = 9;
// Kubernetes Deployment replicas setting.
// [https://kubernetes.io/docs/concepts/workloads/controllers/deployment/](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
uint32 replicaCount = 10;
// Kubernetes resources settings.
// [https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container)
Resources resources = 11;
// Kubernetes Service settings.
// [https://kubernetes.io/docs/concepts/services-networking/service/](https://kubernetes.io/docs/concepts/services-networking/service/)
ServiceSpec service = 12;
// Kubernetes deployment strategy.
// [https://kubernetes.io/docs/concepts/workloads/controllers/deployment/](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
DeploymentStrategy strategy = 13;
// Kubernetes toleration
// [https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/)
repeated Toleration tolerations = 14;
// Kubernetes service annotations.
// [https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
map<string, string> serviceAnnotations = 15;
// Kubernetes pod security context
// [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod)
PodSecurityContext securityContext = 16;
// Kubernetes volumes
// [https://kubernetes.io/docs/concepts/storage/volumes/](https://kubernetes.io/docs/concepts/storage/volumes/)
// Volumes defines the collection of Volume to inject into the pod.
repeated k8s.io.api.core.v1.Volume volumes = 17;
// Kubernetes volumeMounts
// VolumeMounts defines the collection of VolumeMount to inject into containers.
repeated k8s.io.api.core.v1.VolumeMount volumeMounts = 18;
// Overlays for Kubernetes resources in rendered manifests.
repeated K8sObjectOverlay overlays = 100;
}
// Patch for an existing Kubernetes resource.
message K8sObjectOverlay {
message PathValue {
// Path of the form a.[key1:value1].b.[:value2]
// Where [key1:value1] is a selector for a key-value pair to identify a list element and [:value] is a value
// selector to identify a list element in a leaf list.
// All path intermediate nodes must exist.
string path = 1;
// Value to add, delete or replace.
// For add, the path should be a new leaf.
// For delete, value should be unset.
// For replace, path should reference an existing node.
// All values are strings but are converted into appropriate type based on schema.
google.protobuf.Value value = 2;
}
// Resource API version.
string apiVersion = 1;
// Resource kind.
string kind = 2;
// Name of resource.
// Namespace is always the component namespace.
string name = 3;
// List of patches to apply to resource.
repeated PathValue patches = 4;
}
// See k8s.io.api.core.v1.Affinity.
message Affinity {
NodeAffinity nodeAffinity = 1;
PodAffinity podAffinity = 2;
PodAntiAffinity podAntiAffinity = 3;
}
// See k8s.io.api.core.v1.ConfigMapKeySelector.
message ConfigMapKeySelector {
LocalObjectReference localObjectReference = 1;
string key = 2;
bool optional = 3;
}
// See k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricSource.
message ContainerResourceMetricSource {
string name = 1;
MetricTarget target = 2;
string container = 3;
}
// See k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricStatus.
message ContainerResourceMetricStatus {
string name = 1;
MetricValueStatus current = 2;
string container = 3;
}
// See k8s.io.api.core.v1.ClientIPConfig.
message ClientIPConfig {
int32 timeoutSeconds = 1;
}
// See k8s.io.api.autoscaling.v2beta2.CrossVersionObjectReference.
message CrossVersionObjectReference {
string kind = 1;
string name = 2;
string apiVersion = 3;
}
// See k8s.io.api.apps.v1.DeploymentStrategy.
message DeploymentStrategy {
string type = 1;
RollingUpdateDeployment rollingUpdate = 2;
}
// See k8s.io.api.core.v1.EnvVar.
message EnvVar {
string name = 1;
string value = 2;
EnvVarSource valueFrom = 3;
}
// See k8s.io.api.core.v1.EnvVarSource.
message EnvVarSource {
ObjectFieldSelector fieldRef = 1;
ResourceFieldSelector resourceFieldRef = 2;
ConfigMapKeySelector configMapKeyRef = 3;
SecretKeySelector secretKeyRef = 4;
}
// See k8s.io.api.core.v1.ExecAction.
message ExecAction {
repeated string command = 1;
}
// See k8s.io.api.autoscaling.v2beta2.ExternalMetricSource.
message ExternalMetricSource {
string metricName = 1 [deprecated = true];
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2 [deprecated = true];
IntOrString targetValue = 3 [deprecated = true];
IntOrString targetAverageValue = 4 [deprecated = true];
MetricIdentifier metric = 5;
MetricTarget target = 6;
}
// See k8s.io.autoscaling.v2beta2.ExternalMetricStatus.
message ExternalMetricStatus {
MetricIdentifier metric = 1;
MetricValueStatus current = 2;
}
// See k8s.io.api.core.v1.HTTPGetAction.
message HTTPGetAction {
string path = 1;
IntOrString port = 2;
string host = 3;
string scheme = 4;
repeated HTTPHeader httpHeaders = 5;
}
// See k8s.io.api.core.v1.HTTPHeader.
message HTTPHeader {
string name = 1;
string value = 2;
}
// See k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec.
message HorizontalPodAutoscalerSpec {
CrossVersionObjectReference scaleTargetRef = 1;
int32 minReplicas = 2;
int32 maxReplicas = 3;
repeated MetricSpec metrics = 4;
HorizontalPodAutoScalerBehavior behavior = 5;
}
// See k8s.io.autoscaling.v2beta2.HorizontalPodAutoScalerBehavior.
message HorizontalPodAutoScalerBehavior {
HPAScalingRules scaleUp = 1;
HPAScalingRules scaleDown = 2;
}
// See k8s.io.autoscaling.v2beta2.HPAScalingRules.
message HPAScalingRules {
int32 stabilizationWindowSeconds = 3;
string selectPolicy = 1;
repeated HPAScalingPolicy policies = 2;
}
// See k8s.io.autoscaling.v2beta2.HPAScalingPolicy.
message HPAScalingPolicy {
string type = 1;
int32 value = 2;
int32 periodSeconds = 3;
}
// See k8s.io.api.core.v1.LocalObjectReference.
message LocalObjectReference {
string name = 1;
}
// See k8s.io.autoscaling.v2beta2.MetricIdentifier.
message MetricIdentifier {
optional string name = 1;
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
}
// See k8s.io.autoscaling.v2beta2.MetricSpec.
message MetricSpec {
string type = 1;
ObjectMetricSource object = 2;
PodsMetricSource pods = 3;
ResourceMetricSource resource = 4;
ContainerResourceMetricSource containerResource = 7;
ExternalMetricSource external = 5;
}
// See k8s.io.autoscaling.v2beta2.MetricStatus.
message MetricStatus {
string type = 1;
ObjectMetricStatus object = 2;
PodsMetricStatus pods = 3;
ResourceMetricStatus resource = 4;
ContainerResourceMetricStatus containerResource = 7;
ExternalMetricStatus external = 5;
}
// See k8s.io.autoscaling.v2beta2.MetricTarget.
message MetricTarget {
string type = 1;
IntOrString value = 2;
IntOrString averageValue = 3;
int32 averageUtilization = 4;
}
// See k8s.io.autoscaling.v2beta2.MetricValueStatus.
message MetricValueStatus {
IntOrString value = 1;
IntOrString averageValue = 2;
int32 averageUtilization = 3;
}
// See k8s.io.api.core.v1.NodeAffinity.
message NodeAffinity {
NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1;
repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
}
// See k8s.io.api.core.v1.NodeSelector.
message NodeSelector {
repeated NodeSelectorTerm nodeSelectorTerms = 1;
}
// See k8s.io.api.core.v1.NodeSelectorTerm.
message NodeSelectorTerm {
repeated NodeSelectorRequirement matchExpressions = 1;
repeated NodeSelectorRequirement matchFields = 2;
}
// See k8s.io.api.core.v1.NodeSelectorRequirement.
message NodeSelectorRequirement {
string key = 1;
string operator = 2;
repeated string values = 3;
}
// See k8s.io.api.core.v1.ObjectFieldSelector.
message ObjectFieldSelector {
string apiVersion = 1;
string fieldPath = 2;
}
// From k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta.
message ObjectMeta {
string name = 5;
string namespace = 6;
}
// See k8s.io.autoscaling.v2beta2.ObjectMetricSource.
message ObjectMetricSource {
string metricName = 2 [deprecated = true];
IntOrString targetValue = 3 [deprecated = true];
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4 [deprecated = true];
IntOrString averageValue = 5 [deprecated = true];
// Type changes from CrossVersionObjectReference to ResourceMetricTarget in autoscaling v2beta2/v2 compared with v2beta1
// Change it to dynamic type to keep backward compatible
google.protobuf.Value target = 1;
CrossVersionObjectReference describedObject = 6;
MetricIdentifier metric = 8;
}
// See k8s.io.autoscaling.v2beta2.ObjectMetricStatus.
message ObjectMetricStatus {
MetricIdentifier metric = 1;
MetricValueStatus current = 2;
CrossVersionObjectReference describedObject = 3;
}
// See k8s.io.api.core.v1.PodAffinity.
message PodAffinity {
repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
}
// See k8s.io.api.core.v1.PodAntiAffinity.
message PodAntiAffinity {
repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
}
// See k8s.io.api.core.v1.PodAntiAffinity.
message PodAffinityTerm {
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
repeated string namespaces = 2;
string topologyKey = 3;
}
// See k8s.io.api.policy.v1beta1.PodDisruptionBudget.
message PodDisruptionBudgetSpec {
IntOrString minAvailable = 1;
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
IntOrString maxUnavailable = 3;
}
// See k8s.io.autoscaling.v2beta2.PodsMetricSource.
message PodsMetricSource {
string metricName = 1 [deprecated = true];
IntOrString targetAverageValue = 2 [deprecated = true];
k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3 [deprecated = true];
// v2beta2/v2 fields
MetricIdentifier metric = 4;
MetricTarget target = 5;
}
// See k8s.io.autoscaling.v2beta2.PodsMetricStatus.
message PodsMetricStatus {
MetricIdentifier metric = 1;
MetricValueStatus current = 2;
}
// See k8s.io.api.core.v1.PreferredSchedulingTerm.
message PreferredSchedulingTerm {
int32 weight = 1;
NodeSelectorTerm preference = 2;
}
// See k8s.io.api.core.v1.ReadinessProbe.
message ReadinessProbe {
ExecAction exec = 1;
HTTPGetAction httpGet = 2;
TCPSocketAction tcpSocket = 3;
int32 initialDelaySeconds = 4;
int32 timeoutSeconds = 5;
int32 periodSeconds = 6;
int32 successThreshold = 7;
int32 failureThreshold = 8;
}
// See k8s.io.api.core.v1..
message ResourceFieldSelector {
string containerName = 1;
string resource = 2;
IntOrString divisor = 3;
}
// See k8s.io.autoscaling.v2beta2.ResourceMetricSource.
message ResourceMetricSource {
string name = 1;
int32 targetAverageUtilization = 2 [deprecated = true];
IntOrString targetAverageValue = 3 [deprecated = true];
MetricTarget target = 4;
}
// See k8s.io.autoscaling.v2beta2.ResourceMetricStatus.
message ResourceMetricStatus {
string name = 1;
MetricValueStatus current = 2;
}
// See k8s.io.api.core.v1.ResourceRequirements.
message Resources {
map<string, string> limits = 1;
map<string, string> requests = 2;
}
// See k8s.io.api.apps.v1.RollingUpdateDeployment.
message RollingUpdateDeployment {
IntOrString maxUnavailable = 1;
IntOrString maxSurge = 2;
}
// See k8s.io.api.core.v1.SecretKeySelector.
message SecretKeySelector {
LocalObjectReference localObjectReference = 1;
string key = 2;
bool optional = 3;
}
// See k8s.io.api.core.v1.ServiceSpec.
message ServiceSpec {
repeated ServicePort ports = 1;
map<string, string> selector = 2;
string clusterIP = 3;
string type = 4;
repeated string externalIPs = 5;
string sessionAffinity = 7;
string loadBalancerIP = 8;
repeated string loadBalancerSourceRanges = 9;
string externalName = 10;
string externalTrafficPolicy = 11;
int32 healthCheckNodePort = 12;
bool publishNotReadyAddresses = 13;
SessionAffinityConfig sessionAffinityConfig = 14;
string loadBalancerClass = 15;
}
// See k8s.io.api.core.v1..
message ServicePort {
string name = 1;
string protocol = 2;
int32 port = 3;
IntOrString targetPort = 4;
int32 nodePort = 5;
string appProtocol = 6;
}
// See k8s.io.api.core.v1.SessionAffinityConfig.
message SessionAffinityConfig {
ClientIPConfig clientIP = 1;
}
// See k8s.io.api.core.v1.TCPSocketAction.
message TCPSocketAction {
IntOrString port = 1;
string host = 2;
}
// See k8s.io.api.core.v1.Toleration.
message Toleration {
string key = 1;
string operator = 2;
string value = 3;
string effect = 4;
int64 tolerationSeconds = 5;
}
// See k8s.io.api.core.v1.WeightedPodAffinityTerm.
message WeightedPodAffinityTerm {
int32 weight = 1;
PodAffinityTerm podAffinityTerm = 2;
}
// See k8s.io.api.core.v1.PodSecurityContext.
message PodSecurityContext {
SELinuxOptions seLinuxOptions = 1;
int64 runAsUser = 2;
bool runAsNonRoot = 3;
repeated int64 supplementalGroups = 4;
int64 fsGroup = 5;
int64 runAsGroup = 6;
repeated Sysctl sysctls = 7;
WindowsSecurityContextOptions windowsOptions = 8;
string fsGroupChangePolicy = 9;
SeccompProfile seccompProfile = 10;
}
// See k8s.io.api.core.v1.SELinuxOptions.
message SELinuxOptions {
string user = 1;
string role = 2;
string type = 3;
string level = 4;
}
// See k8s.io.api.core.v1.Sysctl.
message Sysctl {
string name = 1;
string value = 2;
}
// See k8s.io.api.core.v1.WindowsSecurityContextOptions.
message WindowsSecurityContextOptions {
string gmsaCredentialSpecName = 1;
string gmsaCredentialSpec = 2;
string runAsUserName = 3;
}
// See k8s.io.api.core.v1.SeccompProfile.
message SeccompProfile {
string type = 1;
string localhostProfile = 2;
}
// IntOrString is a type that can hold an int32 or a string. When used in
// JSON or YAML marshalling and unmarshalling, it produces or consumes the
// inner type. This allows you to have, for example, a JSON field that can
// accept a name or number.
message IntOrString {
int64 type = 1;
google.protobuf.Int32Value intVal = 2;
google.protobuf.StringValue strVal = 3;
}