You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if a Profile resource has its spec.owner.name updated, the profile-controller will lose control of the associated Namespace, and fail to update the owner.
SOLUTION: rather than checking for the presence of metadata.annotations.owner on the Namespace, we should check the "owner reference", by checking if the metadata.ownerReferences[] array contains the Profile resource
NOTE: after this change will need to provide a way to "import" existing namespaces, as it will be nearly impossible to set the correct "owner reference" manually (also requested in Way to "import" existing namespaces #45).
The profile-controller does not update the metadata.annotations.owner of existing resources because it ignores metadata.* in its diff calculation:
NOTE: because kfam uses the metadata.annotations.user annotation of the RoleBinding/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
SOLUTION: we can check the full AuthorizationPolicy definition for difference, rather than only the Spec
/kind bug
Related to: kubeflow/kubeflow#6054
Problem:
Currently, if a
Profileresource has itsspec.owner.nameupdated, the profile-controller will lose control of the associated Namespace, and fail to update the owner.Solution:
metadata.annotations.owneras thespec.owner.nameof the Profile:metadata.annotations.owneron the Namespace, we should check the "owner reference", by checking if themetadata.ownerReferences[]array contains the Profile resourcemetadata.annotations.ownerof existing resources because it ignoresmetadata.*in its diff calculation:RoleBinding/namespaceAdminRoleRefandSubjectsmetadata.annotations.userannotation of theRoleBinding/namespaceAdminresource 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-istioSpecResourceQuota/kf-resource-quotaSpecCurrent Workaround:
The following steps are required to work around these issues and change the owner of an existing Profile:
spec.owner.nameto your new ownermetadata.annotations.ownerannotation to your new owner.RoleBinding/namespaceAdminAuthorizationPolicy/ns-owner-access-istioResourceQuota/kf-resource-quota