blob: d364ece0946ca3ecccccc4e9a57fc6917edb71ad [file] [log] [blame]
pudelkoM3f0efb12021-01-12 13:55:48 -08001
2# Copyright 2020-present Open Networking Foundation
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5apiVersion: apps/v1
6kind: Deployment
7metadata:
8 name: {{ include "dbuf.fullname" . }}
9 labels:
10 {{- include "dbuf.labels" . | nindent 4 }}
11spec:
12 replicas: {{ .Values.replicaCount }}
13 selector:
14 matchLabels:
15 {{- include "dbuf.selectorLabels" . | nindent 6 }}
16 template:
17 metadata:
18 {{- with .Values.podAnnotations }}
19 annotations:
20 {{- toYaml . | nindent 8 }}
21 {{- end }}
22 labels:
23 {{- include "dbuf.selectorLabels" . | nindent 8 }}
24 spec:
25 {{- if .Values.image.credentials }}
26 imagePullSecrets:
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080027 - name: {{ .Release.Name }}.registry
pudelkoM3f0efb12021-01-12 13:55:48 -080028 {{- end }}
29 securityContext:
30 {{- toYaml .Values.podSecurityContext | nindent 8 }}
31 containers:
32 - name: {{ .Chart.Name }}
33 securityContext:
34 {{- toYaml .Values.securityContext | nindent 12 }}
35 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
36 imagePullPolicy: {{ .Values.image.pullPolicy }}
37 command: [ "dbuf", {{ template "extraParams" .Values.extraParams }} ]
38 resources:
39 requests:
40 intel.com/{{ .Values.sriovResourceName }}: '{{ .Values.sriovNICSize }}'
41 limits:
42 intel.com/{{ .Values.sriovResourceName }}: '{{ .Values.sriovNICSize }}'
43 ports:
44 - name: grpc
45 containerPort: 10000
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080046 protocol: {{ .Values.service.grpc.protocol }}
47 - name: exporter
pudelkoM3f0efb12021-01-12 13:55:48 -080048 containerPort: 8080
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080049 protocol: {{ .Values.service.stats.protocol }}
pudelkoM3f0efb12021-01-12 13:55:48 -080050 {{- with .Values.nodeSelector }}
51 nodeSelector:
52 {{- toYaml . | nindent 8 }}
53 {{- end }}
54 {{- with .Values.affinity }}
55 affinity:
56 {{- toYaml . | nindent 8 }}
57 {{- end }}
58 {{- with .Values.tolerations }}
59 tolerations:
60 {{- toYaml . | nindent 8 }}
61 {{- end }}