74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
# Copyright (c) 2023 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: {{ include "cadvisor.fullname" . }}
|
|
labels:
|
|
{{- include "cadvisor.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "cadvisor.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "cadvisor.selectorLabels" . | nindent 8 }}
|
|
{{- with .Values.podLabels }}
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
name: {{ .Chart.Name }}
|
|
args:
|
|
{{- if .Values.perf_events }}
|
|
{{ toYaml .Values.perf_args | indent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.args }}
|
|
{{ toYaml . | indent 10 }}
|
|
{{- end }}
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 10 }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
volumeMounts:
|
|
{{- if .Values.perf_events }}
|
|
- mountPath: /etc/cadvisor/cadvisor_perf_events.json
|
|
name: cadvisor-perf-events
|
|
subPath: cadvisor_perf_events.json
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- range .Values.volumes }}
|
|
- mountPath: {{ default .path .mount }}
|
|
name: {{ .name }}
|
|
readOnly: true
|
|
{{- end }}
|
|
serviceAccountName: cadvisor
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
{{- if .Values.perf_events }}
|
|
- configMap:
|
|
name: cadvisor-perf-events
|
|
name: cadvisor-perf-events
|
|
{{- end }}
|
|
{{- range .Values.volumes }}
|
|
- hostPath:
|
|
path: {{ .path }}
|
|
name: {{ .name }}
|
|
{{- end }} |