-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add amazon_web_services configuration option to specify EKS cluster api server endpoint access setting #2618
Add amazon_web_services configuration option to specify EKS cluster api server endpoint access setting #2618
Conversation
… to specify EKS cluster endpoint access
… to specify EKS cluster endpoint access
src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf
Fixed
Show resolved
Hide resolved
@@ -146,6 +146,7 @@ class AWSInputVars(schema.Base): | |||
existing_subnet_ids: Optional[List[str]] = None | |||
region: str | |||
kubernetes_version: str | |||
eks_endpoint_access: str = "public" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having an Enum here (https://docs.pydantic.dev/2.2/usage/types/enums/) rather than a string would make sense. That way you don't need to write your own validator.
@@ -465,6 +466,7 @@ class AmazonWebServicesProvider(schema.Base): | |||
kubernetes_version: str | |||
availability_zones: Optional[List[str]] | |||
node_groups: Dict[str, AWSNodeGroup] = DEFAULT_AWS_NODE_GROUPS | |||
eks_endpoint_access: str = "public" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having an Enum here (https://docs.pydantic.dev/2.2/usage/types/enums/) rather than a string would make sense. That way you don't need to write your own validator.
@@ -520,6 +522,18 @@ def _check_input(cls, data: Any) -> Any: | |||
raise ValueError( | |||
f"Amazon Web Services instance {node_group.instance} not one of available instance types={available_instances}" | |||
) | |||
|
|||
# check if eks cluster endpoint access config is valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validator could be removed if you switch to an enum with a default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf
Fixed
Show resolved
Hide resolved
…n to specify EKS cluster endpoint access
…n to specify EKS cluster endpoint access
Hi @joneszc things that are important to test on general infrastructure PRs:
This is one specific to this changes:
|
Also asserted on a separate deployment 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, no compatibility issues as well. Thanks @joneszc for the contribution!!
tested with aws deployments for each configuration
Thank you!! |
Reference Issues or PRs
Fixes #2586
Fixes #2587
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Any other comments?
This PR corrects original PR #2587 by enabling cluster endpoint access configuration by means of a single variable:
amazon_web_services.eks_endpoint_access