-
Notifications
You must be signed in to change notification settings - Fork 8
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
CP-22444: CloudZero KSM (Feature Branch) #102
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,10 @@ data: | |
scrape_interval: {{ .Values.prometheusConfig.globalScrapeInterval }} | ||
scrape_configs: | ||
{{- if .Values.prometheusConfig.scrapeJobs.kubeStateMetrics.enabled }} | ||
- job_name: cloudzero-service-endpoints # kube_*, node_* metrics | ||
honor_labels: true | ||
- job_name: static-kube-state-metrics | ||
honor_timestamps: true | ||
track_timestamps_staleness: false | ||
scrape_interval: {{ .Values.prometheusConfig.scrapeJobs.kubeStateMetrics.scrapeInterval }} | ||
scrape_interval: 1m | ||
scrape_timeout: 10s | ||
scrape_protocols: | ||
- OpenMetricsText1.0.0 | ||
|
@@ -34,38 +33,6 @@ data: | |
follow_redirects: true | ||
enable_http2: true | ||
relabel_configs: | ||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] | ||
separator: ; | ||
regex: "true" | ||
replacement: $1 | ||
action: keep | ||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow] | ||
separator: ; | ||
regex: "true" | ||
replacement: $1 | ||
action: drop | ||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] | ||
separator: ; | ||
regex: (https?) | ||
target_label: __scheme__ | ||
replacement: $1 | ||
action: replace | ||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] | ||
separator: ; | ||
regex: (.+) | ||
target_label: __metrics_path__ | ||
replacement: $1 | ||
action: replace | ||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] | ||
separator: ; | ||
regex: (.+?)(?::\d+)?;(\d+) | ||
target_label: __address__ | ||
replacement: $1:$2 | ||
action: replace | ||
- separator: ; | ||
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+) | ||
replacement: __param_$1 | ||
action: labelmap | ||
- separator: ; | ||
regex: __meta_kubernetes_service_label_(.+) | ||
replacement: $1 | ||
|
@@ -92,13 +59,13 @@ data: | |
- source_labels: [__name__] | ||
regex: "^({{ join "|" .Values.kubeMetrics }})$" | ||
action: keep | ||
- action: labelkeep | ||
regex: "^({{ include "cloudzero-agent.requiredMetricLabels" . }})$" | ||
kubernetes_sd_configs: | ||
- role: endpoints | ||
kubeconfig_file: "" | ||
follow_redirects: true | ||
enable_http2: true | ||
- separator: ; | ||
regex: ^(board_asset_tag|container|created_by_kind|created_by_name|image|instance|name|namespace|node|node_kubernetes_io_instance_type|pod|product_name|provider_id|resource|unit|uid|_.*|label_.*|app.kubernetes.io/*|k8s.*)$ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might be a good idea to remove the named template that this is replacing if we're not going to use it. I do like this change though, it's more readable for sure |
||
replacement: $1 | ||
action: labelkeep | ||
static_configs: | ||
- targets: | ||
- {{ printf "%s-kube-state-metrics.%s.svc.cluster.local:%d" .Release.Name .Release.Namespace (int .Values.kubeStateMetrics.service.port) }} | ||
{{- end }} | ||
{{- if .Values.prometheusConfig.scrapeJobs.cadvisor.enabled }} | ||
- job_name: cloudzero-nodes-cadvisor # container_* metrics | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,10 +47,18 @@ prometheusConfig: | |
# -- Any items added to this list will be added to the Prometheus scrape configuration. | ||
additionalScrapeJobs: [] | ||
|
||
kube-state-metrics: | ||
enabled: false | ||
kubeStateMetrics: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this work if |
||
enabled: true | ||
fullnameOverride: "cloudzero-state-metrics" | ||
extraArgs: | ||
- --metric-labels-allowlist=pods=[app.kubernetes.io/component] | ||
# Disable CloudZero KSM as a Scrape Target since the service endpoint is explicity defined | ||
# by the Validators config file. | ||
prometheusScrape: false | ||
# Set a default port other than 8080 to avoid collisions with any existing KSM services. | ||
service: | ||
port: 8080 | ||
|
||
prometheus-node-exporter: | ||
enabled: false | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## [0.0.30-beta](https://github.com/cloudzero/cloudzero-charts/compare/v0.0.28...v0.0.30-beta) (2024-11-12) | ||
|
||
Improve Kube State Metrics Install | ||
|
||
### Upgrade Steps | ||
To install, specify the version of the beta chart: | ||
|
||
``` bash | ||
helm upgrade --install -n cz-prom-agent cz-prom-agent charts/cloudzero-agent \ | ||
--set apiKey=$api_key \ | ||
--set clusterName='cluster' \ | ||
--set-string cloudAccountId="account_id" \ | ||
--set region='region' \ | ||
--version 0.0.30-beta | ||
|
||
``` | ||
|
||
### Improvements | ||
* **CloudZero Metrics:** CloudZero State Metrics is enabled/installed by default. | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to remove this? I would think that we wouldn't want to show this option now?