-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Resource owner now shown in every pane #6237
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marcosdiez The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
<div key | ||
i18n>Owner</div> | ||
<div value | ||
*ngFor="let ownerReference of objectMeta?.ownerReferences"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handling for multiple owner refs is implemented here but I wonder how the view will look like if there will be more than one owner. Can you paste some screenshot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd maybe rely on the controlled by
card component that we use i.e. on pod details and try to reuse it for other resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @maciaszczykm,
From my understanding, one can't automatically get two owners, but one can manually set them. This is how you get two of them.
I did it out of curiosity and I got this:
But I think @floreks is right. It's better to ditch this and just put the controlled by
card everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking again. Do we really need the controller card ? Currently it's just used on the pods page, which has already too much content. Maybe removing it would be better. Just thinking outloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still keep it but focus on reorganizing information on the detail pages overall. Use tabs, maybe use some smaller cards that we could put in a single row instead of always using 1 card per row.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@floreks ^^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this kind of generic resource owner information and creating internal links based on name/kind is not a good idea since we do not support every potential resource that might be created this way and it will result in dead/not working links inside the Dashboard.
We should support this explicitly on a per resource basis, similar to what we do for pods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@floreks you are right. I just added the code. I took the liberty of copying what you did in the "events" pane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Event list has it's own logic to avoid this kind of situations.
dashboard/src/app/frontend/common/components/resourcelist/event/component.ts
Lines 82 to 88 in 37f5f5d
getObjectHref(kind: string, name: string, namespace: string): string { | |
if (!Object.values(Resource).includes(kind.toLowerCase() as Resource)) { | |
return ''; | |
} | |
return this.kdState_.href(kind.toLowerCase(), name, namespace); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@floreks added that code as well. thank you
Codecov Report
@@ Coverage Diff @@
## master #6237 +/- ##
==========================================
- Coverage 44.22% 42.53% -1.70%
==========================================
Files 46 217 +171
Lines 1282 10627 +9345
Branches 179 160 -19
==========================================
+ Hits 567 4520 +3953
- Misses 677 5841 +5164
- Partials 38 266 +228 |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
c8e9f89
to
5f58dc1
Compare
5f58dc1
to
04e1b46
Compare
04e1b46
to
c7addeb
Compare
c7addeb
to
f404d37
Compare
@floreks Hi! What's needed for this PR to be merged now? |
@floreks @maciaszczykm Is there anything I can do for this code to be merged ? |
My original concerns still exist. I'd prefer to have a separate Also, we should not display multiple levels of ownership, i.e. pod is controlled by the replica set and replica set is controlled by the deployment. I wouldn't want to see both replica set and deployment (owner of an owner) on the pod details. We also should not display raw owner information |
@floreks I am not sure I understand your concerns:
Think about it. Even though this is not your dream, the code works, it's helpful, does not consume many resources nor UI space. The kubernetes dashboard is better with it. |
9d83575
to
75d8629
Compare
75d8629
to
bb33cba
Compare
Hello @floreks ! I am hoping you changed your mind and now thinks this PR is good to be merged. Please consider merging this PR as is! Marcos |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
we only create owner links if we support the object getObjectHref now verifies if a resource really exists
bb33cba
to
a8225d6
Compare
/remove-lifecycle stale |
|
@marcosdiez: PR needs rebase. 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. |
Since #7047 has been merged and it introduces major architecture changes we should close this PR. If you are willing to work on it, you can open a new PR against the current master. /close |
@floreks: Closed this PR. 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. |
I am not sure if this is useful anywhere but in a
ReplicaSet
and in aJob
started by aCronJob
Also, we have the "problem" of having the info shown twice in Pods.