blob: 3c8ef5e5ab5ddd7b492839442e99622f7b8200bf [file] [log] [blame]
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "dbuf.fullname" . }}
labels:
{{- include "dbuf.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "dbuf.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "dbuf.selectorLabels" . | nindent 8 }}
spec:
{{- if .Values.image.credentials }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ "dbuf", {{ template "extraParams" .Values.extraParams }} ]
resources:
requests:
intel.com/{{ .Values.sriovResourceName }}: '{{ .Values.sriovNICSize }}'
limits:
intel.com/{{ .Values.sriovResourceName }}: '{{ .Values.sriovNICSize }}'
ports:
- name: grpc
containerPort: 10000
protocol: TCP
- name: stats
containerPort: 8080
protocol: TCP
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}