mik-laj commented on a change in pull request #18645:
URL: https://github.com/apache/airflow/pull/18645#discussion_r719868145
##########
File path: airflow/providers/amazon/aws/operators/eks.py
##########
@@ -93,21 +122,42 @@ def __init__(
cluster_name: str,
cluster_role_arn: str,
resources_vpc_config: Dict,
+ compute: Optional[str] = DEFAULT_COMPUTE_TYPE,
nodegroup_name: Optional[str] = None,
nodegroup_role_arn: Optional[str] = None,
- compute: Optional[str] = DEFAULT_COMPUTE_TYPE,
+ fargate_profile_name: Optional[str] = None,
+ fargate_pod_execution_role_arn: Optional[str] = None,
+ fargate_selectors: Optional[List] = None,
aws_conn_id: str = DEFAULT_CONN_ID,
region: Optional[str] = None,
**kwargs,
) -> None:
+ if compute:
+ try:
+ if (compute == 'nodegroup') and not nodegroup_role_arn:
+ raise ValueError(
+ MISSING_ARN_MSG.format(compute=NODEGROUP_FULL_NAME,
requirement='nodegroup_role_arn')
+ )
+ if (compute == 'fargate') and not
fargate_pod_execution_role_arn:
+ raise ValueError(
+ MISSING_ARN_MSG.format(
+ compute=FARGATE_FULL_NAME,
requirement='fargate_pod_execution_role_arn'
+ )
+ )
+ except KeyError:
Review comment:
When this situation can happen?
--
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]