Add INT host reporter chart
Also modified the following
- image pull secrets, use the same way like other charts
- use generated fully qualified name
Change-Id: I4c00d9aa5786a15f2d1080e71e97710c49307de8
diff --git a/int-host-reporter/templates/daemonset.yaml b/int-host-reporter/templates/daemonset.yaml
new file mode 100644
index 0000000..64730b9
--- /dev/null
+++ b/int-host-reporter/templates/daemonset.yaml
@@ -0,0 +1,76 @@
+# Copyright 2021-present Open Networking Foundation
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+---
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: {{ template "int-host-reporter.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ k8s-app: {{ template "int-host-reporter.fullname" . }}
+spec:
+ selector:
+ matchLabels:
+ name: {{ template "int-host-reporter.fullname" . }}
+ template:
+ metadata:
+ labels:
+ name: {{ template "int-host-reporter.fullname" . }}
+ spec:
+ nodeSelector:
+ kubernetes.io/os: linux
+ hostNetwork: true
+ {{- if .Values.image.pullSecrets }}
+ imagePullSecrets:
+ {{- range .Values.image.pullSecrets }}
+ - name: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: {{ template "int-host-reporter.fullname" . }}
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ env:
+ - name: CNI
+ value: "{{ .Values.cni }}"
+ - name: DATA_INTERFACE
+ value: "{{ .Values.dataInterface }}"
+ - name: COLLECTOR
+ value: "{{ .Values.intCollector }}"
+ # we use Node IP as switch ID
+ - name: NODE_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.hostIP
+ command:
+ - "int-host-reporter"
+ args:
+ - "--cni"
+ - "$(CNI)"
+ - "--data-interface"
+ - "$(DATA_INTERFACE)"
+ - "--collector"
+ - "$(COLLECTOR)"
+ - "--switch-id"
+ - "$(NODE_IP)"
+ - "-f"
+ - "/etc/watchlist/watchlist.yaml"
+ volumeMounts:
+ - name: bpffs
+ mountPath: /sys/fs/bpf
+ - name: int-watchlist
+ mountPath: /etc/watchlist/watchlist.yaml
+ subPath: watchlist.yaml
+ securityContext:
+ privileged: true
+ capabilities:
+ add:
+ - "NET_ADMIN"
+ - "NET_RAW"
+ volumes:
+ - name: bpffs
+ hostPath:
+ path: /sys/fs/bpf
+ - name: int-watchlist
+ configMap:
+ name: int-watchlist