-
Notifications
You must be signed in to change notification settings - Fork 2
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
profile controller fails to update profile owner #33
Comments
/priority p1 |
/cc @apo-ger @kimwnasptd |
+1 we've run into this issue at Statistics Canada's Kubeflow hosting. We've had instances where profile ownership changes were needed and the associated rolebinding must be manually updated. Looking forward to seeing this bug fixed :) |
@kimwnasptd we really should fix this one, lol |
@tzstoyanov, you expressed an interest in finding a good first PR, and I think this issue is aligned with your experience with Go controllers. |
This sound like an important improvement. The controllers are also usually written in a very ugly ways. @tzstoyanov can refactor it at the same time and add the functionality to read further annotations or labels from environment variables and add them to the new profile namespace for PSS. Maybe Tara from capital one @tarat44 can help as well. Related to kubeflow/manifests#2455 |
I would be happy to help out |
@tarat44 just connect with @tzsoyanov on Slack. But since he might be on vacation, you can just start. I have created https://github.com/juliusvonkohout/kubeflow/tree/fix-profile-controller-security as work environment. Just push and rebase (not merge from master) as needed. I have added both of you as collaborators, as i did last time with kubeflow/manifests#2455 (comment). You should have access in both forks now. Just push to the fix-profile-controller security branch. i will review and also push changes to that branch as we did for the istio-cni branch. @tarat44 you might need to sign the google CLA as a private individual. See https://cla.developers.google.com/ for more info about Google's Contributor License Agreement (CLA). |
Yep, we should try and fix this one |
@thesuperzapper what do you think of kubeflow/kubeflow#7276 ? |
@juliusvonkohout I responded in kubeflow/kubeflow#7276 (comment), but unless others want it, because it's a big change, we might need to wait until Kubeflow 1.8.1/1.9.0 to ship it. |
I am on vacation, but we can push it in the next kubeflow notebooks meeting |
TODO: we should also think about deboarding a namespace i.e. deleting the kubeflow profile without deleting the namespace. I will create an issue for that. |
/transfer dashboard |
@thesuperzapper: The label(s) In response to this:
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/test-infra repository. |
/kind bug
Related to: kubeflow/kubeflow#6054
Problem:
Currently, if a
Profile
resource has itsspec.owner.name
updated, the profile-controller will lose control of the associated Namespace, and fail to update the owner.Solution:
metadata.annotations.owner
as thespec.owner.name
of the Profile:metadata.annotations.owner
on the Namespace, we should check the "owner reference", by checking if themetadata.ownerReferences[]
array contains the Profile resourcemetadata.annotations.owner
of existing resources because it ignoresmetadata.*
in its diff calculation:RoleBinding/namespaceAdmin
RoleRef
andSubjects
metadata.annotations.user
annotation of theRoleBinding/namespaceAdmin
resource to determine the Namespace owner, without this solution, the wrong user will have "admin" access in the central-dashboard UI after a profile owner changes.AuthorizationPolicy/ns-owner-access-istio
Spec
ResourceQuota/kf-resource-quota
Spec
Current Workaround:
The following steps are required to work around these issues and change the owner of an existing Profile:
spec.owner.name
to your new ownermetadata.annotations.owner
annotation to your new owner.RoleBinding/namespaceAdmin
AuthorizationPolicy/ns-owner-access-istio
ResourceQuota/kf-resource-quota
The text was updated successfully, but these errors were encountered: