-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(ingress): resource backend support added #2109
Conversation
/triage accepted |
@@ -169,7 +169,7 @@ func TestIngressStore(t *testing.T) { | |||
kube_ingress_created{namespace="ns4",ingress="ingress4"} 1.501569018e+09 | |||
kube_ingress_labels{namespace="ns4",ingress="ingress4"} 1 | |||
kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath",service_name="someservice",service_port="1234"} 1 | |||
kube_ingress_path{namespace="ns4",ingress="ingress4",host="somehost",path="/somepath2",service_name="",service_port=""} 1 |
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.
QQ: why service_name and service_port are deleted?
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.
@CatherineF-dev If the Ingress backend is of resource type, it will not have service_name, service_port. Resource & Service for a backend are mutually exclusive.
Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#resource-backend
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.
@rohitphatak could you please update the documentation from https://github.com/kubernetes/kube-state-metrics/blob/main/docs/ingress-metrics.md accordingly?
There is also a test failure if you can have a look at https://github.com/kubernetes/kube-state-metrics/actions/runs/5713294513/job/15479589011?pr=2109. /remove-approve |
d6d281e
to
ff3e995
Compare
/assign @dgrisonnet |
/label tide/merge-method-squash |
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CatherineF-dev, dgrisonnet, rohitphatak 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 |
fyi: there is a linter error https://github.com/kubernetes/kube-state-metrics/actions/runs/6483927231/job/17606588685 |
I tried to reproduce the linter error, but got
|
* feat(ingress): resource backend support added * feat(ingress): updated test case * Update internal/store/ingress.go Co-authored-by: Damien Grisonnet <[email protected]> * feat(ingress): updated doc & test cases --------- Co-authored-by: Damien Grisonnet <[email protected]>
What this PR does / why we need it: Added Resource Backend info into Kubernetes Ingress Path.
How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality) No Change
Which issue(s) this PR fixes : Ingress having Resource Backend was not showing Resource related information. This PR adds the related information on the resource backend type ingress.