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

feature(helm) Add ability to define my own labels for the service monitor #364

Closed
2 tasks done
bradmccoydev opened this issue May 1, 2023 · 2 comments
Closed
2 tasks done

Comments

@bradmccoydev
Copy link
Member

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the K8sGPT Slack and got positive feedback

Is this feature request related to a problem?

Yes

Problem Description

I use kube-prometheus-stack for my Prometheus which is the operator so therefore i need the following label in my service monitor as follows:

labels:
    release: kube-prometheus-stack

Now the labels are in the helpers.tpl which cant be overridden so I would like them to be available in the values.yaml also so we can use both.

I could just patch it after but it would make it easier for others to have the option so they dont have to worry about patching it.

Solution Description

Keep labels coming from helpers.tpl but pass in from values.yaml also if they exist. add another block to https://github.com/k8sgpt-ai/k8sgpt/blob/main/charts/k8sgpt/templates/serviceMonitor.yaml

Benefits

Gives users the ability to be more flexible with the labels and then they can use the Prometheus operator instead of 'hardcoded labels' in helpers

Potential Drawbacks

No response

Additional Information

I can do PR if this issue is accepted

@AlexsJones
Copy link
Member

This is great, thanks @bradmccoydev would you mind adding this to the Operator also, please?
https://github.com/k8sgpt-ai/k8sgpt-operator

@bradmccoydev
Copy link
Member Author

@AlexsJones Done. Once this is merged, this issue can be closed. k8sgpt-ai/k8sgpt-operator#51

@arbreezy arbreezy closed this as completed May 2, 2023
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

No branches or pull requests

3 participants