-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(appmesh): ipv6 support for app mesh #20766
Conversation
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.
Please update this PR's description to describe the feature you're adding and give a high-level overview of how it works.
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 is a really strong start. Nice work!
/** | ||
* IP preference applied to all Virtual Nodes in the Mesh | ||
* | ||
* @default No IP preference is applied to Virtual Nodes |
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.
lines 64-67 should be moved here.
* @default No IP preference is applied to Virtual Nodes | |
* @default - No IP preference is applied to Virtual Nodes |
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've gone ahead and consolidated everything. Let me know if there is further feedback on this.
@@ -29,7 +34,7 @@ const virtualService = new appmesh.VirtualService(stack, 'service', { | |||
}); | |||
|
|||
const node = mesh.addVirtualNode('node', { | |||
serviceDiscovery: appmesh.ServiceDiscovery.dns(`node1.${namespace.namespaceName}`), | |||
serviceDiscovery: appmesh.ServiceDiscovery.dns(`node1.${namespace.namespaceName}`, undefined, appmesh.IpPreference.IPV4_ONLY), |
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.
how does the IP preference of the serviceDiscovery
in this node interact with the ip preference of the serviceDiscovery
set on lines 21-23? Does one overwrite the other? Is this allowed? This behavior should be documented in the comment block of the method.
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.
There are two resource levels we allowing setting this preference as you point out. A Mesh is the top level resource which users will be creating Virtual Nodes within. A Mesh preference will apply to all Virtual Nodes as a default value and each individual Virtual Node can set its own preference to override the Mesh preference. If there is no preference set anywhere then no default preference is applied.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
App Mesh has released IPv6 support. This has been exposed in the form of IP preferences which have been added to the Mesh and Virtual Node resources. IP preferences are optional for both resources and there is no default IP preference that is applied by App Mesh. The following are samples of App Mesh resources with IP preferences configured. ``` # Mesh "spec": { "serviceDiscovery": { "ipPreference": "IPv6_PREFERRED" } } ``` ``` # Virtual Node "spec": { "listeners": [ { "healthCheck": { "healthyThreshold": 2, "intervalMillis": 5000, "path": "/ping", "protocol": "http", "timeoutMillis": 2000, "unhealthyThreshold": 2 }, "portMapping": { "port": 9080, "protocol": "http" } } ], "serviceDiscovery": { "dns": { "hostname": "colorteller-red.default.svc.cluster.local", "ipPreference": "IPv4_ONLY" } } } ``` IP preferences on a Mesh apply the preference to all Virtual Nodes contained within that Mesh. IP preferences set on a Virtual Node will only apply to that particular Virtual Node. Additionally, Virtual Node IP preferences will override the Mesh IP preference if there is one present. There are three areas in which the IP preference impacts how Envoy configuration generation. Firstly, setting any IP preference will change the Envoy's listeners (ingress and egress) to bind to IPv4 and IPv6 allowing the Envoy to serve all traffic from both IP versions. Secondly, the IP version specified in the name of the preference will be the IP version used for sending traffic to the local application for Envoys running as a sidecar to an application. (IPv4_ONLY/PREFERRED - IPv4, IPv6_ONLY/PREFERRED - IPv6) Lastly, it will impact how each service discovery option will be treated. For CloudMap service discovery, ONLY options will only return IPs from CloudMap for the matching version type and PREFERRED options will first used the primary IP version first and fall back to the other IP version for the IPs returned from CloudMap. For DNS service discovery, it will be similar to CloudMap service discovery in terms of only using one IP version or fall back behavior. However, this will come in the form of changing the Envoy's DNS resolver to exhibit this behavior when performing DNS resolution. This is a summarized version of the feature. For more details, a more thorough write up can be found here: https://github.com/aws/aws-app-mesh-examples/tree/main/walkthroughs/howto-ipv6#ip-preferences-in-meshes-and-virtual-nodes Closes aws#20737 ### All Submissions: * [Y] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [N] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [Y] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [Y] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
App Mesh has released IPv6 support. This has been exposed in the form of IP preferences which have been added to the Mesh and Virtual Node resources. IP preferences are optional for both resources and there is no default IP preference that is applied by App Mesh.
The following are samples of App Mesh resources with IP preferences configured.
IP preferences on a Mesh apply the preference to all Virtual Nodes contained within that Mesh. IP preferences set on a Virtual Node will only apply to that particular Virtual Node. Additionally, Virtual Node IP preferences will override the Mesh IP preference if there is one present.
There are three areas in which the IP preference impacts how Envoy configuration generation. Firstly, setting any IP preference will change the Envoy's listeners (ingress and egress) to bind to IPv4 and IPv6 allowing the Envoy to serve all traffic from both IP versions. Secondly, the IP version specified in the name of the preference will be the IP version used for sending traffic to the local application for Envoys running as a sidecar to an application. (IPv4_ONLY/PREFERRED - IPv4, IPv6_ONLY/PREFERRED - IPv6) Lastly, it will impact how each service discovery option will be treated. For CloudMap service discovery, ONLY options will only return IPs from CloudMap for the matching version type and PREFERRED options will first used the primary IP version first and fall back to the other IP version for the IPs returned from CloudMap. For DNS service discovery, it will be similar to CloudMap service discovery in terms of only using one IP version or fall back behavior. However, this will come in the form of changing the Envoy's DNS resolver to exhibit this behavior when performing DNS resolution.
This is a summarized version of the feature. For more details, a more thorough write up can be found here: https://github.com/aws/aws-app-mesh-examples/tree/main/walkthroughs/howto-ipv6#ip-preferences-in-meshes-and-virtual-nodes
Closes #20737
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license