Skip to content
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: add additionalLabels to Service Monitor #366

Conversation

bradmccoydev
Copy link
Member

Closes #364

📑 Description

This PR is to add the ability to add your own labels to the service monitor. In my case I use the Prometheus operator therefore I need to add an additional label so it references my prometheus release which is:

labels:
  release: kube-prometheus-stack

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

For the reviewer testing this, you can run these tests.

Scenario 1: Run helm chart without the additional labels

in the values.yaml, only use the serviceMonitor enable is true as follows:

serviceMonitor:
  enabled: true

Scenario 2: Run helm chart with the additional labels

in the values.yaml, only use the serviceMonitor enable is true and add labels as follows:

serviceMonitor:
  enabled: true
  additionalLabels:
    release: kube-prometheus-stack

To test the values run this command in the root directory:

helm install ./charts/k8sgpt --dry-run --devel --generate-name > manifests.yaml

Then look in the manifests.yaml file and search throught it (remember to delete it)

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
@bradmccoydev bradmccoydev requested review from a team as code owners May 2, 2023 00:04
Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
@AlexsJones AlexsJones enabled auto-merge (squash) May 2, 2023 07:58
@AlexsJones AlexsJones merged commit a89a5cf into k8sgpt-ai:main May 2, 2023
1 check passed
arbreezy pushed a commit to arbreezy/k8sgpt that referenced this pull request May 2, 2023
* feat: add additionalLabels to Service Monitor

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

---------

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
AlexsJones added a commit that referenced this pull request May 2, 2023
* feat: add azure openai provider

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* feat: validate backend name

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* fix: remove BaseURL from the mandatory env variables

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* fix: conflicts

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* chore: updated logo (#365)

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>

* chore: added changing banners (#367)

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>

* feat: add additionalLabels to Service Monitor (#366)

* feat: add additionalLabels to Service Monitor

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

---------

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* fix: update README file's ai provider section.

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

---------

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Brad McCoy <bradmccoydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants