-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add DomainMapping labels to Ingress #10370
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
Conversation
When DomainMapping controller creates Ingress, Ingress does not have the label who created it. It is not consistent with Ingress created by Route and so it is difficult to list Ingresses resources created by DomainMapping. BEFORE: ``` $ kubectl get king --show-labels NAME READY REASON LABELS hello-example True serving.knative.dev/route=hello-example,serving.knative.dev/routeNamespace=default,serving.knative.dev/service=hello-example mydomain.com True <none> ``` AFTER: ``` $ kubectl get king --show-labels NAME READY REASON LABELS hello-example True serving.knative.dev/route=hello-example,serving.knative.dev/routeNamespace=default,serving.knative.dev/service=hello-example mydomain.com True serving.knative.dev/domainmapping=mydomain.com,serving.knative.dev/domainmappingNamespace=default ```
Codecov Report
@@ Coverage Diff @@
## master #10370 +/- ##
==========================================
- Coverage 88.12% 87.99% -0.14%
==========================================
Files 186 186
Lines 8710 8720 +10
==========================================
- Hits 7676 7673 -3
- Misses 801 809 +8
- Partials 233 238 +5
Continue to review full report at Codecov.
|
For the use case & background of this request.
But it does not work on Ingress created from DomainMapping's Ingress. |
pkg/apis/serving/register.go
Outdated
|
||
// DomainMappingNamespaceLabelKey is the label key attached to a Ingress | ||
// by a DomainMapping to indicate which namespace the DomainMapping was created in. | ||
DomainMappingNamespaceLabelKey = GroupName + "/domainmappingNamespace" |
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.
Is this necessary, given the Ingress is always in the same namespace (per the comment on MakeIngress
)
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.
Yes, you are correct. It is not necessary. Updated.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nak3, tcnghia 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 |
When DomainMapping controller creates Ingress, Ingress does not have
the label who created it.
It is not consistent with Ingress created by Route and so it is
difficult to list Ingresses resources created by DomainMapping.
To fix it, this patch adds the DomainMapping labels to Ingress.
BEFORE:
AFTER:
Release Note
/cc @julz @markusthoemmes