Skip to content

Commit

Permalink
Update comments: config_file must be specified explicitly (#11318)
Browse files Browse the repository at this point in the history
* Update comments: config_file must be specified explicitly

* Fix formatting
  • Loading branch information
pavel-salnikov authored Mar 21, 2024
1 parent 502112c commit f3945b9
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions composer/workflows/kubernetes_pod_operator_c2.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@
start_date=YESTERDAY,
) as dag:
# Only name, namespace, image, and task_id are required to create a
# KubernetesPodOperator. In Cloud Composer, currently the operator defaults
# to using the config file found at `/home/airflow/composer_kube_config if
# no `config_file` parameter is specified. By default it will contain the
# credentials for Cloud Composer's Google Kubernetes Engine cluster that is
# created upon environment creation.
# KubernetesPodOperator. In Cloud Composer, the config file found at
# `/home/airflow/composer_kube_config` contains credentials for
# Cloud Composer's Google Kubernetes Engine cluster that is created
# upon environment creation.
# [START composer_2_kubernetespodoperator_minconfig]
kubernetes_min_pod = KubernetesPodOperator(
# The ID specified for the task.
Expand All @@ -89,8 +88,7 @@
# uses has permission to access the Google Container Registry
# (the default service account has permission)
image="gcr.io/gcp-runtimes/ubuntu_20_0_4",
# Specifies path to kubernetes config. If no config is specified will
# default to '~/.kube/config'. The config_file is templated.
# Specifies path to kubernetes config. The config_file is templated.
config_file="/home/airflow/composer_kube_config",
# Identifier of connection that should be used
kubernetes_conn_id="kubernetes_default",
Expand Down Expand Up @@ -144,8 +142,7 @@
"EXAMPLE_VAR": "/example/value",
"GOOGLE_APPLICATION_CREDENTIALS": "/var/secrets/google/service-account.json",
},
# Specifies path to kubernetes config. If no config is specified will
# default to '~/.kube/config'. The config_file is templated.
# Specifies path to kubernetes config. The config_file is templated.
config_file="/home/airflow/composer_kube_config",
# Identifier of connection that should be used
kubernetes_conn_id="kubernetes_default",
Expand Down Expand Up @@ -195,8 +192,7 @@
requests={"cpu": "1000m", "memory": "10G", "ephemeral-storage": "10G"},
limits={"cpu": "1000m", "memory": "10G", "ephemeral-storage": "10G"},
),
# Specifies path to kubernetes config. If no config is specified will
# default to '~/.kube/config'. The config_file is templated.
# Specifies path to kubernetes config. The config_file is templated.
config_file="/home/airflow/composer_kube_config",
# If true, the content of /airflow/xcom/return.json from container will
# also be pushed to an XCom when the container ends.
Expand Down

0 comments on commit f3945b9

Please sign in to comment.