-
Notifications
You must be signed in to change notification settings - Fork 561
/
Copy pathcomponent.proto
186 lines (159 loc) · 6.65 KB
/
component.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
// 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";
import "google/protobuf/any.proto";
import "k8s.io/api/autoscaling/v2beta1/generated.proto";
import "mesh/v1alpha1/kubernetes.proto";
package istio.mesh.v1alpha1;
option go_package="istio.io/api/mesh/v1alpha1";
// IstioComponentSpec defines the desired installed state of Istio components.
message IstioComponentSetSpec {
ComponentSpec pilot = 30;
ComponentSpec proxy = 31;
ComponentSpec sidecar_injector = 32;
ComponentSpec policy = 33;
ComponentSpec telemetry = 34;
ComponentSpec citadel = 35;
ComponentSpec node_agent = 36;
ComponentSpec galley = 37;
ComponentSpec cni = 38;
ComponentSpec core_dNS = 39;
repeated GatewaySpec ingress_gateways = 40;
repeated GatewaySpec egress_gateways = 41;
// Extra addon components which are not explicitly specified above.
map<string, ExternalComponentSpec> extra_components = 100;
}
// Configuration for internal components.
message ComponentSpec {
// Selects whether this component is installed.
TypeBoolValueForPB 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).
string tag = 11;
// Arbitrary install time configuration for the component.
TypeInterface spec = 30;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// Configuration for external components.
message ExternalComponentSpec {
// Enablement is implied by the existence of this spec.
// Namespace for the component.
string namespace = 2;
// Arbitrary install time configuration for the component.
TypeInterface spec = 10;
// Chart path for addon components.
string chart_path = 30;
// Optional schema to validate spec against.
google.protobuf.Any schema = 35;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// Configuration for gateways.
message GatewaySpec {
// Enablement is implied by the existence of this spec.
// 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).
string tag = 11;
// Kubernetes resource spec.
KubernetesResourcesSpec k8s = 50;
}
// KubernetesResourcesConfig is a common set of k8s resource configs for components.
message KubernetesResourcesSpec {
// k8s 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/
repeated EnvVar env = 2;
// k8s HorizontalPodAutoscaler settings.
// https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec hpa_spec = 3;
// k8s imagePullPolicy.
// https://kubernetes.io/docs/concepts/containers/images/
string image_pull_policy = 4;
// k8s nodeSelector.
// https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
map<string, string> node_selector = 5;
// k8s PodDisruptionBudget settings.
// https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#how-disruption-budgets-work
PodDisruptionBudgetSpec pod_disruption_budget = 6;
// k8s pod annotations.
// https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
map<string, string> pod_annotations = 7;
// k8s priority_class_name. Default for all resources unless overridden.
// https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
string priority_class_name = 8;
// k8s readinessProbe settings.
// https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
// k8s.io.api.core.v1.Probe readiness_probe = 9;
ReadinessProbe readiness_probe = 9;
// k8s Deployment replicas setting.
// https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
uint32 replica_count = 10;
// k8s resources settings.
// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container
Resources resources = 11;
// k8s Service settings.
// https://kubernetes.io/docs/concepts/services-networking/service/
ServiceSpec service = 12;
// k8s deployment strategy.
// https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
DeploymentStrategy strategy = 13;
// k8s toleration
// https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
Toleration tolerations = 14;
// Overlays for k8s resources in rendered manifests.
repeated K8sObjectOverlay overlays = 100;
}
// Patch for an existing k8s resource.
message K8sObjectOverlay {
message PathValue {
// Path of the form a.b:c.e.:f
// Where b:c is a list element selector of the form key:value and :f is a list selector of the form :value.
// 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.
TypeInterface value = 2;
}
// Resource API version.
string api_version = 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;
}
// GOTYPE: map[string]interface{}
message TypeMapStringInterface {}
// GOTYPE: interface{}
message TypeInterface {}
// GOTYPE: *BoolValueForPB
message TypeBoolValueForPB {}