-
Notifications
You must be signed in to change notification settings - Fork 142
add controller to sync aws resource tags #196
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 controller to sync aws resource tags #196
Conversation
Bump to the latest github.com/openshift/api to pull in the resourceTags fields added to infrastructure.config.openshift.io.
Add aws_resource_tags controller. The controller will sync AWS resource tags from the spec of the infrastructure resource to the status of the resource.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: staebler The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold This is using a fork of openshift/api until openshift/api#905 merges. |
|
@staebler: This pull request references Bugzilla bug 1950113, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla ([email protected]), skipping review request. DetailsIn response to this:
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. |
|
@staebler: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
| currentResourceTags = currentInfra.Status.PlatformStatus.AWS.ResourceTags | ||
| } | ||
|
|
||
| if len(desiredResourceTags) == 0 && len(currentResourceTags) == 0 { |
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.
seems like this case is handled by the deepequal on the next line. is it not?
| } | ||
| currentInfra.Status.PlatformStatus.AWS.ResourceTags = desiredResourceTags | ||
|
|
||
| _, err = c.infraClient.UpdateStatus(ctx, currentInfra, metav1.UpdateOptions{}) |
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 an event on successful update is also warranted.
| if currentInfra.Status.PlatformStatus.AWS == nil { | ||
| currentInfra.Status.PlatformStatus.AWS = &configv1.AWSPlatformStatus{} | ||
| } | ||
| currentInfra.Status.PlatformStatus.AWS.ResourceTags = desiredResourceTags |
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.
Unless order matters, please sort the status resourcetags.
|
minor comments, but I think the API and additional validation make sense and provide clear indications of what can and cannot be done. |
|
@staebler: No Bugzilla bug is referenced in the title of this pull request. DetailsIn response to this:
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. |
|
@staebler: PR needs rebase. DetailsInstructions 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. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn response to this:
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. |
Add aws_resource_tags controller. The controller will sync AWS resource tags from the spec of the infrastructure resource to the status of the resource.
/cc @deads2k