blob: 5ebe2e85d47672043d1130c5068dd98edf66c078 [file] [log] [blame]
Doyoung Lee8f30e152019-05-21 16:23:07 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16{{- if .Values.cadvisor.enabled }}
17
18apiVersion: apps/v1
19kind: DaemonSet
20metadata:
21 name: cadvisor-ds
22 annotations:
23 seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
24spec:
25 selector:
26 matchLabels:
27 name: cadvisor
28 template:
29 metadata:
30 labels:
31 name: cadvisor
32 spec:
33 hostNetwork: true
34 containers:
35 - name: cadvisor
36 image: {{ .Values.cadvisor.image }}
37 args:
38 - --port={{ .Values.cadvisor.nodePort }}
39 volumeMounts:
40 - name: rootfs
41 mountPath: /rootfs
42 readOnly: true
43 - name: var-run
44 mountPath: /var/run
45 readOnly: true
46 - name: sys
47 mountPath: /sys
48 readOnly: true
49 - name: docker
50 mountPath: /var/lib/docker
51 readOnly: true
52 - name: disk
53 mountPath: /dev/disk
54 readOnly: true
55 automountServiceAccountToken: false
56 terminationGracePeriodSeconds: 30
57 volumes:
58 - name: rootfs
59 hostPath:
60 path: /
61 - name: var-run
62 hostPath:
63 path: /var/run
64 - name: sys
65 hostPath:
66 path: /sys
67 - name: docker
68 hostPath:
69 path: /var/lib/docker
70 - name: disk
71 hostPath:
72 path: /dev/disk
73
74{{- end }}