-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Image swap registry when using ECR cross region? #660
Comments
@jetersen Just to summarise for my understanding. You would like to change the source address based on certain criteria? Example:
In case the image is missing in US East ( |
Yes that is exactly what I want to achieve in addition to delayed copying open source images in the hope that eu to us replication already has copied image The image is not missing as it would be replicated by AWS cross region replication. So eu-west-1 registry is the source of truth and us-east-1 is our replica registry. Potentially if image swapper could check for us-east-1 availability if not simply do not mutate and once next pod rolls around it would then start mutating because the image got replicated |
Got it. I think this would partially work as follows: Cluster US:
What is missing is some way to alter the source address, e.g. source:
filters:
- jmespath: "contains(container.image, '.dkr.ecr.') && contains(container.image, '.amazonaws.com')"
preprocessor:
- replace:
from: dkr.ecr.eu-west-1.amazonaws.com
to: dkr.ecr.us-east-1.amazonaws.com Do you think that would work for your use-case? |
Oh ya a preprocessor step you could as long as it follows the normal path to check if the modified source image exists and if it does do nothing. I think that should work for my use case 👏 |
@jetersen I think this: https://github.com/jainishshah17/tugger?tab=readme-ov-file#configure |
But image swapper is an admission webhook already 😅 Why do I need another? |
We currently rely on GitOps for our deployments so changing the image registry for our US located deployment in Git is less interesting for checking for updates.
However running image swapper for our US Cluster we would like to swap our EU registry out with our registry in the US region that uses cross region replica. How can I achieve this in the configuration options?
The docs are not very clear on cross region and does not currently seem to support multiple filters and targets per filter.
I would potentially also like to have multiple sources based on different filters and targets with different lifecycle policy.
Instead of running two image swappers.
Cause I would like to copy all non ECR images to ECR and only keep a few images around.
While for images using our ECR registry we want different rules.
This is our current config:
The text was updated successfully, but these errors were encountered: