kubeflow / manifests

A repository for Kustomize manifests
Apache License 2.0
807 stars 869 forks source link

One owner multiple namespaces #2641

Closed gfarcas closed 3 months ago

gfarcas commented 7 months ago

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

thesuperzapper commented 7 months ago

Can you share the Profile CRD YAML for each profile?

gfarcas commented 6 months ago

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 commented 6 months ago

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

gfarcas commented 6 months ago

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)

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

thesuperzapper commented 3 months ago

This was resolved in https://github.com/kubeflow/kubeflow/pull/7582

/close

google-oss-prow[bot] commented 3 months ago

@thesuperzapper: Closing this issue.

In response to [this](https://github.com/kubeflow/manifests/issues/2641#issuecomment-2189818361): >This was resolved in https://github.com/kubeflow/kubeflow/pull/7582 > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
deepakdeore2004 commented 3 months ago

which kubeflow version has this fix?

thesuperzapper commented 3 months ago

@deepakdeore2004 the currently unreleased 1.9.0.