[feature] Allow kfp.kubernetes
to set optional=True on Secrets and ConfigMaps as environment variables
#11401
Labels
kfp.kubernetes
to set optional=True on Secrets and ConfigMaps as environment variables
#11401
Feature Area
/area backend
/area sdk
What feature would you like to see?
Methods
kfp.kubernetes.use_secret_as_env
andkfp.kubernetes.use_config_map_as_env
do not allow to provideoptional
flag to CMs/Secrets being attached to a pod as environment variables. Kubernetes schema supports it: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#envvarsource-v1-corekfp.kubernetes
already supports theoptional
flag for*_as_volume
methods, but for some reason this is not the case for*_as_env
.What is the use case or pain point?
In case an user wants to use a config maps/secret's property as an environment variable that is needed in the pod only under specific conditions, we have no way of allowing the pod to mount mount it only if the secret/config maps is present. The resource is required to be present all the times, though in many cases it might not be needed.
Is there a workaround currently?
Pipeline author has to always ensure to populate all the requirested secrets/config maps instead of providing only those which are relevant at the time.
Love this idea? Give it a 👍.
The text was updated successfully, but these errors were encountered: