Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Commit 6d3f065

Browse files
committed
Update node-problem-detector to v0.8.8
Release notes: https://github.com/kubernetes/node-problem-detector/releases/tag/v0.8.8 Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
1 parent 554167e commit 6d3f065

File tree

8 files changed

+145
-60
lines changed

8 files changed

+145
-60
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
apiVersion: v1
2-
name: node-problem-detector
3-
version: "1.8.6"
4-
appVersion: v0.8.5
5-
home: https://github.com/kubernetes/node-problem-detector
2+
appVersion: v0.8.8
63
description: |
74
This chart installs a [node-problem-detector](https://github.com/kubernetes/node-problem-detector) daemonset. This tool aims to make various node problems visible to the upstream layers in cluster management stack. It is a daemon which runs on each node, detects node problems and reports them to apiserver.
5+
engine: gotpl
6+
home: https://github.com/kubernetes/node-problem-detector
87
icon: https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png
98
keywords:
109
- node
1110
- problem
1211
- detector
1312
- monitoring
13+
maintainers:
14+
- email: no-reply@deliveryhero.com
15+
name: max-rocket-internet
16+
name: node-problem-detector
1417
sources:
1518
- https://github.com/kubernetes/node-problem-detector
1619
- https://kubernetes.io/docs/concepts/architecture/nodes/#condition
17-
maintainers:
18-
- name: max-rocket-internet
19-
email: no-reply@deliveryhero.com
20-
engine: gotpl
20+
version: 2.0.2

assets/charts/components/node-problem-detector/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# node-problem-detector
22

3-
![Version: 1.8.6](https://img.shields.io/badge/Version-1.8.6-informational?style=flat-square) ![AppVersion: v0.8.5](https://img.shields.io/badge/AppVersion-v0.8.5-informational?style=flat-square)
3+
![Version: 2.0.2](https://img.shields.io/badge/Version-2.0.2-informational?style=flat-square) ![AppVersion: v0.8.8](https://img.shields.io/badge/AppVersion-v0.8.8-informational?style=flat-square)
44

55
This chart installs a [node-problem-detector](https://github.com/kubernetes/node-problem-detector) daemonset. This tool aims to make various node problems visible to the upstream layers in cluster management stack. It is a daemon which runs on each node, detects node problems and reports them to apiserver.
66

@@ -55,12 +55,13 @@ helm install my-release deliveryhero/node-problem-detector -f values.yaml
5555
| fullnameOverride | string | `""` | |
5656
| hostNetwork | bool | `false` | Run pod on host network Flag to run Node Problem Detector on the host's network. This is typically not recommended, but may be useful for certain use cases. |
5757
| hostPID | bool | `false` | |
58-
| hostpath.logdir | string | `"/var/log/"` | Log directory path on K8s host |
5958
| image.pullPolicy | string | `"IfNotPresent"` | |
6059
| image.repository | string | `"k8s.gcr.io/node-problem-detector/node-problem-detector"` | |
61-
| image.tag | string | `"v0.8.5"` | |
60+
| image.tag | string | `"v0.8.8"` | |
6261
| imagePullSecrets | list | `[]` | |
6362
| labels | object | `{}` | |
63+
| logDir.host | string | `"/var/log/"` | log directory on k8s host |
64+
| logDir.pod | string | `""` | log directory in pod (volume mount), use logDir.host if empty |
6465
| maxUnavailable | int | `1` | The max pods unavailable during an update |
6566
| metrics.serviceMonitor.additionalLabels | object | `{}` | |
6667
| metrics.serviceMonitor.enabled | bool | `false` | |

assets/charts/components/node-problem-detector/templates/_helpers.tpl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,37 @@ Return the appropriate apiVersion for podSecurityPolicy.
5959
{{- print "extensions/v1beta1" -}}
6060
{{- end -}}
6161
{{- end -}}
62+
63+
64+
{{/*
65+
Concat npd.config.* to make node-problem-detector CLI args more readable
66+
*/}}
67+
{{- define "npd.cli.args" -}}
68+
{{ include "npd.config.systemLogMonitor" . }} {{ include "npd.config.customPluginMonitor" . }} {{ include "npd.config.prometheus" . }} {{ include "npd.config.k8sExporter" . }}
69+
{{- end -}}
70+
71+
{{- define "npd.config.systemLogMonitor" -}}
72+
--config.system-log-monitor=
73+
{{- range $index, $monitor := .Values.settings.log_monitors -}}
74+
{{- if ne $index 0 -}},{{- end -}}
75+
{{- $monitor -}}
76+
{{- end -}}
77+
{{- end -}}
78+
79+
{{- define "npd.config.customPluginMonitor" -}}
80+
{{- if .Values.settings.custom_plugin_monitors -}}
81+
--config.custom-plugin-monitor=
82+
{{- range $index, $monitor := .Values.settings.custom_plugin_monitors -}}
83+
{{- if ne $index 0 -}},{{- end -}}
84+
{{- $monitor -}}
85+
{{- end -}}
86+
{{- end -}}
87+
{{- end -}}
88+
89+
{{- define "npd.config.prometheus" -}}
90+
{{- printf "--prometheus-address=%s --prometheus-port=%.0f" .Values.settings.prometheus_address .Values.settings.prometheus_port -}}
91+
{{- end -}}
92+
93+
{{- define "npd.config.k8sExporter" -}}
94+
--k8s-exporter-heartbeat-period={{ .Values.settings.heartBeatPeriod }}
95+
{{- end -}}

assets/charts/components/node-problem-detector/templates/daemonset.yaml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ metadata:
1313
spec:
1414
updateStrategy:
1515
type: {{ .Values.updateStrategy }}
16-
{{- if eq .Values.updateStrategy "RollingUpdate"}}
16+
{{- if eq .Values.updateStrategy "RollingUpdate"}}
1717
rollingUpdate:
1818
maxUnavailable: {{ .Values.maxUnavailable }}
19-
{{- end}}
19+
{{- end}}
2020
selector:
2121
matchLabels:
2222
app.kubernetes.io/name: {{ include "node-problem-detector.name" . }}
@@ -34,9 +34,9 @@ spec:
3434
annotations:
3535
checksum/config: {{ include (print $.Template.BasePath "/custom-config-configmap.yaml") . | sha256sum }}
3636
scheduler.alpha.kubernetes.io/critical-pod: ''
37-
{{- if .Values.annotations }}
38-
{{ toYaml .Values.annotations | indent 8 }}
39-
{{- end }}
37+
{{- if .Values.annotations }}
38+
{{- toYaml .Values.annotations | nindent 8 }}
39+
{{- end }}
4040
spec:
4141
serviceAccountName: {{ template "node-problem-detector.serviceAccountName" . }}
4242
{{- if .Values.imagePullSecrets }}
@@ -55,59 +55,59 @@ spec:
5555
command:
5656
- "/bin/sh"
5757
- "-c"
58-
- "exec /node-problem-detector --logtostderr --config.system-log-monitor={{- 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 }} --k8s-exporter-heartbeat-period={{ .Values.settings.heartBeatPeriod }}"
59-
{{- if .Values.securityContext }}
58+
- "exec /node-problem-detector --logtostderr {{ include "npd.cli.args" $ }}"
59+
{{- if .Values.securityContext }}
6060
securityContext:
61-
{{ toYaml .Values.securityContext | indent 12 }}
62-
{{- end }}
61+
{{- toYaml .Values.securityContext | nindent 12 }}
62+
{{- end }}
6363
env:
6464
- name: NODE_NAME
6565
valueFrom:
6666
fieldRef:
6767
fieldPath: spec.nodeName
68-
{{- if .Values.env }}
69-
{{ toYaml .Values.env | indent 12 }}
70-
{{- end }}
68+
{{- if .Values.env }}
69+
{{- toYaml .Values.env | nindent 12 }}
70+
{{- end }}
7171
volumeMounts:
7272
- name: log
73-
mountPath: {{ .Values.hostpath.logdir }}
73+
mountPath: {{ default (default "/var/log/" .Values.logDir.host) .Values.logDir.pod }}
7474
- name: localtime
7575
mountPath: /etc/localtime
7676
readOnly: true
7777
- name: custom-config
7878
mountPath: /custom-config
7979
readOnly: true
80-
{{- if .Values.extraVolumeMounts }}
81-
{{ toYaml .Values.extraVolumeMounts | indent 12 }}
82-
{{- end }}
80+
{{- if .Values.extraVolumeMounts }}
81+
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
82+
{{- end }}
8383
ports:
8484
- containerPort: {{ .Values.settings.prometheus_port }}
8585
name: exporter
8686
resources:
87-
{{ toYaml .Values.resources | indent 12 }}
88-
{{- with .Values.affinity }}
87+
{{- toYaml .Values.resources | nindent 12 }}
88+
{{- with .Values.affinity }}
8989
affinity:
90-
{{ toYaml . | indent 8 }}
91-
{{- end }}
92-
{{- with .Values.tolerations }}
90+
{{- toYaml . | nindent 8 }}
91+
{{- end }}
92+
{{- with .Values.tolerations }}
9393
tolerations:
94-
{{ toYaml . | indent 8 }}
95-
{{- end }}
96-
{{- if .Values.nodeSelector }}
94+
{{- toYaml . | nindent 8 }}
95+
{{- end }}
96+
{{- if .Values.nodeSelector }}
9797
nodeSelector:
98-
{{ toYaml .Values.nodeSelector | indent 8 }}
99-
{{- end }}
98+
{{- toYaml .Values.nodeSelector | nindent 8 }}
99+
{{- end }}
100100
volumes:
101101
- name: log
102102
hostPath:
103-
path: {{ .Values.hostpath.logdir }}
103+
path: {{ default "/var/log/" .Values.logDir.host }}
104104
- name: localtime
105105
hostPath:
106106
path: /etc/localtime
107107
type: "FileOrCreate"
108108
- name: custom-config
109109
configMap:
110110
name: {{ include "node-problem-detector.customConfig" . }}
111-
{{- if .Values.extraVolumes }}
112-
{{ toYaml .Values.extraVolumes | indent 8 }}
113-
{{- end }}
111+
{{- if .Values.extraVolumes }}
112+
{{- toYaml .Values.extraVolumes | nindent 8 }}
113+
{{- end }}

assets/charts/components/node-problem-detector/templates/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
app.kubernetes.io/instance: {{ .Release.Name }}
1010
app.kubernetes.io/managed-by: {{ .Release.Service }}
1111
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
12-
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
12+
{{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }}
1313
{{- end }}
1414
namespace: {{ .Release.Namespace }}
1515
spec:

assets/charts/components/node-problem-detector/values.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,31 @@ settings:
55
# https://github.com/kubernetes/node-problem-detector/tree/master/config
66
# settings.custom_monitor_definitions -- Custom plugin monitor config files
77
custom_monitor_definitions: {}
8+
# docker-monitor-filelog.json: |
9+
# {
10+
# "plugin": "filelog",
11+
# "pluginConfig": {
12+
# "timestamp": "^time=\"(\\S*)\"",
13+
# "message": "msg=\"([^\n]*)\"",
14+
# "timestampFormat": "2006-01-02T15:04:05.999999999-07:00"
15+
# },
16+
# "logPath": "/var/log/docker.log",
17+
# "lookback": "5m",
18+
# "bufferSize": 10,
19+
# "source": "docker-monitor",
20+
# "conditions": [],
21+
# "rules": [
22+
# {
23+
# "type": "temporary",
24+
# "reason": "CorruptDockerImage",
25+
# "pattern": "Error trying v2 registry: failed to register layer: rename /var/lib/docker/image/(.+) /var/lib/docker/image/(.+): directory not empty.*"
26+
# }
27+
# ]
28+
# }
829
# settings.log_monitors -- User-specified custom monitor definitions
930
log_monitors:
1031
- /config/kernel-monitor.json
1132
- /config/docker-monitor.json
12-
# - /custom-config/kernel-monitor.json
13-
# - /custom-config/docker-monitor-filelog.json
1433
# An example of activating a custom log monitor definition in
1534
# Node Problem Detector
1635
# - /custom-config/docker-monitor-filelog.json
@@ -25,13 +44,15 @@ settings:
2544
# settings.heartBeatPeriod -- Syncing interval with API server
2645
heartBeatPeriod: 5m0s
2746

28-
hostpath:
29-
# hostpath.logdir -- Log directory path on K8s host
30-
logdir: /var/log/
47+
logDir:
48+
# logDir.host -- log directory on k8s host
49+
host: /var/log/
50+
# logDir.pod -- log directory in pod (volume mount), use logDir.host if empty
51+
pod: ""
3152

3253
image:
3354
repository: k8s.gcr.io/node-problem-detector/node-problem-detector
34-
tag: v0.8.5
55+
tag: v0.8.8
3556
pullPolicy: IfNotPresent
3657

3758
imagePullSecrets: []

0 commit comments

Comments
 (0)