Skip to content

Commit a1a1b04

Browse files
Apply suggestions from code review
1. kubeStateMetric to kubeStateMetrics 2. Added a few explanatory comments Co-authored-by: Bhavin Gandhi <[email protected]>
1 parent c9a54da commit a1a1b04

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

stable/yugaware/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Make list of allowed CORS origins
116116
{{/*
117117
kube-state-metrics
118118
*/}}
119-
{{- define "kubeStateMetric.endpoint" -}}
119+
{{- define "yugaware.kubeStateMetrics.endpoint" -}}
120120
{{- if .Values.kubeStateMetric.customEndpoint -}}
121121
{{- .Values.kubeStateMetric.customEndpoint -}}
122122
{{- else if .Values.kubeStateMetric.install -}}

stable/yugaware/templates/configs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ data:
347347
regex: "(.*)"
348348
target_label: "container_name"
349349
replacement: "$1"
350+
# rename old name of the CPU metric to the new name and label
351+
# ref: https://github.com/kubernetes/kube-state-metrics/blob/master/CHANGELOG.md#v200-alpha--2020-09-16
350352
- source_labels: ["__name__"]
351353
regex: "kube_pod_container_resource_requests_cpu_cores"
352354
target_label: "unit"

stable/yugaware/templates/kube-state-metrics-clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Adapted from https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics (Apache-2.0 license)
12
{{- if and .Values.kubeStateMetric.install (not .Values.kubeStateMetric.customEndpoint) -}}
23
apiVersion: rbac.authorization.k8s.io/v1
34
kind: ClusterRole

stable/yugaware/templates/kube-state-metrics-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Adapted from https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics (Apache-2.0 license)
12
{{- if and .Values.kubeStateMetric.install (not .Values.kubeStateMetric.customEndpoint) -}}
23
apiVersion: apps/v1
34
kind: Deployment

stable/yugaware/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ additionalAppConf:
178178
# pdbPolicyVersionOverride: "v1beta1"
179179

180180
## kube-state-metric support
181-
## Custom endpoint has higher priority than installation.
181+
## Custom endpoint has higher priority than installation. The endpoint value defaults to kube-state-metrics.kube-system.svc.<domainName>:8080.
182182
kubeStateMetric:
183183
## To provide custom kube-state-metric endpoint
184184
# customEndpoint: "kube-state-metrics.svc.cluster.local:8080"
@@ -205,7 +205,7 @@ kubeStateMetric:
205205
## for example: --enable-gzip-encoding, --log-file, etc.
206206
## all the possible args can be found here: https://github.com/kubernetes/kube-state-metrics/blob/master/docs/cli-arguments.md
207207
extraArgs: []
208-
## As we know platform need only nodes and pods metrics from kube-state-metrics
209-
## So we just enable the collector for nodes and pods.
208+
## As we know platform need only pods metrics from kube-state-metrics
209+
## So we just enable the collector for pods.
210210
collectors:
211211
- pods

0 commit comments

Comments
 (0)