You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/11 15:36:16 UTC

[GitHub] [airflow] MaksYermak commented on a diff in pull request #22852: Add ability for Dataproc operator to create cluster in GKE cluster

MaksYermak commented on code in PR #22852:
URL: https://github.com/apache/airflow/pull/22852#discussion_r847464478


##########
airflow/providers/google/cloud/hooks/dataproc.py:
##########
@@ -324,12 +332,20 @@ def create_cluster(
         labels = labels or {}
         labels.update({'airflow-version': 'v' + airflow_version.replace('.', '-').replace('+', '-')})
 
-        cluster = {
-            "project_id": project_id,
-            "cluster_name": cluster_name,
-            "config": cluster_config,
-            "labels": labels,
-        }
+        cluster = (
+            {
+                "project_id": project_id,
+                "cluster_name": cluster_name,
+                "virtual_cluster_config": virtual_cluster_config,
+            }
+            if run_in_gke_cluster
+            else {
+                "project_id": project_id,
+                "cluster_name": cluster_name,
+                "config": cluster_config,
+                "labels": labels,
+            }
+        )

Review Comment:
   I have removed `run_in_gke_cluster` flag from the code 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org