mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/node-problem-detector] upgrade node-problem-detector to 0.7 (#16125)
* Upgrade node-problem-detector to 0.7 - Expose nodeSelector & prometheus settings - Add service & servicemonitor Co-authored-by: Timothy Lee <timmy.ccl@gmail.com> Signed-off-by: Ash Wu <hSATAC@gmail.com> * Make prometheus serviceMonitor optional Co-authored-by: Timothy Lee <timmy.ccl@gmail.com> Signed-off-by: Ash Wu <hSATAC@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
co-authored by
Timothy Lee
parent
9849206856
commit
0e22d39369
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: node-problem-detector
|
||||
version: "1.5.1"
|
||||
appVersion: v0.6.3
|
||||
version: "1.5.2"
|
||||
appVersion: v0.7.0
|
||||
home: https://github.com/kubernetes/node-problem-detector
|
||||
description: Installs the node-problem-detector daemonset for monitoring extra attributes on nodes
|
||||
icon: https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png
|
||||
|
||||
@@ -51,9 +51,12 @@ The following table lists the configurable parameters for this chart and their d
|
||||
| `settings.custom_monitor_definitions` | User-specified custom monitor definitions | `{}` |
|
||||
| `settings.log_monitors` | System log monitor config files | `/config/kernel-monitor.json`, `/config/docker-monitor.json` |
|
||||
| `settings.custom_plugin_monitors` | Custom plugin monitor config files | `[]` |
|
||||
| `settings.prometheus_address` | Prometheus exporter address | `0.0.0.0` |
|
||||
| `settings.prometheus_port` | Prometheus exporter port | `20257` |
|
||||
| `serviceAccount.create` | Whether a ServiceAccount should be created | `true` |
|
||||
| `serviceAccount.name` | Name of the ServiceAccount to create | Generated value from template |
|
||||
| `tolerations` | Optional daemonset tolerations | `[]` |
|
||||
| `nodeSelector` | Optional daemonset nodeSelector | `{}` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or provide a YAML file containing the values for the above parameters:
|
||||
|
||||
|
||||
@@ -12,11 +12,13 @@ spec:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "node-problem-detector.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app: {{ include "node-problem-detector.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "node-problem-detector.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app: {{ include "node-problem-detector.name" . }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/custom-config-configmap.yaml") . | sha256sum }}
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
@@ -37,7 +39,7 @@ spec:
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
- "exec /node-problem-detector --logtostderr --system-log-monitors={{- range $index, $monitor := .Values.settings.log_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }} {{- if .Values.settings.custom_plugin_monitors }} --custom-plugin-monitors={{- range $index, $monitor := .Values.settings.custom_plugin_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }} {{- end }}"
|
||||
- "exec /node-problem-detector --logtostderr --system-log-monitors={{- range $index, $monitor := .Values.settings.log_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }} {{- if .Values.settings.custom_plugin_monitors }} --custom-plugin-monitors={{- range $index, $monitor := .Values.settings.custom_plugin_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }} {{- end }} --prometheus-address={{ .Values.settings.prometheus_address }} --prometheus-port={{ .Values.settings.prometheus_port }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
@@ -54,6 +56,9 @@ spec:
|
||||
- name: custom-config
|
||||
mountPath: /custom-config
|
||||
readOnly: true
|
||||
ports:
|
||||
- containerPort: {{ .Values.settings.prometheus_port }}
|
||||
name: exporter
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
{{- with .Values.affinity }}
|
||||
@@ -64,6 +69,10 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: log
|
||||
hostPath:
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "node-problem-detector.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "node-problem-detector.name" . }}
|
||||
helm.sh/chart: {{ include "node-problem-detector.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app: {{ include "node-problem-detector.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: exporter
|
||||
port: {{ .Values.settings.prometheus_port }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: {{ include "node-problem-detector.name" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "node-problem-detector.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "node-problem-detector.name" . }}
|
||||
helm.sh/chart: {{ include "node-problem-detector.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
||||
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
|
||||
{{- end }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ include "node-problem-detector.name" . }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
endpoints:
|
||||
- port: exporter
|
||||
path: /metrics
|
||||
interval: 60s
|
||||
{{- end }}
|
||||
@@ -33,12 +33,15 @@ settings:
|
||||
# - /custom-config/docker-monitor-filelog.json
|
||||
custom_plugin_monitors: []
|
||||
|
||||
prometheus_address: 0.0.0.0
|
||||
prometheus_port: 20257
|
||||
|
||||
hostpath:
|
||||
logdir: /var/log/
|
||||
|
||||
image:
|
||||
repository: k8s.gcr.io/node-problem-detector
|
||||
tag: v0.6.3
|
||||
tag: v0.7.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
nameOverride: ""
|
||||
@@ -68,3 +71,10 @@ serviceAccount:
|
||||
name:
|
||||
|
||||
affinity: {}
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
metrics:
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
|
||||
Reference in New Issue
Block a user