airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters

Executes task in a Kubernetes POD.

Functions

convert_volume(volume)

Convert an airflow Volume object into a k8s.V1Volume.

convert_volume_mount(volume_mount)

Convert an airflow VolumeMount object into a k8s.V1VolumeMount.

convert_port(port)

Convert an airflow Port object into a k8s.V1ContainerPort.

convert_env_vars(env_vars)

Coerce env var collection for kubernetes.

convert_env_vars_or_raise_error(env_vars)

Separate function to convert env var collection for kubernetes and then raise an error if it is still the wrong type.

convert_pod_runtime_info_env(pod_runtime_info_envs)

Convert a PodRuntimeInfoEnv into an k8s.V1EnvVar.

convert_image_pull_secrets(image_pull_secrets)

Convert a PodRuntimeInfoEnv into an k8s.V1EnvVar.

convert_configmap(configmaps)

Convert a str into an k8s.V1EnvFromSource.

convert_affinity(affinity)

Convert a dict into an k8s.V1Affinity.

convert_toleration(toleration)

Convert a dict into an k8s.V1Toleration.

Module Contents

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_volume(volume)[source]

Convert an airflow Volume object into a k8s.V1Volume.

Parameters:

volume

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_volume_mount(volume_mount)[source]

Convert an airflow VolumeMount object into a k8s.V1VolumeMount.

Parameters:

volume_mount

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_port(port)[source]

Convert an airflow Port object into a k8s.V1ContainerPort.

Parameters:

port

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_env_vars(env_vars)[source]

Coerce env var collection for kubernetes.

If the collection is a str-str dict, convert it into a list of V1EnvVar variables.

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_env_vars_or_raise_error(env_vars)[source]

Separate function to convert env var collection for kubernetes and then raise an error if it is still the wrong type.

This is used after the template strings have been rendered.

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_pod_runtime_info_env(pod_runtime_info_envs)[source]

Convert a PodRuntimeInfoEnv into an k8s.V1EnvVar.

Parameters:

pod_runtime_info_envs

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_image_pull_secrets(image_pull_secrets)[source]

Convert a PodRuntimeInfoEnv into an k8s.V1EnvVar.

Parameters:

image_pull_secrets

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_configmap(configmaps)[source]

Convert a str into an k8s.V1EnvFromSource.

Parameters:

configmaps

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_affinity(affinity)[source]

Convert a dict into an k8s.V1Affinity.

airflow.providers.cncf.kubernetes.backcompat.backwards_compat_converters.convert_toleration(toleration)[source]

Convert a dict into an k8s.V1Toleration.

Was this entry helpful?