-
Notifications
You must be signed in to change notification settings - Fork 181
Add additional keys to adopted resource spec #13
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 additional keys to adopted resource spec #13
Conversation
@RedbackThomson is gonna rework this PR, sometime next week /hold |
9bee77c
to
eeb621f
Compare
apis/core/v1alpha1/identifiers.go
Outdated
NameOrID *string `json:"nameOrID,omitempty"` | ||
// AdditionalKeys represents any additional arbitrary identifiers used when | ||
// describing the target resource. | ||
AdditionalKeys map[string]*string `json:"additionalKeys,omitempty"` |
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.
Any reason this is map[string]*string
instead of map[string]string
?
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 was using the other *string
fields as reference. Is there a hard and fast rule to when we should use *string
over string
?
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.
The use of map[string]*string
is really an aws-sdk-go thing. Since this isn't an aws-sdk-go shape field, I just thought it would make more sense to use a standard map[string]string
. Pointer types generally signal optional fields (except for aws-sdk-go, which makes everything a pointer type, unfortunately).
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.
Fair enough. I've updated all unnecessary *string
to string
types for the adopted resource APIs.
/unhold |
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, jaypipes, RedbackThomson 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 |
…de (#115) Related to #105 and aws-controllers-k8s/runtime#13 Description of changes: - replace nil pointer checks with string zero value checks - replace `string` value assignment with `string` ptr assignments By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…de (aws-controllers-k8s#115) Related to aws-controllers-k8s#105 and aws-controllers-k8s/runtime#13 Description of changes: - replace nil pointer checks with string zero value checks - replace `string` value assignment with `string` ptr assignments By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…de (aws-controllers-k8s#115) Related to aws-controllers-k8s#105 and aws-controllers-k8s/runtime#13 Description of changes: - replace nil pointer checks with string zero value checks - replace `string` value assignment with `string` ptr assignments By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: aws-controllers-k8s/community#766
Some resources require more than an ARN/Name/ID to describe a single resource. This PR adds an
additionalKeys
field to theAWSIdentifiers
to allow for arbitrary identifiers as needed by any resources.Generator code to support this change: aws-controllers-k8s/code-generator#62