Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Update the discovery cache to apiextensions v1 #3439

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Mar 2, 2021

This PR changes the client version used to query the Kubernetes discovery API, instead of apiextensions.k8s.io/v1beta1 Flux will be using the apiextensions.k8s.io/v1 client, making it compatible with future versions of Kubernetes.

Changes:

  • Update Kubernetes packages to v0.17.17
  • Update the CRD API version from v1beta1 to v1 (v1beta1 will be removed in Kubernetes v1.22)

Warning: After this change, Flux will no longer work on Kubernetes <1.16.0

@stefanprodan stefanprodan requested a review from squaremo March 2, 2021 15:55
@kingdonb
Copy link
Member

kingdonb commented Mar 2, 2021

Thank you! Since we had planned to upgrade client-go in Flux v1.22.0 in facilitation of this requirement for K8s v1.22.0, should I plan on including this change in the upcoming release? (Judging from the warning you included, I think that maybe we should wait, since it will break some clusters if they are on very old Kubernetes versions.)

@kingdonb kingdonb added this to the 1.22.0 milestone Mar 2, 2021
@stefanprodan
Copy link
Member Author

stefanprodan commented Mar 2, 2021

client-go can't be upgraded as will conflict with this: https://github.com/fluxcd/flux/blob/master/go.mod#L40 You can update kubectl only.

Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Changes look nice and straight-forward, and it doesn't even need to change the minor version of client-go. Well pin-pointed Stefan 🥭
If this passes e2e testing I think it's good to go. I'll leave it to @kingdonb to decide where to plug it into the release schedule.

@stefanprodan
Copy link
Member Author

@kingdonb I don't know if it's acceptable to break compatibility with Kubernetes 1.15, maybe not... let's merge this after Flux v1.22.0

@kingdonb kingdonb modified the milestones: 1.22.0, 1.23.0 Mar 2, 2021
scottrigby added a commit to scottrigby/flux2 that referenced this pull request Mar 8, 2021
@kingdonb kingdonb self-assigned this Mar 9, 2021
@kingdonb
Copy link
Member

kingdonb commented Mar 9, 2021

Because this represents a breaking change for old Kubernetes versions (in the name of keeping forwards compatibility, which cannot be achieved any other way), we will keep this PR open and block merging it until Kubernetes 1.22-beta.1 is released.

@kingdonb kingdonb modified the milestones: 1.23.0, 1.24.0 Apr 15, 2021
@kingdonb
Copy link
Member

Kubernetes 1.22-beta.1 is expected to be released on Thu July 8 according to https://www.kubernetes.dev/resources/release/

@hiddeco
Copy link
Member

hiddeco commented Jun 9, 2021

The release of the changes in this PR should be coordinated with the changes in fluxcd/helm-operator#599.

@kingdonb
Copy link
Member

I've tested fluxcd/helm-operator#599 and added to it with fluxcd/helm-operator#618. Helm Operator with K8s v1.22.x looks good. I'd like to cut a pre-release very soon, and we can proceed rapidly to final release if everything is in order.

I am testing this together with the modernized Helm Operator the rest of today. It should be ready to cut at least pre-release of both projects on Wednesday, (maybe even sooner if there are no additional blockers that are discovered.)

- Update Kubernetes packages to v0.17.17
- Update the CRD API version from v1beta1 to v1 (v1beta1 will be removed in Kubernetes v1.22)

Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Kingdon Barrett <[email protected]>
@kingdonb kingdonb removed the blocked label Jun 24, 2021
@kingdonb
Copy link
Member

Flux v1.23.0-rc1 is building/publishing now that includes these changes. I will rebase so this PR merges out when the release is finalized. 👍

@kingdonb kingdonb merged commit ba29806 into master Jun 25, 2021
@kingdonb kingdonb deleted the apiextensions-v1 branch June 26, 2021 16:38
@kingdonb
Copy link
Member

Helm operator next release (1.3.0 and 1.4.0) are ready in fluxcd/helm-operator#622 and fluxcd/helm-operator#623

I expect they will probably both drop on Monday, unless we find some issue. Flux v1.23.0 is out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants