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

"kubectl tree" not working for Kubeflow profiles (not namespaced) #43

Closed
iptizer opened this issue Mar 8, 2021 · 3 comments
Closed

Comments

@iptizer
Copy link

iptizer commented Mar 8, 2021

Maybe I am doing something horrrably wrong here (please correct me if so), or there seems to be a problem for getting the graph from a Kubeflow profiles CRD.

❯ kubectl tree profiles my-kubeflow-user
No resources are owned by this object through ownerReferences.

This resoruce look slike as follows (removed not necessary parts):

❯ kubectl get profiles my-kubeflow-user -o yaml
apiVersion: kubeflow.org/v1
kind: Profile
metadata:
  name: my-kubeflow-user
spec:
  owner:
    kind: User
    name: [email protected]

This resource then creates e.g. a namespace:

❯ kubectl get ns my-kubeflow-user -o yaml
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    owner: [email protected]
  labels:
    app.kubernetes.io/part-of: kubeflow-profile
    istio-injection: enabled
  name: my-kubeflow-user
  ownerReferences:
  - apiVersion: kubeflow.org/v1
    blockOwnerDeletion: true
    controller: true
    kind: Profile
    name: my-kubeflow-user
    uid: c39a1fbe-7805-4696-85a6-1234f902cc2b
status:
  phase: Active

Maybe it is because it is a CRD, or because it is not namespaced?

@ahmetb
Copy link
Owner

ahmetb commented Mar 8, 2021

Yes non-namespaced nature of it impacts the result. I think we have a flag for that.

@iptizer
Copy link
Author

iptizer commented Mar 9, 2021

I see. Was not obvious that the -A is required. But it makes sense in a kubectl-way thinking.

❯ kubectl tree profiles my-kubeflow-user -A
NAMESPACE                  NAME                                                          READY  REASON  AGE
                           Profile/my-kubeflow-user                             -              20d
                           ├─Namespace/my-kubeflow-user                         -              20d
ns-datalake-user-uib53682  │ ├─ConfigMap/metadata-grpc-configmap                         -              20d
ns-datalake-user-uib53682  │ ├─Deployment/ml-pipeline-ui-artifact                        -              20d
ns-datalake-user-uib53682  │ │ └─ReplicaSet/ml-pipeline-ui-artifact-84f654dd94           -              20d
ns-datalake-user-uib53682  │ │   └─Pod/ml-pipeline-ui-artifact-84f654dd94-dxw4w          True           3h6m
ns-datalake-user-uib53682  │ ├─Deployment/ml-pipeline-visualizationserver                -              20d
ns-datalake-user-uib53682  │ │ └─ReplicaSet/ml-pipeline-visualizationserver-5ff65bf999   -              20d
ns-datalake-user-uib53682  │ │   └─Pod/ml-pipeline-visualizationserver-5ff65bf999-4d4kk  True           20d
ns-datalake-user-uib53682  │ ├─DestinationRule/ml-pipeline-visualizationserver           -              20d
ns-datalake-user-uib53682  │ ├─Secret/mlpipeline-minio-artifact                          -              20d
ns-datalake-user-uib53682  │ ├─Service/ml-pipeline-ui-artifact                           -              20d
ns-datalake-user-uib53682  │ ├─Service/ml-pipeline-visualizationserver                   -              20d
ns-datalake-user-uib53682  │ ├─ServiceRole/ml-pipeline-visualizationserver               -              20d
ns-datalake-user-uib53682  │ └─ServiceRoleBinding/ml-pipeline-visualizationserver        -              20d
ns-datalake-user-uib53682  ├─RoleBinding/default-editor                                  -              20d
ns-datalake-user-uib53682  ├─RoleBinding/default-viewer                                  -              20d
ns-datalake-user-uib53682  ├─RoleBinding/namespaceAdmin                                  -              20d
ns-datalake-user-uib53682  ├─ServiceAccount/default-editor                               -              20d
ns-datalake-user-uib53682  ├─ServiceAccount/default-viewer                               -              20d
ns-datalake-user-uib53682  ├─ServiceRole/ns-access-istio                                 -              20d
ns-datalake-user-uib53682  └─ServiceRoleBinding/owner-binding-istio                      -              20d

Maybe think about -A as default (if feasable)?

@ahmetb
Copy link
Owner

ahmetb commented Mar 9, 2021

#18 has some discussion on this. It caused a lot of slowness, so we turned it off.

@ahmetb ahmetb closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants