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

Bump Kubernetes to 1.22.X impossible with current python-kubernetes version #3487

Closed
TeddyAndrieux opened this issue Aug 9, 2021 · 1 comment · Fixed by #3510
Closed
Labels
complexity:medium Something that requires one or few days to fix kind:bug Something isn't working priority:urgent Any issue we should jump in as soon as possible release:blocker An issue that blocks a release until resolved state:question Further information is requested

Comments

@TeddyAndrieux
Copy link
Collaborator

TeddyAndrieux commented Aug 9, 2021

Component:

'build'

What happened:

Currently, our salt module to interact with APIServer use python-kubernetes but python-kubernetes is a bit late on nowadays Kubernetes version (still at Kubernetes 1.18 (in beta) when creating this ticket, Kubernetes 1.22.0 just came out).

https://github.com/kubernetes-client/python#compatibility

Due to this old python-kubernetes version some APIs/Models are not available, like Ingress as part of networking.k8s.io/v1 API and since Kubernetes 1.22.0 Ingress Beta APIs get removed so with the current Python-kubernetes version we cannot manage Ingress objects when calling APIServer 1.22.0+.

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22

What was expected:

Our salt module interacting with APIServer should be compatible with the Kubernetes version embedded as part of MetalK8s.

Resolution proposal (optional):

TBD
Several solutions possible (non ordered and maybe not exhaustive):

  1. Wait for a new python-kubernetes version compatible with 1.22.0 (and likely contribute to python-kubernetes upstream to help catch up on upstream Kubernetes versions)
  2. Use "pure HTTP query" in our salt module (basically get rid of python-kubernetes and do the call directly to APIServer with the right header, body, ...) that will potentially need to be maintained for future Kubernetes versions
  3. Use kubectl in our salt module so that we do not have anything to maintain except if kubectl interface changes (that should NOT happen a lot)
@TeddyAndrieux TeddyAndrieux added kind:bug Something isn't working state:question Further information is requested complexity:medium Something that requires one or few days to fix release:blocker An issue that blocks a release until resolved priority:urgent Any issue we should jump in as soon as possible labels Aug 9, 2021
@TeddyAndrieux TeddyAndrieux added this to the MetalK8s 2.11.0 milestone Aug 9, 2021
@TeddyAndrieux
Copy link
Collaborator Author

Solution 3. seems like the best choice IMHO

TeddyAndrieux added a commit that referenced this issue Aug 26, 2021
In order to be more flexible and not be tied to a `python-kubernetes`
version compatible with the Kubernetes version embedded in MetalK8s we
rely on `DynamicClient` in our salt Kubernetes execution module

Fixes: #3487
TeddyAndrieux added a commit that referenced this issue Aug 26, 2021
In order to be more flexible and not be tied to a `python-kubernetes`
version compatible with the Kubernetes version embedded in MetalK8s we
rely on `DynamicClient` in our salt Kubernetes execution module

Fixes: #3487
@bert-e bert-e closed this as completed in 884b6fc Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:medium Something that requires one or few days to fix kind:bug Something isn't working priority:urgent Any issue we should jump in as soon as possible release:blocker An issue that blocks a release until resolved state:question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant