ephraimbuddy commented on a change in pull request #19355:
URL: https://github.com/apache/airflow/pull/19355#discussion_r747330179



##########
File path: airflow/example_dags/example_kubernetes_executor.py
##########
@@ -16,88 +16,214 @@
 # specific language governing permissions and limitations
 # under the License.
 """
-This is an example dag for using the Kubernetes Executor.
+This is an example dag for using a Kubernetes Executor Configuration.
 """
+import logging
 import os
 from datetime import datetime
 
 from airflow import DAG
+from airflow.configuration import conf
 from airflow.decorators import task
 from airflow.example_dags.libs.helper import print_stuff
 
+log = logging.getLogger(__name__)
+
+worker_container_repository = conf.get('kubernetes', 
'worker_container_repository')
+worker_container_tag = conf.get('kubernetes', 'worker_container_tag')
+
+try:
+    from kubernetes.client import models as k8s
+except ImportError as e:
+    log.warning("Could not import DAGs in example_kubernetes_executor.py: %s", 
str(e))
+    log.warning("Install kubernetes dependencies with: pip install 
apache-airflow['cncf.kubernetes']")
+
+
 with DAG(
     dag_id='example_kubernetes_executor',
     schedule_interval=None,
     start_date=datetime(2021, 1, 1),
     catchup=False,
-    tags=['example', 'example2'],
+    tags=['example3'],

Review comment:
       Just to group dags so one can easily filter the dags in the UI based on 
the tag. This here is only used for demonstration purpose




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to