feat(prometheus): Enable ScrapeConfig (#10440)
**Description** Enable support for ScrapeConfig matching on all namespaces, similar to how ServiceMonitor, PodMonitor, etc are allowed on all namespaces. ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [x] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
fa8a2b3305
commit
223b74ef03
|
@ -29,7 +29,7 @@ sources:
|
|||
- https://github.com/prometheus-community/helm-charts
|
||||
- https://github.com/prometheus-operator/kube-prometheus
|
||||
type: application
|
||||
version: 9.0.31
|
||||
version: 9.1.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- metrics
|
||||
|
|
|
@ -25,6 +25,11 @@ spec:
|
|||
{{- else }}
|
||||
probeSelector: {}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.scrapeConfigSelector }}
|
||||
scrapeConfigSelector: {{- include "tc.v1.common.tplvalues.render" (dict "value" .Values.prometheus.scrapeConfigSelector "context" $) | nindent 4 }}
|
||||
{{- else }}
|
||||
scrapeConfigSelector: {}
|
||||
{{- end }}
|
||||
alerting:
|
||||
alertmanagers:
|
||||
{{- if .Values.prometheus.alertingEndpoints }}
|
||||
|
@ -113,6 +118,11 @@ spec:
|
|||
{{- else }}
|
||||
probeNamespaceSelector: {}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.scrapeConfigNamespaceSelector }}
|
||||
scrapeConfigNamespaceSelector: {{- include "tc.v1.common.tplvalues.render" (dict "value" .Values.prometheus.scrapeConfigNamespaceSelector "context" $) | nindent 4 }}
|
||||
{{- else }}
|
||||
scrapeConfigNamespaceSelector: {}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.remoteRead }}
|
||||
remoteRead: {{- include "tc.v1.common.tplvalues.render" (dict "value" .Values.prometheus.remoteRead "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -515,6 +515,14 @@ prometheus:
|
|||
## See https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage
|
||||
##
|
||||
probeNamespaceSelector: {}
|
||||
## @param prometheus.scrapeConfigSelector The scrapeConfigs to be selected for target discovery.
|
||||
## If {}, select all scrapeConfigs
|
||||
##
|
||||
scrapeConfigSelector: {}
|
||||
## @param prometheus.scrapeConfigNamespaceSelector Namespaces to be selected for scrapeConfig discovery.
|
||||
## If {}, select all namespaces.
|
||||
## If nil, select own namespace.
|
||||
scrapeConfigNamespaceSelector: {}
|
||||
## @param prometheus.retention Metrics retention days
|
||||
##
|
||||
retention: 31d
|
||||
|
|
Loading…
Reference in New Issue