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

One owner multiple namespaces #2641

Open
gfarcas opened this issue Mar 4, 2024 · 4 comments
Open

One owner multiple namespaces #2641

gfarcas opened this issue Mar 4, 2024 · 4 comments

Comments

@gfarcas
Copy link

gfarcas commented Mar 4, 2024

I have tried creating two profiles with the same user as owner
The drop down shows me as owner on both
image
But when I go to contributing it is different
image
These are the profile controller logs:

1.7095676167748752e+09	INFO	controllers.Profile	Start to Reconcile.	{"profile": "/upgrade", "namespace": "", "name": "upgrade"}
1.7095676167749074e+09	INFO	controllers.Profile	List of labels to be added to namespace	{"profile": "/upgrade", "labels": {"app.kubernetes.io/part-of":"kubeflow-profile","istio-injection":"enabled","katib.kubeflow.org/metrics-collector-injection":"enabled","pipelines.kubeflow.org/enabled":"true","serving.kubeflow.org/inferenceservice":"enabled"}}
1.709567616774934e+09	INFO	controllers.Profile	List of labels to be added to found namespace	{"profile": "/upgrade", "labels": {"app.kubernetes.io/part-of":"kubeflow-profile","istio-injection":"enabled","katib.kubeflow.org/metrics-collector-injection":"enabled","pipelines.kubeflow.org/enabled":"true","serving.kubeflow.org/inferenceservice":"enabled"}}
1.7095676167751784e+09	INFO	controllers.Profile	Updating RoleBinding	{"profile": "upgrade", "namespace": "upgrade", "name": "namespaceAdmin"}
1.7095676168882513e+09	INFO	controllers.Profile	Start to Reconcile.	{"profile": "/bi-ds", "namespace": "", "name": "bi-ds"}
1.709567616888275e+09	INFO	controllers.Profile	List of labels to be added to namespace	{"profile": "/bi-ds", "labels": {"app.kubernetes.io/part-of":"kubeflow-profile","istio-injection":"enabled","katib.kubeflow.org/metrics-collector-injection":"enabled","pipelines.kubeflow.org/enabled":"true","serving.kubeflow.org/inferenceservice":"enabled"}}
1.7095676168882942e+09	INFO	controllers.Profile	List of labels to be added to found namespace	{"profile": "/bi-ds", "labels": {"app.kubernetes.io/part-of":"kubeflow-profile","istio-injection":"enabled","katib.kubeflow.org/metrics-collector-injection":"enabled","pipelines.kubeflow.org/enabled":"true","serving.kubeflow.org/inferenceservice":"enabled"}}
1.7095676168884087e+09	INFO	controllers.Profile	Updating RoleBinding	{"profile": "bi-ds", "namespace": "bi-ds", "name": "namespaceAdmin"}

Version: 1.8.0

@kubeflow-bot kubeflow-bot added this to To Do in Needs Triage Mar 4, 2024
@thesuperzapper
Copy link
Member

Can you share the Profile CRD YAML for each profile?

@gfarcas
Copy link
Author

gfarcas commented Mar 6, 2024

Sure!
Here they are:

#first profile
apiVersion: kubeflow.org/v1
kind: Profile
metadata:
  name: bi-ds
spec:
  owner:
    kind: User
    name: gfarcas@company.com
  resourceQuotaSpec:
    hard:
      cpu: '32'
      memory: 256Gi

#second profile
apiVersion: kubeflow.org/v1
kind: Profile
metadata:
  name: upgrade
spec:
  owner:
    kind: User
    name: gfarcas@company.com
  resourceQuotaSpec:
    hard:
      cpu: '32'
      memory: 256Gi

They are basicaly the same, only the name in metadata differs.

@infa-ddeore
Copy link

i also have same issue, so added contributors manually via rolebinding
UI shows single namespace with owner

@gfarcas
Copy link
Author

gfarcas commented Mar 8, 2024

The issue seems to be in the central dashboard, not in the profile:
https://github.com/kubeflow/kubeflow/blob/167e162ef7dffc033ddc82e55b0a108db27fc340/components/centraldashboard/public/components/manage-users-view.js#L56-L72

    nsBreakdown(ns) {
        const {ownedNamespace, namespaces} = this;
        if (!ownedNamespace || !namespaces) return;
        const arr = [
            [ownedNamespace.namespace, 'Owner'],
        ];
        if (ns.length <= 1) return arr;
        const otherNamespaces = namespaces
            .filter((n) => n != ownedNamespace
                        && n.namespace !== ALL_NAMESPACES)
            .map((i) => i.namespace).join(', ');
        if (!otherNamespaces.length) return arr;
        arr.push(
            [otherNamespaces, 'Contributor'],
        );
        return arr;
    }

I checked the /api/workgroup/get-all-namespaces api endpoint and I am returned as owner on both (first json object)

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

No branches or pull requests

3 participants