-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: allow updating profile owners #7547
base: master
Are you sure you want to change the base?
Conversation
…owner When the user name in the profile is changed, the controller fails to apply the changes, as cannot verify the namespace owner. Instead of using the owner annotation of the namespace, check the if the profile owns the namespace using the ownerReferences section. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
When applying profile changes, update the owner in the namespace annotations, if the profile user name was changed. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Move the code for Namespace update into a separate function, to make the Reconcile() implementation more straightforward. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
If there is a change in the name of the profile user, update the user in the ns-owner-access-istio AuthorizationPolicy. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
If there is a change in the name of the profile user, update the user in the namespaceAdmin RoleBinding. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
When a new profile is created, usually it creates a new namespace for that user. There are cases where an existing namespace should be used, instead of creating new one. Added new logic for that: - If a new profile is created and the namespace with that name already exist, check if it has a transferToKubeflow:true annotation. - If there is such annotation, take the ownership of that namespace and use it for the profile. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
The latest versions of used components requires recent golang version. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@thesuperzapper can we merge this now for the next release cycle? |
@juliusvonkohout I'm pretty sure this is not very close to being ready to merge. There's a lot of complexity that needs to be considered, and I'm not even sure this approach is the right one. |
Fixes issue kubeflow/dashboard#33
Fixes issue kubeflow/dashboard#45
This PR fixes the problem, described in issue kubeflow/dashboard#33. Currently, the profile-controller fails to update the owner as it cannot verify the namespace owner. The PR implements solutions, suggested in the issue.
Additional logic is added, to address issue kubeflow/dashboard#45. If the namespace already exist, and it is not owned by any other profile - check if the namespace has annotation transferToKubeflow: true. If there is such annotation, take the ownership of that namespace and use it for the profile.