Skip to content

Commit

Permalink
fix: empty metricrelabelings are now possible
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bressi <[email protected]>
  • Loading branch information
puffitos committed Jun 19, 2024
1 parent dc036a6 commit 59ae49b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ annotations:
catalog.cattle.io/requests-memory: 1000Mi
name: caas-cluster-monitoring
description: A Helm chart for Rancher Cluster Monitoring V3
version: "0.0.11-rc1"
version: "0.0.11-rc2"
appVersion: "58.4.0"
icon: https://raw.githubusercontent.com/caas-team/caas-project-monitoring/main/logo.png
keywords:
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@ available config parameters:
| `rkeControllerManager.clients.tolerations[1].operator` | string | `"Exists"` | |
| `rkeControllerManager.clients.useLocalhost` | bool | `true` | |
| `rkeControllerManager.component` | string | `"kube-controller-manager"` | |
| `rkeControllerManager.enabled` | bool | `false` | |
| `rkeControllerManager.endpoints` | list | `[]` | |
| `rkeControllerManager.enabled` | bool | `true` | |
| `rkeControllerManager.kubeVersionOverrides[0].constraint` | string | `"< 1.22"` | |
| `rkeControllerManager.kubeVersionOverrides[0].values.clients.https.enabled` | bool | `false` | |
| `rkeControllerManager.kubeVersionOverrides[0].values.clients.https.insecureSkipVerify` | bool | `false` | |
Expand Down Expand Up @@ -502,8 +501,7 @@ available config parameters:
| `rkeEtcd.clients.tolerations[1].effect` | string | `"NoSchedule"` | |
| `rkeEtcd.clients.tolerations[1].operator` | string | `"Exists"` | |
| `rkeEtcd.component` | string | `"kube-etcd"` | |
| `rkeEtcd.enabled` | bool | `false` | |
| `rkeEtcd.endpoints` | list | `[]` | |
| `rkeEtcd.enabled` | bool | `true` | |
| `rkeEtcd.metricsPort` | int | `2379` | |

### rkeIngressNginx
Expand All @@ -519,7 +517,6 @@ available config parameters:
| `rkeIngressNginx.clients.useLocalhost` | bool | `true` | |
| `rkeIngressNginx.component` | string | `"ingress-nginx"` | |
| `rkeIngressNginx.enabled` | bool | `false` | |
| `rkeIngressNginx.endpoints` | list | `[]` | |
| `rkeIngressNginx.metricsPort` | int | `10254` | |

### rkeProxy
Expand All @@ -533,8 +530,7 @@ available config parameters:
| `rkeProxy.clients.tolerations[1].operator` | string | `"Exists"` | |
| `rkeProxy.clients.useLocalhost` | bool | `true` | |
| `rkeProxy.component` | string | `"kube-proxy"` | |
| `rkeProxy.enabled` | bool | `false` | |
| `rkeProxy.endpoints` | list | `[]` | |
| `rkeProxy.enabled` | bool | `true` | |
| `rkeProxy.metricsPort` | int | `10249` | |

### rkeScheduler
Expand All @@ -555,8 +551,7 @@ available config parameters:
| `rkeScheduler.clients.tolerations[1].operator` | string | `"Exists"` | |
| `rkeScheduler.clients.useLocalhost` | bool | `true` | |
| `rkeScheduler.component` | string | `"kube-scheduler"` | |
| `rkeScheduler.enabled` | bool | `false` | |
| `rkeScheduler.endpoints` | list | `[]` | |
| `rkeScheduler.enabled` | bool | `true` | |
| `rkeScheduler.kubeVersionOverrides[0].constraint` | string | `"< 1.23"` | |
| `rkeScheduler.kubeVersionOverrides[0].values.clients.https.enabled` | bool | `false` | |
| `rkeScheduler.kubeVersionOverrides[0].values.clients.https.insecureSkipVerify` | bool | `false` | |
Expand Down
3 changes: 2 additions & 1 deletion charts/hardenedKubelet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
Binary file modified charts/kube-prometheus-stack-58.4.0.tgz
Binary file not shown.
3 changes: 2 additions & 1 deletion charts/rkeControllerManager/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
3 changes: 2 additions & 1 deletion charts/rkeEtcd/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
3 changes: 2 additions & 1 deletion charts/rkeIngressNginx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
3 changes: 2 additions & 1 deletion charts/rkeProxy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
3 changes: 2 additions & 1 deletion charts/rkeScheduler/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ app: {{ template "pushprox.serviceMonitor.name" . }}
{{- $_ := set . "proxyUrl" $proxyURL }}
{{- end }}
{{- $clusterIdRelabel := dict }}
{{- $metricRelabelings := .metricRelabelings -}}
{{- $mr := list -}}
{{- $metricRelabelings := default $mr .metricRelabelings -}}
{{- if $.Values.global.cattle.clusterId }}
{{- $_ := set $clusterIdRelabel "action" "replace" }}
{{- $_ := set $clusterIdRelabel "sourceLabels" (list "__address__") }}
Expand Down
14 changes: 4 additions & 10 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,7 @@ rkeControllerManager:
operator: "Exists"
useLocalhost: true
component: kube-controller-manager
enabled: false
endpoints: []
enabled: true
kubeVersionOverrides:
- constraint: "< 1.22"
values:
Expand All @@ -698,8 +697,7 @@ rkeControllerManager:
metricsPort: 10257 # default to secure port as of k8s >= 1.22

rkeEtcd:
enabled: false
endpoints: []
enabled: true
metricsPort: 2379
component: kube-etcd
clients:
Expand Down Expand Up @@ -731,7 +729,6 @@ rkeEtcd:

rkeIngressNginx:
enabled: false
endpoints: []
clients:
nodeSelector:
node-role.kubernetes.io/worker: "true"
Expand All @@ -746,8 +743,7 @@ rkeIngressNginx:
metricsPort: 10254

rkeProxy:
enabled: false
endpoints: []
enabled: true
metricsPort: 10249
component: kube-proxy
clients:
Expand All @@ -759,7 +755,6 @@ rkeProxy:
- effect: "NoSchedule"
operator: "Exists"


rkeScheduler:
clients:
https:
Expand All @@ -784,7 +779,7 @@ rkeScheduler:
operator: "Exists"
useLocalhost: true
component: kube-scheduler
enabled: false
enabled: true
kubeVersionOverrides:
- constraint: "< 1.23"
values:
Expand All @@ -795,7 +790,6 @@ rkeScheduler:
useServiceAccountCredentials: false
metricsPort: 10251 # default to insecure port in k8s < 1.23
metricsPort: 10259
endpoints: []

hardenedKubelet:
enabled: true
Expand Down

0 comments on commit 59ae49b

Please sign in to comment.