Merge "Node-Exporter: Override default image entrypoint"
This commit is contained in:
commit
b0c34c4468
26
prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl
Normal file
26
prometheus-node-exporter/templates/bin/_node-exporter.sh.tpl
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
{{/*
|
||||||
|
Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec /bin/node_exporter \
|
||||||
|
--collector.ntp \
|
||||||
|
--collector.ntp.server={{ .Values.conf.ntp_server_ip }} \
|
||||||
|
--collector.meminfo_numa \
|
||||||
|
--collector.bonding \
|
||||||
|
--collector.mountstats
|
||||||
|
--logtostderr
|
@ -22,6 +22,8 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: node-exporter-bin
|
name: node-exporter-bin
|
||||||
data:
|
data:
|
||||||
|
node-exporter.sh: |
|
||||||
|
{{ tuple "bin/_node-exporter.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
image-repo-sync.sh: |
|
image-repo-sync.sh: |
|
||||||
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
|
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -62,12 +62,8 @@ spec:
|
|||||||
- name: node-exporter
|
- name: node-exporter
|
||||||
{{ tuple $envAll "node_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "node_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.node_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.node_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
args:
|
command:
|
||||||
- --collector.ntp
|
- /tmp/node-exporter.sh
|
||||||
- --collector.ntp.server={{ .Values.conf.ntp_server_ip }}
|
|
||||||
- --collector.meminfo_numa
|
|
||||||
- --collector.bonding
|
|
||||||
- --collector.mountstats
|
|
||||||
ports:
|
ports:
|
||||||
- name: metrics
|
- name: metrics
|
||||||
containerPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
containerPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
@ -79,6 +75,10 @@ spec:
|
|||||||
- name: sys
|
- name: sys
|
||||||
mountPath: /host/sys
|
mountPath: /host/sys
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: node-exporter-bin
|
||||||
|
mountPath: /tmp/node-exporter.sh
|
||||||
|
subPath: node-exporter.sh
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: proc
|
- name: proc
|
||||||
hostPath:
|
hostPath:
|
||||||
@ -86,4 +86,8 @@ spec:
|
|||||||
- name: sys
|
- name: sys
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /sys
|
path: /sys
|
||||||
|
- name: node-exporter-bin
|
||||||
|
configMap:
|
||||||
|
name: node-exporter-bin
|
||||||
|
defaultMode: 0555
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user