Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions airflow/providers/cncf/kubernetes/hooks/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ class KubernetesHook(BaseHook):

:param conn_id: The :ref:`kubernetes connection <howto/connection:kubernetes>`
to Kubernetes cluster.
:param client_configuration: (Optional) The kubernetes.client.Configuration to set configs to.
:param cluster_context: (Optional) Use to set the active context. If is set to None, current_context from
config file will be used. Takes priority over ``extra__kubernetes__cluster_context``.
:param config_file: (Optional) Name of the kube-config file.
Takes priority over ``extra__kubernetes__kube_config_path``.
:param in_cluster: (Optional) Loads kube config from in_cluster configuration.
Takes priority over ``extra__kubernetes__in_cluster`` in connection.
"""

conn_name_attr = 'kubernetes_conn_id'
Expand Down
14 changes: 14 additions & 0 deletions airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class KubernetesPodOperator(BaseOperator):
:param labels: labels to apply to the Pod. (templated)
:param startup_timeout_seconds: timeout in seconds to startup the pod.
:param get_logs: get the stdout of the container as logs of the tasks.
:param env_from: (Optional) List of sources to populate environment variables in the container.
The keys defined within a source must be a C_IDENTIFIER.
All invalid keys will be reported as an event when the container is starting.
When a key exists in multiple sources, the value associated with the last source
will take precedence. Values defined by an Env with a duplicate key will take precedence.
Cannot be updated.
Comment thread
mariasumedre-3pg marked this conversation as resolved.
Outdated
:param image_pull_policy: Specify a policy to cache or always pull an image.
:param annotations: non-identifying metadata you can attach to the Pod.
Can be a large range of data, and can include characters
Expand All @@ -119,6 +125,8 @@ class KubernetesPodOperator(BaseOperator):
:param affinity: affinity scheduling rules for the launched pod.
:param config_file: The path to the Kubernetes config file. (templated)
If not specified, default value is ``~/.kube/config``
:param node_selectors: (Deprecated) A dict containing a group of scheduling rules.
Please use node_selector instead.
:param node_selector: A dict containing a group of scheduling rules.
:param image_pull_secrets: Any image pull secrets to be given to the pod.
If more than one secret is required, provide a
Expand All @@ -142,6 +150,12 @@ class KubernetesPodOperator(BaseOperator):
:param priority_class_name: priority class name for the launched Pod
:param termination_grace_period: Termination grace period if task killed in UI,
defaults to kubernetes default
:param pod_runtime_info_envs: (Optional) A list of environment variables,
to be set in the container. Cannot be updated.
Comment thread
mariasumedre-3pg marked this conversation as resolved.
Outdated
:param configmaps: (Optional) A list of names of config maps from which it collects ConfigMaps
to populate the environment variables with. The contents of the target
ConfigMap's Data field will represent the key-value pairs as environment variables.
Extends env_from.
"""

BASE_CONTAINER_NAME = 'base'
Expand Down