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

change V1Subject to RbacV1Subject in k8s.py #1384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

merqri
Copy link

@merqri merqri commented Jun 3, 2024

This change fix - Error: module 'kubernetes.client' has no attribute 'V1Subject'

This error occurs when an attempt is made to create a role binding.
The full error looks as follows:

[E 2024-06-03 08:58:36.252 EnterpriseGatewayApp] Error occurred creating role binding for namespace 'jovyan-153ca7c1-c68f-440d-b678-f8926b48afbc': module 'kubernetes.client' has no attribute 'V1Subject'

This change fix: Error: module 'kubernetes.client' has no attribute 'V1Subject'
Copy link

welcome bot commented Jun 3, 2024

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@kevin-bates
Copy link
Member

Hi @merqri and @fm2022aa. I'm curious why this hasn't always been an issue. Was there a version update that triggered this? Does this only occur under certain custom role configurations? (Sorry, been out of the loop for a while and would like to better understand what prompts this change.)

@kevin-bates
Copy link
Member

Sorry, just caught up on #1379.

Since this appears to be due to version changes, do we need to concern ourselves with breaking older installations?

@lresende - looks like you had some thoughts on this (capping client?). Does that prevent use on newer versions of k8s like 1.30 (or even 1.29)?

@lresende
Copy link
Member

lresende commented Jun 3, 2024

Capping the client to 1.28 would make it work for current users, but would make it fail for users that have upgraded to >= 1.29 then... Another approach would be to try to check in the code for the current version and use one or the other.

Choose a reason for hiding this comment

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

Delete it from a hacker

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

Successfully merging this pull request may close these issues.

5 participants