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