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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPAddressClaim object should implement conditions.Getter interface #8373

Closed
srm09 opened this issue Mar 24, 2023 · 3 comments · Fixed by #8374
Closed

IPAddressClaim object should implement conditions.Getter interface #8373

srm09 opened this issue Mar 24, 2023 · 3 comments · Fixed by #8374
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@srm09
Copy link
Contributor

srm09 commented Mar 24, 2023

What would you like to be added?

As a provider developer, I would love to setup an aggregate condition for all the IPAddressClaim objects created by the Infra Machine object. As a part of the SetAggregate() function call, the set of objects need to implement the Getter interface.

Detailed Description

For CAPV,
VSphereVM object creates a bunch of IPAddressClaim objects for the IP addresses required to be used by the network devices. During the reconciliation, we'd like to setup an IPAddressClaimed condition which summarizes the Ready condition of all the IPAddressClaim objects.
Something like the following:

var getters []clusterv1.Getter
for _, claim := range claims {
    getters = append(getters, claim.GetConditions())
}
conditions.SetAggregate(vsphereVM, infrav1. IPAddressClaimedCondition, getters,
    conditions.AddSourceRef(), conditions.WithStepCounterIf(false))

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 24, 2023
@ykakarap
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 24, 2023
@srm09
Copy link
Contributor Author

srm09 commented Mar 24, 2023

@fabriziopandini Can we backport this change to the 1.4 release branch as well? This is not a breaking API change, so should not be contentious. Plus the change is simple enough and part of the exp set of APIs.

@fabriziopandini
Copy link
Member

this is more a bug than a feature, let's get it into 1.4.0, and possibly backport as well
/remove-kind feature
/kind bug
/assign

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
4 participants