Pass ignored IPs to proxy init container #803
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
We are in the process of migrating off the AWS AppMesh to AWS VPC Lattice. We have our workloads in both EKS and ECS. Some services in EKS have connections to services in ECS. In order to migrate a service in AWS ECS to VPC Lattice we need to adjust AppMesh service deployment in EKS to ignore the IP ranges of the VPC Lattice.
To deploy AppMesh resources in EKS we use CRDs defined in
appmesh-controller. We deploy ourappmesh-controllerusing Helm chart.In order to override the default
APPMESH_EGRESS_IGNORED_IPof theproxyinitinit container we tried to use appmesh.k8s.aws/egressIgnoredIPs annotation. But it turned out it is not respected as the value explicitly refers to the controller's configuration and there is no way to specify--ignored-ipsargument for the controller in the Helm Chart.In this PR, I patched the
proxyMutatorso it respects the annotation to override egress ignored IPs.Testing
I created the custom controller image, pushed it in our ECR repository and tested the changes. With this patch, the
proxyinitinit container is properly get theAPPMESH_EGRESS_IGNORED_IPenvironment variable provided by controller.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.