blob: 9eb082243ff49df60da312595d7c611f64ce1ef1 [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 }}
Hung-Wei Chiu3713e562021-02-17 14:14:35 -080050 # Push data plane address to ONOS via netcfgc
Hung-Wei Chiu8bc07562021-02-24 18:19:36 -080051 # Add the static route for sr-iov interface
52 - name: config
Hung-Wei Chiu3713e562021-02-17 14:14:35 -080053 image: curlimages/curl:7.75.0
54 imagePullPolicy: IfNotPresent
55 env:
56 - name: NAMESPACE
57 valueFrom:
58 fieldRef:
59 fieldPath: metadata.namespace
60 - name: ONOS_SERVER
61 value: "{{ .Values.onos.server }}"
62 - name: ONOS_PORT
63 value: "{{ .Values.onos.port }}"
64 - name: ONOS_USERNAME
65 value: "{{ .Values.onos.username }}"
66 - name: ONOS_PASSWORD
67 value: "{{ .Values.onos.password }}"
68 - name: GRPC_SERVICE_NAME
69 value: {{ include "dbuf.fullname" . }}
70 - name: GRPC_PORT
71 value: "{{ .Values.service.grpc.port }}"
72 - name: DP_INTERFACE
73 value: "{{ .Values.dataplane.interface }}"
74 - name: DP_PORT
75 value: "{{ .Values.dataplane.port }}"
Hung-Wei Chiu8bc07562021-02-24 18:19:36 -080076 - name: STATIC_ROUTES
77 value: "{{ .Values.network.route }}"
Hung-Wei Chiu3713e562021-02-17 14:14:35 -080078 volumeMounts:
Hung-Wei Chiu8bc07562021-02-24 18:19:36 -080079 - name: config-script
80 mountPath: /tmp/config
81 subPath: config
82 command: ["sh", "-c", "/tmp/config"]
83 securityContext:
84 runAsUser: 0
85 capabilities:
86 add: ["NET_ADMIN"]
pudelkoM3f0efb12021-01-12 13:55:48 -080087 {{- with .Values.nodeSelector }}
88 nodeSelector:
89 {{- toYaml . | nindent 8 }}
90 {{- end }}
91 {{- with .Values.affinity }}
92 affinity:
93 {{- toYaml . | nindent 8 }}
94 {{- end }}
95 {{- with .Values.tolerations }}
96 tolerations:
97 {{- toYaml . | nindent 8 }}
98 {{- end }}
Hung-Wei Chiu3713e562021-02-17 14:14:35 -080099 volumes:
Hung-Wei Chiu8bc07562021-02-24 18:19:36 -0800100 - name: config-script
Hung-Wei Chiu3713e562021-02-17 14:14:35 -0800101 configMap:
102 name: {{ include "dbuf.fullname" . }}
103 defaultMode: 0755