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

[stable/kong] Kong prometheus servicemonitor label #17497

Merged

Conversation

sekka1
Copy link
Collaborator

@sekka1 sekka1 commented Sep 27, 2019

Prometheus operator uses a label selector on the ServiceMonitor to determine which ServiceMonitor to pick up (prometheus-operator/kube-prometheus#16 (comment)). The label can be custom to each prometheus-operators usage. This PR adds the ability to add in a custom label on the ServiceMonitor.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/chart])

@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 27, 2019
@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 27, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @sekka1. Thanks for your PR.

I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@zanhsieh
Copy link
Collaborator

@sekka1
Please resolve README.md conflict. Thank you.

Signed-off-by: garland <[email protected]>
@sekka1
Copy link
Collaborator Author

sekka1 commented Oct 1, 2019

@zanhsieh fixed the conflict.

@zanhsieh
Copy link
Collaborator

zanhsieh commented Oct 3, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 3, 2019
prometheusOperatorServiceMonitorSelector:
enabled: false
matchLabels:
prometheus: somelabel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very weird.
Why is this additional level of prometheusOperatorServiceMonitorSelector required?

I'd propose that we do something simpler like:

serviceMonitor:
  enabled: false
  labels:
    foo: bar

Also, enabled for the labels should not be necessary for labels.
You can simply check if any labels are set and inject them:
https://github.com/helm/charts/blob/master/stable/kong/templates/deployment.yaml#L31

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point =)....updating...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hbagdi updated. This looks way better than my long variable name =)

@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 5, 2019
Copy link
Collaborator

@hbagdi hbagdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hbagdi, sekka1

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit 6a67f5e into helm:master Oct 5, 2019
@sekka1 sekka1 deleted the kong-prometheus-servicemonitor-label branch October 6, 2019 16:31
ali-sattari pushed a commit to ali-sattari/charts that referenced this pull request Oct 7, 2019
* Kong - prometheus-operator service monitor selector addition

Signed-off-by: garland <[email protected]>

* Kong - bumping chart version for the prometheus-operator selector update

Signed-off-by: garland <[email protected]>

* bumping chart version number

Signed-off-by: garland <[email protected]>

* Kong - simplifying variable name

Signed-off-by: garland <[email protected]>
Signed-off-by: Ali Sattari <[email protected]>
pennycoders pushed a commit to pennycoders/charts that referenced this pull request Oct 11, 2019
* Kong - prometheus-operator service monitor selector addition

Signed-off-by: garland <[email protected]>

* Kong - bumping chart version for the prometheus-operator selector update

Signed-off-by: garland <[email protected]>

* bumping chart version number

Signed-off-by: garland <[email protected]>

* Kong - simplifying variable name

Signed-off-by: garland <[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. ok-to-test size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants