Add resources field to all addon charts
[multicloud/k8s.git] / kud / deployment_infra / helm / ovn4nfv / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ include "ovn4nfv.fullname" . }}-nfn-operator
5   labels:
6     {{- include "ovn4nfv.labels" . | nindent 4 }}
7     role: nfn-operator
8 spec:
9   replicas: 1
10   selector:
11     matchLabels:
12       {{- include "ovn4nfv.selectorLabels" . | nindent 6 }}
13       role: nfn-operator
14   template:
15     metadata:
16       labels:
17         {{- include "ovn4nfv.selectorLabels" . | nindent 8 }}
18         role: nfn-operator
19     spec:
20       {{- with .Values.imagePullSecrets }}
21       imagePullSecrets:
22         {{- toYaml . | nindent 8 }}
23       {{- end }}
24       hostNetwork: true
25       {{- with .Values.nfnOperator.nodeSelector }}
26       nodeSelector:
27         {{- toYaml . | nindent 8 }}
28       {{- end }}
29       {{- with .Values.nfnOperator.affinity }}
30       affinity:
31         {{- toYaml . | nindent 8 }}
32       {{- end }}
33       {{- with .Values.nfnOperator.tolerations }}
34       tolerations:
35         {{- toYaml . | nindent 6 }}
36       {{- end }}
37       serviceAccountName: {{ include "ovn4nfv.serviceAccountName" . }}
38       containers:
39         - name: nfn-operator
40           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
41           imagePullPolicy: {{ .Values.image.pullPolicy }}
42           command: ["/usr/local/bin/entrypoint", "operator"]
43           envFrom:
44           - configMapRef:
45               name: {{ .Values.nfnOperator.config.name }}
46           ports:
47           - containerPort: 50000
48             protocol: TCP
49           env:
50             - name: POD_NAME
51               valueFrom:
52                 fieldRef:
53                   fieldPath: metadata.name
54             - name: OPERATOR_NAME
55               value: "nfn-operator"
56           resources:
57             {{- toYaml .Values.nfnOperator.resources | nindent 12 }}