-
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
The Ingress Detail pane now has an extra table which shows all the rules #5734
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5734 +/- ##
=======================================
Coverage 44.46% 44.46%
=======================================
Files 214 214
Lines 9120 9120
Branches 110 110
=======================================
Hits 4055 4055
Misses 4791 4791
Partials 274 274 |
0b8863e
to
6445044
Compare
f83fb9d
to
cdf4ef2
Compare
Thanks for the contribution. I'll take a look on it later. |
As for the last point. This is a nice work already, but I'd actually extend the API to offer an endpoint that would return ingress rules only and allow reusing our generic list. We do that for most of the resources on the detail views. We are also using the old |
Hey, @floreks , thanks for the comments. So, about moving this to According to the specs, rules can't have empty services, they can have a About the last point, combined with the fact that you plan to change the API, I am not sure what I should do. Since the end result is the same, maybe we want to do a) now (nothing) and c) in a separate PR, for it's a bigger change and under the hood only what do you think? |
Changing The API v2 is a completely different issue not related to the current API. We'll successively migrate functionality "in the background" to match the current one. No worries there. |
bdcd0d0
to
6574f65
Compare
8a21d14
to
42110a6
Compare
Hi @floreks As agreed, I
It all works well, except that not things only work on k8s >= 1.19 Maybe this change was done too early ? |
42110a6
to
6574f65
Compare
7ea3b1a
to
ce6c2ff
Compare
Hi again, @floreks ! |
@marcosdiez one CI check fails and you also need to rebase to the latest master as angular version has been bumped and it doesn't compile anymore. |
ce6c2ff
to
cbebefb
Compare
cbebefb
to
913eb55
Compare
Hi @floreks ! I did the merge and the rebase. Somehow, though,
Is that expected? as a workaround I can merge my code from something older than |
I'll try to check later and regenerate them. |
src/app/frontend/common/components/ingressrulelist/component.ts
Outdated
Show resolved
Hide resolved
src/app/frontend/common/components/ingressrulelist/component.ts
Outdated
Show resolved
Hide resolved
return item.host ? index : index; | ||
} | ||
|
||
ingressSpecRuleToIngressRuleFlat(ingressSpecRules: IngressSpecRule[]): IngressRuleFlat[] { |
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.
This can be simplified.
return [].concat(
...ingressSpecRules.map(rule =>
rule.http.paths.map(
specPath =>
({
host: rule.host || '',
path: specPath,
} as IngressRuleFlat)
)
)
);
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.
That's fancy! When I grow up I want to code typescript like that.
src/app/frontend/common/components/ingressrulelist/component.ts
Outdated
Show resolved
Hide resolved
src/app/frontend/common/components/ingressrulelist/component.ts
Outdated
Show resolved
Hide resolved
src/app/frontend/common/components/ingressrulelist/template.html
Outdated
Show resolved
Hide resolved
@floreks all requested changes were made. Thanks for the code review. I learned a lot with it! |
Hey, @floreks I was thinking over the weekend. Since in a few of the ingress entries we have both a My biggest problem, though, is that there is no way I can obtain the protocol (HTTP or HTTPS). In my setup for example, I have an AWS ALB doing the HTTPS part and forwarding everything to k8s. Hence, with the exception of a special custom flag in my ingress controller saying How to we solve that in the UI level ? Shall I always put HTTPS in the links in every column of the ingress controller ? Although I don't like neither option, the 3rd seems to be less worse, but your input is appreciated ! One way or another, whatever we decide here is trivial to implement and can easily come in a different PR. Thanks ! |
I'd leave it for now and create an issue to improve. We could also improve the list view and try to offer working links instead of IP endpoints. If I'd have to pick, we could probably add |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floreks, marcosdiez The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floreks, marcosdiez The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I've always felt the ingress panel has less information than necessary. So I added an extra table for rules.
It can be tested using the following container:
marcosdiez/dashboard:v2.1.0h
Although the PR is not ready yet to be merged, I do accept comments on my implementation.
Things I am not really sure:
should the new
template.html
andcomponents.ts
be located insidesrc/app/frontend/resource/discovery/ingress/rulelist/
orsrc/app/frontend/common/components/resourcelist
? Since rules are not a resource,, but a part ofingress
, I am not surewhat exactly should I do with
ingresses
that don't point toservices
? For starters, I've never seen it in real life, but the specs do say it's possible.please notice that I "flatten" the original structure so that every row has a hostname (hence my
IngressRuleFlat
interface)This is how it looks like: