-
Notifications
You must be signed in to change notification settings - Fork 226
Generate Region() method for resourceIdentifiers
#309
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
Conversation
Region() to ResourceMetadata struct and AWSResourceIdentifiers interfaceRegion() method for resourceIdentifiers
RedbackThomson
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.
Just one nit to bring it in-line with the latest runtime updates
42bed9f to
537a378
Compare
jaypipes
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.
👍
|
/retest |
interface Currently when a resource is created without setting a region in the annotations, the controller uses either the namespace annotation or the controller region flag. This causes the controller to miss manage the resource if they are restart with a different region, or if run a second controller using a different region flag. This patch modifies the code-generator to generate a `Region` function so that a resource can also satisfy the `Identifiers` interface. This patch also extends the `setStatusDefaults` so that it correctly populates the status.ResourceMetadata.Region with the aws region in which it is created/managed This patch will also require some changes to the runtime repository. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
537a378 to
9a53ab2
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, jaypipes, RedbackThomson, vijtrip2 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 |
|
@a-hilaly: 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. |
Follow up to aws-controllers-k8s/runtime#79
This patch modifies the code-generator to generate a
Regionfunctionso that a resource can also satisfy the
Identifiersinterface. Thisthe patch also extends the
setStatusDefaultsso that it correctlypopulates the
status.ResourceMetadata.Regionwith the aws region inwhich it is created/managed
Description of changes:
Region()method to resourceIdentifiers template.setStatusDefaultsto be able to set the a default region.runtime_test.goBy submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.