-
Notifications
You must be signed in to change notification settings - Fork 598
🌱 Expose Cluster Control Plane ref through cluster scope #4822
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
3336011
to
41797cb
Compare
if cluster.Spec.ControlPlaneRef == nil { | ||
// If the control plane ref is not set, return an empty object. | ||
// Not having a control plane ref is valid given API contracts. | ||
return &unstructured.Unstructured{}, nil |
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.
If we never use nil
, do we need to return a pointer?
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 only downside about not having a pointer is the implicit when passing it around?
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 guess you meant implicit copy. Fair point.
a820c7e
to
118ec8a
Compare
Signed-off-by: Vince Prignano <[email protected]>
118ec8a
to
591e196
Compare
/lgtm |
/assign @richardcase |
Fixes #4818 |
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
/test pull-cluster-api-provider-aws-e2e |
Timed out |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
What type of PR is this?
What this PR does / why we need it:
/kind cleanup
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Checklist:
Release note: