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

Migrate from kube.py to kubernetes.core.k8s* modules #10696

Closed
VannTen opened this issue Dec 7, 2023 · 9 comments
Closed

Migrate from kube.py to kubernetes.core.k8s* modules #10696

VannTen opened this issue Dec 7, 2023 · 9 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@VannTen
Copy link
Contributor

VannTen commented Dec 7, 2023

What would you like to be added:
Replace all usages of the custom kube module in kubespray with kubernetes.core.k8s / info / etc, then remove kube.py

Why is this needed:

  • Less code to maintain.
  • kubernetes.core.k8s* modules are more featureful (things like server-side apply for instances)
  • In particular, kubernetes.core.k8s allow to supply a list of templates (rather than looping at the task-level), which would allow us to consolidate some of the manifests tasks and remove some Ansible overhead.

wdyt @yankay @MrFreezeex ?

Related: #10694

@VannTen VannTen added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 7, 2023
@MrFreezeex
Copy link
Member

MrFreezeex commented Dec 7, 2023

I don't think we had to do too much changes over time on kube.py, so I don't think that would be a huge priority but still a good thing nonetheless 👍

@mirwan
Copy link
Contributor

mirwan commented Jan 28, 2024

Hi,
I once walked the same path with #3534 when I was (more) active on the project.
It brought 2 main drawbacks:

  • System packages for k8s client are (at least they exist now for most of the distributions supported by Kubespray) way behind the latest k8s python client's version. Some of the distributions versions supported by Kubespray would require backports to handle latest k8s versions integrated in Kubespray or risking to face incompatibility between installed client and k8s version.
  • Having Python clients deployed with pip on remote servers is seen as a security issue by secteams (...).

Another minor drawback is that kubernetes/preinstall role ensures every host in inventory is installed the same, adding k8s python client pkg would end up with a useless package on worker nodes

I think that, until deb/rpm packages catch up and remain up-to-date with k8S lifecycle, I agree with @MrFreezeex

My two cents

@VannTen
Copy link
Contributor Author

VannTen commented Jan 29, 2024

In fact, I'll probably pursue the the "conversion to Helm charts" direction rather than using the k8s module this year. That was one of the potential points in #6400 (and other) and I think that's an easier path forward. But first I need to re-work that helm-apps role into a less awkward form ^.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 28, 2024
@VannTen
Copy link
Contributor Author

VannTen commented Apr 28, 2024 via email

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 28, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. labels Jul 27, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 26, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants