def _mount_secret_op(secret_name: Text) -> OpFunc:
    'Mounts all key-value pairs found in the named Kubernetes Secret.\n\n  All key-value pairs in the Secret are mounted as environment variables.\n\n  Args:\n    secret_name: The name of the Secret resource.\n\n  Returns:\n    An OpFunc for mounting the Secret.\n  '

    def mount_secret(container_op: dsl.ContainerOp):
        secret_ref = k8s_client.V1ConfigMapEnvSource(name=secret_name, optional=True)
        container_op.container.add_env_from(k8s_client.V1EnvFromSource(secret_ref=secret_ref))
    return mount_secret
Mounts all key-value pairs found in the named Kubernetes Secret.

All key-value pairs in the Secret are mounted as environment variables.

Args:
  secret_name: The name of the Secret resource.

Returns:
  An OpFunc for mounting the Secret.
def _mount_secret_op(secret_name: Text) -> OpFunc:
    'Mounts all key-value pairs found in the named Kubernetes Secret.\n\n  All key-value pairs in the Secret are mounted as environment variables.\n\n  Args:\n    secret_name: The name of the Secret resource.\n\n  Returns:\n    An OpFunc for mounting the Secret.\n  '

    def mount_secret(container_op: dsl.ContainerOp):
        secret_ref = k8s_client.V1ConfigMapEnvSource(name=secret_name, optional=True)
        container_op.container.add_env_from(k8s_client.V1EnvFromSource(secret_ref=secret_ref))
    return mount_secret