Skip to content

Commit 3293763

Browse files
committed
Fix kfp-kubernetes-library-tests by regenerating Python protobuf bindings
- Regenerate Python protobuf bindings to include the optional field for SecretAsEnv and ConfigMapAsEnv - Update test_volume.py to expect optional: False in secretAsEnv - Include backend driver code that handles optional field (from stash) - All 110 kfp-kubernetes-library-tests now pass - Fixes PR kubeflow#12216 test failures Signed-off-by: ddalvi <[email protected]>
1 parent 10cdb55 commit 3293763

File tree

3 files changed

+51
-48
lines changed

3 files changed

+51
-48
lines changed

backend/src/v2/driver/k8s.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,13 @@ func extendPodSpecPatch(
273273
// Get secret env information
274274
for _, secretAsEnv := range kubernetesExecutorConfig.GetSecretAsEnv() {
275275
for _, keyToEnv := range secretAsEnv.GetKeyToEnv() {
276+
optional := secretAsEnv.Optional != nil && *secretAsEnv.Optional
276277
secretEnvVar := k8score.EnvVar{
277278
Name: keyToEnv.GetEnvVar(),
278279
ValueFrom: &k8score.EnvVarSource{
279280
SecretKeyRef: &k8score.SecretKeySelector{
280-
Key: keyToEnv.GetSecretKey(),
281+
Key: keyToEnv.GetSecretKey(),
282+
Optional: &optional,
281283
},
282284
},
283285
}

0 commit comments

Comments
 (0)