Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

[stable/kiam] Adding Prometheus metrics service endpoints - #7762

Merged
k8s-ci-robot merged 4 commits into
helm:masterfrom
sc250024:feature/kiam-prometheus-metrics-service
Jan 25, 2019
Merged

k8s-ci-robot merged 4 commits into
helm:masterfrom
sc250024:feature/kiam-prometheus-metrics-service

Conversation

@sc250024

@sc250024 sc250024 commented Sep 17, 2018 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it: Adds metrics endpoints for the Kiam agent and server headless services. This is done to enable Prometheus operator to scrape Kiam via a ServiceMonitor resource.

Which issue this PR fixes: This fixes prometheus-operator/prometheus-operator#1899, which I initially raised because this Kiam chart doesn't provide the metrics endpoints out of the box to work wtih Prometheus operator setups.

Special notes for your reviewer: If you have a working Prometheus operator setup, the following ServiceMonitor definitions are useful for verifying that the changes in this PR work. The values in the ServiceMonitor resources below will work with a default setup of kube-prometheus.

---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: kiam-server
  namespace: monitoring
  labels:
    prometheus: kube-prometheus
spec:
  jobLabel: kiam-server
  selector:
    matchLabels:
      app: kiam
      component: server
      release: kiam
  namespaceSelector:
    matchNames:
    - monitoring
  endpoints:
  - interval: 15s
    path: /metrics
    port: metrics
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: kiam-agent
  namespace: monitoring
  labels:
    prometheus: kube-prometheus
spec:
  jobLabel: kiam-agent
  selector:
    matchLabels:
      app: kiam
      component: agent
      release: kiam
  namespaceSelector:
    matchNames:
    - monitoring
  endpoints:
  - interval: 15s
    path: /metrics
    port: metrics

Verification that it works when installed via the Helm chart changes in this PR:

kiam-prometheus

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 17, 2018
@sc250024

Copy link
Copy Markdown
Contributor Author

/assign @scottrigby

@ey-bot ey-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Sep 17, 2018
@sc250024

sc250024 commented Sep 18, 2018 •

Copy link
Copy Markdown
Contributor Author

@mgoodness @prydonius @sameersbn @scottrigby possible to get this merged before #7235 ?

@sc250024

Copy link
Copy Markdown
Contributor Author

/ok-to-test

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@sc250024: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

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.

@goruha

goruha commented Oct 8, 2018

Copy link
Copy Markdown
Contributor

@sc250024 resolve conflicts please

@sc250024

sc250024 commented Oct 8, 2018 •

Copy link
Copy Markdown
Contributor Author

@goruha No problem. Done.

@sc250024

sc250024 commented Oct 9, 2018 •

Copy link
Copy Markdown
Contributor Author

@goruha Re-merged changes again since I saw that #7235 was merged.

@cpanato

cpanato commented Oct 9, 2018

Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 9, 2018
@goruha

goruha commented Oct 25, 2018

Copy link
Copy Markdown
Contributor

@sc250024 new conflicts (

@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 25, 2018
@sc250024

Copy link
Copy Markdown
Contributor Author

@goruha @cpanato Fixed conflicts, thanks for the notification. Is there any indication when this can get tested and merged? This is now the second time I've resolved merge conflicts, and this PR is pretty straightforward. I'm not sure what else is needed; am I missing something?

@cpanato

cpanato commented Oct 29, 2018

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2018
@sc250024

Copy link
Copy Markdown
Contributor Author

/assign @scottrigby

@stale

stale Bot commented Nov 28, 2018

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 28, 2018
@ewbankkit

Copy link
Copy Markdown
Contributor

@sc250024 This looks like it has been duplicated by #8942. COuld you please double-check my assessment? Thanks

@stale stale Bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 6, 2018
@cpanato

cpanato commented Dec 13, 2018

Copy link
Copy Markdown
Member

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2018
@cpanato

cpanato commented Dec 13, 2018

Copy link
Copy Markdown
Member

/test pull-charts-e2e

@cpanato

cpanato commented Dec 13, 2018

Copy link
Copy Markdown
Member

/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 13, 2018
@cpanato

cpanato commented Dec 13, 2018

Copy link
Copy Markdown
Member

@sc250024 can we remove the bump of the image and stick only with the service changes? looks like the rc4 the liveness probe is not working.
If you want to keep the image, need to take a look why it is failing

@stale

stale Bot commented Jan 12, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 12, 2019
@chickenriggies

Copy link
Copy Markdown

/retest

@stale stale Bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2019
@chickenriggies

Copy link
Copy Markdown

@sc250024 Do you mind wrapping this up when you get a chance?

@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2019
@cpanato

cpanato commented Jan 25, 2019

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, sc250024

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 25, 2019
@k8s-ci-robot
k8s-ci-robot merged commit ab0ed34 into helm:master Jan 25, 2019
syedimam0012 pushed a commit to syedimam0012/charts that referenced this pull request Feb 1, 2019
* Prometheus endpoints in agent/server services

Signed-off-by: Scott Crooks <[email protected]>

* Dots and 'and' condition for agent service

Signed-off-by: Scott Crooks <[email protected]>

* Bumping version to 1.3.0

Signed-off-by: Scott Crooks <[email protected]>

* Changing agent service template to match other templates

Signed-off-by: Scott Crooks <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServiceMonitor on headless service

9 participants