mrkm4ntr commented on a change in pull request #20647:
URL: https://github.com/apache/airflow/pull/20647#discussion_r795421083
##########
File path: airflow/providers/google/cloud/operators/kubernetes_engine.py
##########
@@ -335,8 +339,16 @@ def __init__(
stacklevel=2,
)
is_delete_operator_pod = False
+ if in_cluster:
+ warnings.warn(
+ f"You should not set parameter `in_cluster` `True` in class
{self.__class__.__name__}. "
+ "This operator uses Google Service Account(GSA) not Kubernetes
Service Account(KSA)."
+ "If you can use KSA with in_cluster `True`, you should use
KubernetesPodOperator directly.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
- super().__init__(is_delete_operator_pod=is_delete_operator_pod,
**kwargs)
+ super().__init__(is_delete_operator_pod=is_delete_operator_pod,
in_cluster=in_cluster, **kwargs)
Review comment:
I cared about the users who are using GKEPodOperator with KSA
accidentally. Those users should KubernetesPodOperator instead of
GKEPodOperator but I'd not like to introduce a breaking change.
If we don't have to care about those users, we can just set
`in_cluster=False` directly.
--
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]