| # 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 |