-
Notifications
You must be signed in to change notification settings - Fork 558
Conversation
Signed-off-by: Sylvain Rabot <[email protected]>
@lachie83 Can you kindly take a look at this and weigh in? |
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 pending E2E
@@ -47,6 +47,8 @@ spec: | |||
metadata: | |||
annotations: | |||
scheduler.alpha.kubernetes.io/critical-pod: "" | |||
prometheus.io/scrape: "true" |
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.
Should these annotations be on the service rather than the deployment?
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.
Each pods has its own set of stats so Prometheus should scrape each pods, not the service.
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 believe the recommended approach is to annotate the service (though I cannot find a black and white statement from the team about it now). The pods of the service will still get scraped if using a role
of endpoints
in the kubernetes_sd_configs
.
The exposed metrics will be the same either way, but there are a bunch of extra labels available this way.
Also, do note that this annotation is not really standardized, even if it is common in examples. We do not use it at all, and rather use ServiceMonitor
s from the prometheus-operator. But perhaps it is a reasonable default to ship anyway? Is it set on other kube* things with metrics in acs-engine?
@@ -78,6 +80,9 @@ spec: | |||
- "--dns-port=10053" | |||
- "--v=2" | |||
- "--config-dir=/kube-dns-config" | |||
env: | |||
- name: PROMETHEUS_PORT | |||
value: "10055" |
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 port fixed? Can you please point me at the docs for this?
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.
It's not fixed, we could define any port not already used but that's what they use in kubernetes example:
@lachie83 can we move this PR further? I'm also interested in getting metrics from kube-dns |
@jackfrancis can we merge this please ? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis, sylr 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 |
No description provided.