pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 1 | |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | apiVersion: apps/v1 |
| 6 | kind: Deployment |
| 7 | metadata: |
| 8 | name: {{ include "dbuf.fullname" . }} |
| 9 | labels: |
| 10 | {{- include "dbuf.labels" . | nindent 4 }} |
| 11 | spec: |
| 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: |
| 27 | {{- toYaml . | nindent 8 }} |
| 28 | {{- 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 |
| 46 | protocol: TCP |
| 47 | - name: stats |
| 48 | containerPort: 8080 |
| 49 | protocol: TCP |
| 50 | {{- 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 }} |