Helm charts for Metallb
[demo.git] / vnfs / DAaaS / deploy / 00-init / metallb / templates / speaker.yaml
1 apiVersion: apps/v1
2 kind: DaemonSet
3 metadata:
4   name: {{ template "metallb.fullname" . }}-speaker
5   labels:
6     heritage: {{ .Release.Service | quote }}
7     release: {{ .Release.Name | quote }}
8     chart: {{ template "metallb.chart" . }}
9     app: {{ template "metallb.name" . }}
10     component: speaker
11 spec:
12   selector:
13     matchLabels:
14       app: {{ template "metallb.name" . }}
15       component: speaker
16       release: {{ .Release.Name | quote }}
17   template:
18     metadata:
19       labels:
20         heritage: {{ .Release.Service | quote }}
21         release: {{ .Release.Name | quote }}
22         chart: {{ template "metallb.chart" . }}
23         app: {{ template "metallb.name" . }}
24         component: speaker
25 {{- if .Values.prometheus.scrapeAnnotations }}
26       annotations:
27         prometheus.io/scrape: "true"
28         prometheus.io/port: "7472"
29 {{- end }}
30     spec:
31       tolerations:
32       - key: node-role.kubernetes.io/master
33         effect: NoSchedule
34       serviceAccountName: {{ template "metallb.speakerServiceAccountName" . }}
35       terminationGracePeriodSeconds: 0
36       hostNetwork: true
37       containers:
38       - name: speaker
39         image: {{ .Values.speaker.image.repository }}:{{ .Values.speaker.image.tag }}
40         imagePullPolicy: {{ .Values.speaker.image.pullPolicy }}
41         args:
42         - --port=7472
43         - --config={{ template "metallb.configMapName" . }}
44         env:
45         - name: METALLB_NODE_NAME
46           valueFrom:
47             fieldRef:
48               fieldPath: spec.nodeName
49         - name: METALLB_HOST
50           valueFrom:
51             fieldRef:
52               fieldPath: status.hostIP
53         ports:
54         - name: monitoring
55           containerPort: 7472
56         resources:
57 {{ toYaml .Values.speaker.resources | indent 10 }}
58         securityContext:
59           allowPrivilegeEscalation: false
60           readOnlyRootFilesystem: true
61           capabilities:
62             drop:
63             - ALL
64             add:
65             - NET_ADMIN
66             - NET_RAW
67             - SYS_ADMIN
68       nodeSelector:
69         "beta.kubernetes.io/os": linux
70         {{- with .Values.speaker.nodeSelector }}
71 {{ toYaml . | indent 8 }}
72     {{- end }}
73     {{- with .Values.speaker.tolerations }}
74       tolerations:
75 {{ toYaml . | indent 8 }}
76     {{- end }}
77     {{- with .Values.speaker.affinity }}
78       affinity:
79 {{ toYaml . | indent 8 }}
80     {{- end }}