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)

@bradmccoydev bradmccoydev requested review from a team as code owners May 2, 2023 00:04
@AlexsJones AlexsJones enabled auto-merge (squash) May 2, 2023 07:58
@AlexsJones AlexsJones merged commit a89a5cf into k8sgpt-ai:main May 2, 2023
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 <[email protected]>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <[email protected]>

---------

Signed-off-by: Brad McCoy <[email protected]>
AlexsJones added a commit that referenced this pull request May 2, 2023
* feat: add azure openai provider

Signed-off-by: Aris Boutselis <[email protected]>

* feat: validate backend name

Signed-off-by: Aris Boutselis <[email protected]>

* fix: remove BaseURL from the mandatory env variables

Signed-off-by: Aris Boutselis <[email protected]>

* fix: conflicts

Signed-off-by: Aris Boutselis <[email protected]>

* chore: updated logo (#365)

Signed-off-by: Alex Jones <[email protected]>

* chore: added changing banners (#367)

Signed-off-by: Alex Jones <[email protected]>

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

* feat: add additionalLabels to Service Monitor

Signed-off-by: Brad McCoy <[email protected]>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <[email protected]>

---------

Signed-off-by: Brad McCoy <[email protected]>

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

Signed-off-by: Aris Boutselis <[email protected]>

---------

Signed-off-by: Aris Boutselis <[email protected]>
Signed-off-by: Aris Boutselis <[email protected]>
Signed-off-by: Alex Jones <[email protected]>
Signed-off-by: Brad McCoy <[email protected]>
Co-authored-by: Aris Boutselis <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Brad McCoy <[email protected]>
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.

2 participants