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

Adopt k8s standardized conditions in apis/meta #44

Merged
merged 3 commits into from
Nov 4, 2020

Conversation

relu
Copy link
Member

@relu relu commented Nov 1, 2020

Use the newly introduced standardized Condition type kubernetes/enhancements#1624

Relates to fluxcd/flux2#225


// GetCondition returns the Condition from the given slice that matches the
// given type.
func GetCondition(conditions []Condition, conditionType string) *Condition {
Copy link
Member Author

Choose a reason for hiding this comment

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

Uncertain if to keep this and refactor so it's just a wrapper for FindStatusCondition or just ditch it (as is done now) and switch to that one directly where applicable.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine, we should be using FindStatusCondition.

apis/meta/conditions.go Outdated Show resolved Hide resolved
Use the newly introduced standardized Condition type
kubernetes/enhancements#1624

Signed-off-by: Aurel Canciu <[email protected]>
@relu
Copy link
Member Author

relu commented Nov 3, 2020

Question: once this is out, will consumer API packages need a version bump (e.g. from v1alpha1 to v1alpha2)? My hunch is that it's not the case considering the interface is preserved (aside from the addition of the ObservedGeneration and that should ensure backward compatibility I assume.

Example: fluxcd/image-reflector-controller#41

@stefanprodan
Copy link
Member

@relu this is not a break change so I would keep all the APIs versions as they are.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @relu 🏅

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Next package release should be a MINOR update given the breaking changes to the API.

@stefanprodan stefanprodan merged commit 07e2712 into fluxcd:main Nov 4, 2020
@relu relu deleted the adopt-k8s-conditions branch November 17, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants