-
Notifications
You must be signed in to change notification settings - Fork 226
Generate FilterSystemTags and mirrorAWSTags in controllers #568
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
Generate FilterSystemTags and mirrorAWSTags in controllers #568
Conversation
6b76870 to
61bf41d
Compare
We are adding a new generated code that handles the filtering of tags. These tags may be injected AWS resources during creation, or are added to resources managed by cloudformation for example, and the controller would see them in the diff and attempt to remove them. With these changes we ensure that any tag that has `aws:` prefix will be filtered out after the Find operation. Doing so will ensure that we don't attempt to remove these tags.
7582c00 to
7015914
Compare
7015914 to
5a0736d
Compare
|
/retest |
|
/retest |
1 similar comment
|
/retest |
|
@michaelhtm: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
a-hilaly
left a comment
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c2d3b95
into
aws-controllers-k8s:main
Issue #2248
Description of changes:
By generating these two functions, we ensure that AWS tags will not
be present in resource Spec during adoption/regular reconciliations.
FilterSystemTags will be called right after the ReadOne operation during
adoption, and it will ensure we don't patch AWS (aws:cloudformation..)
or Controller tags (services.aws.k8s/...) into the resource.
MirrowAWSTags instead, is called during the regular reconciliation loop,
after each ReadOne operation. It ensures that if the resource in AWS has
AWS tags, they need to be reflected in the desired Spec. This will ensure
that those tags will not be detected in the Delta and trigger an update.
Since the controller only patches the difference between the latest and
desired resource, mirroring the AWS tags ensures we don't include them
in our Spec.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.