blob: 234bc609e23476e048227b5c09685b0229999431 [file] [log] [blame]
Yi Tseng17657892021-10-11 16:04:59 -07001# Copyright 2021-present Open Networking Foundation
Charles Chand1b4bf92022-02-02 16:27:10 -08002# SPDX-License-Identifier: Apache-2.0
Yi Tseng17657892021-10-11 16:04:59 -07003---
4apiVersion: apps/v1
5kind: DaemonSet
6metadata:
7 name: {{ template "int-host-reporter.fullname" . }}
8 namespace: {{ .Release.Namespace }}
9 labels:
10 k8s-app: {{ template "int-host-reporter.fullname" . }}
11spec:
12 selector:
13 matchLabels:
14 name: {{ template "int-host-reporter.fullname" . }}
15 template:
16 metadata:
17 labels:
18 name: {{ template "int-host-reporter.fullname" . }}
19 spec:
20 nodeSelector:
21 kubernetes.io/os: linux
22 hostNetwork: true
23 {{- if .Values.image.pullSecrets }}
24 imagePullSecrets:
25 {{- range .Values.image.pullSecrets }}
26 - name: {{ . | quote }}
27 {{- end }}
28 {{- end }}
29 containers:
30 - name: {{ template "int-host-reporter.fullname" . }}
31 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
32 imagePullPolicy: {{ .Values.image.pullPolicy }}
33 env:
34 - name: CNI
35 value: "{{ .Values.cni }}"
36 - name: DATA_INTERFACE
37 value: "{{ .Values.dataInterface }}"
38 - name: COLLECTOR
39 value: "{{ .Values.intCollector }}"
40 # we use Node IP as switch ID
41 - name: NODE_IP
42 valueFrom:
43 fieldRef:
44 fieldPath: status.hostIP
45 command:
46 - "int-host-reporter"
47 args:
48 - "--cni"
49 - "$(CNI)"
50 - "--data-interface"
51 - "$(DATA_INTERFACE)"
52 - "--collector"
53 - "$(COLLECTOR)"
54 - "--switch-id"
55 - "$(NODE_IP)"
56 - "-f"
57 - "/etc/watchlist/watchlist.yaml"
58 volumeMounts:
59 - name: bpffs
60 mountPath: /sys/fs/bpf
61 - name: int-watchlist
62 mountPath: /etc/watchlist/watchlist.yaml
63 subPath: watchlist.yaml
64 securityContext:
65 privileged: true
66 capabilities:
67 add:
68 - "NET_ADMIN"
69 - "NET_RAW"
70 volumes:
71 - name: bpffs
72 hostPath:
73 path: /sys/fs/bpf
74 - name: int-watchlist
75 configMap:
76 name: int-watchlist