@@ -49,17 +49,20 @@ message EnabledSharedMemory {
49
49
}
50
50
51
51
message SecretAsVolume {
52
- // Name of the Secret .
53
- string secret_name = 1 ;
52
+ // Deprecated, use secret_name_parameter instead .
53
+ string secret_name = 1 [ deprecated = true ] ;
54
54
// Container path to mount the Secret data.
55
55
string mount_path = 2 ;
56
56
// An optional boolean value indicating whether the Secret must be defined.
57
57
optional bool optional = 3 ;
58
+
59
+ // Name of the Secret.
60
+ InputParameterSpec secret_name_parameter = 4 ;
58
61
}
59
62
60
63
message SecretAsEnv {
61
- // Name of the Secret .
62
- string secret_name = 1 ;
64
+ // Deprecated, use secret_name_parameter instead .
65
+ string secret_name = 1 [ deprecated = true ] ;
63
66
64
67
message SecretKeyToEnvMap {
65
68
// Corresponds to a key of the Secret.data field.
@@ -69,31 +72,26 @@ message SecretAsEnv {
69
72
}
70
73
71
74
repeated SecretKeyToEnvMap key_to_env = 2 ;
72
- }
73
-
74
- // Represents an upstream task's output parameter.
75
- message TaskOutputParameterSpec {
76
- // The name of the upstream task which produces the output parameter that
77
- // matches with the `output_parameter_key`.
78
- string producer_task = 1 ;
79
75
80
- // The key of [TaskOutputsSpec.parameters][] map of the producer task .
81
- string output_parameter_key = 2 ;
76
+ // Name of the Secret .
77
+ InputParameterSpec secret_name_parameter = 4 ;
82
78
}
83
79
84
80
message PvcMount {
85
- // Identifier for the PVC.
86
- // Used like TaskInputsSpec.InputParameterSpec.kind.
81
+ // Deprecated, use pvc_name_parameter instead.
87
82
oneof pvc_reference {
88
83
// Output parameter from an upstream task.
89
- TaskOutputParameterSpec task_output_parameter = 1 ;
84
+ TaskOutputParameterSpec task_output_parameter = 1 [ deprecated = true ] ;
90
85
// A constant value.
91
- string constant = 2 ;
86
+ string constant = 2 [ deprecated = true ] ;
92
87
// Pass the input parameter from parent component input parameter.
93
- string component_input_parameter = 3 ;
88
+ string component_input_parameter = 3 [ deprecated = true ] ;
94
89
}
95
90
// Container path to which the PVC should be mounted.
96
91
string mount_path = 4 ;
92
+
93
+ // Name of the PVC.
94
+ InputParameterSpec pvc_name_parameter = 5 ;
97
95
}
98
96
99
97
message CreatePvc {
@@ -136,6 +134,11 @@ message NodeSelector {
136
134
// map of label key to label value
137
135
// corresponds to Pod.spec.nodeSelector field https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
138
136
map <string , string > labels = 1 ;
137
+
138
+ // Provide a json struct of node selector
139
+ // Takes precedence over labels.
140
+ // Example: {"disk-type": "ssd", "region": "us-west"}
141
+ InputParameterSpec node_selector_json = 2 ;
139
142
}
140
143
141
144
message PodMetadata {
@@ -146,17 +149,20 @@ message PodMetadata {
146
149
}
147
150
148
151
message ConfigMapAsVolume {
149
- // Name of the ConfigMap .
150
- string config_map_name = 1 ;
152
+ // Deprecated, use config_name_parameter instead .
153
+ string config_map_name = 1 [ deprecated = true ] ;
151
154
// Container path to mount the ConfigMap data.
152
155
string mount_path = 2 ;
153
156
// An optional boolean value indicating whether the ConfigMap must be defined.
154
157
optional bool optional = 3 ;
158
+
159
+ // Name of the ConfigMap.
160
+ InputParameterSpec config_name_parameter = 4 ;
155
161
}
156
162
157
163
message ConfigMapAsEnv {
158
- // Name of the ConfigMap .
159
- string config_map_name = 1 ;
164
+ // Deprecated, use config_name_parameter instead .
165
+ string config_map_name = 1 [ deprecated = true ] ;
160
166
161
167
message ConfigMapKeyToEnvMap {
162
168
// Corresponds to a key of the ConfigMap.
@@ -166,6 +172,9 @@ message ConfigMapAsEnv {
166
172
}
167
173
168
174
repeated ConfigMapKeyToEnvMap key_to_env = 2 ;
175
+
176
+ // Name of the ConfigMap.
177
+ InputParameterSpec config_name_parameter = 3 ;
169
178
}
170
179
171
180
message GenericEphemeralVolume {
@@ -190,7 +199,9 @@ message GenericEphemeralVolume {
190
199
191
200
message ImagePullSecret {
192
201
// Name of the image pull secret.
193
- string secret_name = 1 ;
202
+ string secret_name = 1 [deprecated = true ];
203
+
204
+ InputParameterSpec secret_name_parameter = 2 ;
194
205
}
195
206
196
207
message FieldPathAsEnv {
@@ -207,6 +218,14 @@ message Toleration {
207
218
string value = 3 ;
208
219
string effect = 4 ;
209
220
optional int64 toleration_seconds = 5 ;
221
+
222
+ // Provide a json struct of the toleration
223
+ // Takes precedence over key, operator, value, effect.
224
+ // Example: {"key": "key1", "operator": "Equal", "value": "value1", "effect": "NoSchedule"}
225
+ // The JSON must follow Kubernetes
226
+ // Toleration structure:
227
+ // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core
228
+ InputParameterSpec toleration_json = 6 ;
210
229
}
211
230
212
231
// Matches https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#labelselectorrequirement-v1-meta and
@@ -244,3 +263,106 @@ message EmptyDirMount {
244
263
optional string medium = 3 ;
245
264
optional string size_limit = 4 ;
246
265
}
266
+
267
+ // The proto messages below are copied from pipeline_spec.proto
268
+ // and should match their structure.
269
+
270
+ // Represents an input parameter. The value can be taken from an upstream
271
+ // task's output parameter (if specifying `producer_task` and
272
+ // `output_parameter_key`, or it can be a runtime value, which can either be
273
+ // determined at compile-time, or from a pipeline parameter.
274
+ message InputParameterSpec {
275
+ // Represents an upstream task's output parameter.
276
+ message TaskOutputParameterSpec {
277
+ // The name of the upstream task which produces the output parameter that
278
+ // matches with the `output_parameter_key`.
279
+ string producer_task = 1 ;
280
+
281
+ // The key of [TaskOutputsSpec.parameters][] map of the producer task.
282
+ string output_parameter_key = 2 ;
283
+ }
284
+
285
+ // Represents an upstream task's final status. The field can only be set if
286
+ // the schema version is `2.0.0`. The resolved input parameter will be a
287
+ // json payload in string type.
288
+ message TaskFinalStatus {
289
+ // The name of the upsteram task where the final status is coming from.
290
+ string producer_task = 1 ;
291
+ }
292
+
293
+ oneof kind {
294
+ // Output parameter from an upstream task.
295
+ TaskOutputParameterSpec task_output_parameter = 1 ;
296
+ // A constant value or runtime parameter.
297
+ ValueOrRuntimeParameter runtime_value = 2 ;
298
+ // Pass the input parameter from parent component input parameter.
299
+ string component_input_parameter = 3 ;
300
+ // The final status of an upstream task.
301
+ TaskFinalStatus task_final_status = 5 ;
302
+ }
303
+
304
+ // Selector expression of Common Expression Language (CEL)
305
+ // that applies to the parameter found from above kind.
306
+ //
307
+ // The expression is applied to the Value type
308
+ // [Value][]. For example,
309
+ // 'size(string_value)' will return the size of the Value.string_value.
310
+ //
311
+ // After applying the selection, the parameter will be returned as a
312
+ // [Value][]. The type of the Value is either deferred from the input
313
+ // definition in the corresponding
314
+ // [ComponentSpec.input_definitions.parameters][], or if not found,
315
+ // automatically deferred as either string value or double value.
316
+ //
317
+ // In addition to the builtin functions in CEL, The value.string_value can
318
+ // be treated as a json string and parsed to the [google.protobuf.Value][]
319
+ // proto message. Then, the CEL expression provided in this field will be
320
+ // used to get the requested field. For examples,
321
+ // - if Value.string_value is a json array of "[1.1, 2.2, 3.3]",
322
+ // 'parseJson(string_value)[i]' will pass the ith parameter from the list
323
+ // to the current task, or
324
+ // - if the Value.string_value is a json map of "{"a": 1.1, "b": 2.2,
325
+ // "c": 3.3}, 'parseJson(string_value)[key]' will pass the map value from
326
+ // the struct map to the current task.
327
+ //
328
+ // If unset, the value will be passed directly to the current task.
329
+ string parameter_expression_selector = 4 ;
330
+ }
331
+
332
+ // Definition for a value or reference to a runtime parameter. A
333
+ // ValueOrRuntimeParameter instance can be either a field value that is
334
+ // determined during compilation time, or a runtime parameter which will be
335
+ // determined during runtime.
336
+ message ValueOrRuntimeParameter {
337
+ oneof value {
338
+ // Constant value which is determined in compile time.
339
+ // Deprecated. Use [ValueOrRuntimeParameter.constant][] instead.
340
+ Value constant_value = 1 [deprecated = true ];
341
+ // The runtime parameter refers to the parent component input parameter.
342
+ string runtime_parameter = 2 ;
343
+ // Constant value which is determined in compile time.
344
+ google.protobuf.Value constant = 3 ;
345
+ }
346
+ }
347
+
348
+ // Value is the value of the field.
349
+ message Value {
350
+ oneof value {
351
+ // An integer value
352
+ int64 int_value = 1 ;
353
+ // A double value
354
+ double double_value = 2 ;
355
+ // A string value
356
+ string string_value = 3 ;
357
+ }
358
+ }
359
+
360
+ // Represents an upstream task's output parameter.
361
+ message TaskOutputParameterSpec {
362
+ // The name of the upstream task which produces the output parameter that
363
+ // matches with the `output_parameter_key`.
364
+ string producer_task = 1 ;
365
+
366
+ // The key of [TaskOutputsSpec.parameters][] map of the producer task.
367
+ string output_parameter_key = 2 ;
368
+ }
0 commit comments