Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Expose Cluster Control Plane ref through cluster scope #4822

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

vincepri
Copy link
Member

@vincepri vincepri commented Feb 26, 2024

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:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Feb 26, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 26, 2024
pkg/cloud/scope/cluster.go Outdated Show resolved Hide resolved
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
Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Contributor

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.

pkg/cloud/scope/cluster.go Show resolved Hide resolved
@vincepri vincepri force-pushed the fixup-cluster-cp branch 2 times, most recently from a820c7e to 118ec8a Compare February 27, 2024 13:28
Signed-off-by: Vince Prignano <vincepri@redhat.com>
@nrb
Copy link
Contributor

nrb commented Feb 27, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2024
@damdo
Copy link
Member

damdo commented Feb 27, 2024

/assign @richardcase
For approval

@patrickdillon
Copy link

Fixes #4818

Copy link
Contributor

@AndiDog AndiDog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@Ankitasw
Copy link
Member

/test pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Member

damdo commented Feb 28, 2024

Timed out
/test pull-cluster-api-provider-aws-e2e

@vincepri
Copy link
Member Author

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 28, 2024
@k8s-ci-robot k8s-ci-robot merged commit 2d8b068 into kubernetes-sigs:main Feb 28, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants