summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/helm/ovn4nfv/templates/ovn/daemonset.yaml
blob: 2b71a9ddfff5d42558053a510ed07f5862be813b (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: {{ include "ovn4nfv.fullname" . }}-ovn-controller
  labels:
    {{- include "ovn4nfv.labels" . | nindent 4 }}
    role: ovn-controller
spec:
  selector:
    matchLabels:
      {{- include "ovn4nfv.selectorLabels" . | nindent 6 }}
      role: ovn-controller
  updateStrategy:
    type: OnDelete
  template:
    metadata:
      labels:
        {{- include "ovn4nfv.selectorLabels" . | nindent 8 }}
        role: ovn-controller
    spec:
      {{- with .Values.ovn.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      hostNetwork: true
      hostPID: true
      {{- with .Values.ovnController.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.ovnController.tolerations }}
      tolerations:
        {{- toYaml . | nindent 6 }}
      {{- end }}
      {{- with .Values.ovnController.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      priorityClassName: system-cluster-critical
      containers:
        - name: ovn-controller
          image: "{{ .Values.ovn.image.repository }}:{{ .Values.ovn.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.ovn.image.pullPolicy }}
          command: ["ovn4nfv-k8s", "start_ovn_controller"]
          resources:
            {{- toYaml .Values.ovnController.resources | nindent 12 }}
          securityContext:
            {{- toYaml .Values.ovnController.securityContext | nindent 12 }}
          env:
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
          volumeMounts:
            - mountPath: /lib/modules
              name: host-modules
              readOnly: true
            - mountPath: /var/run/openvswitch
              name: host-run-ovs
            - mountPath: /var/run/ovn
              name: host-run-ovn
            - mountPath: /sys
              name: host-sys
              readOnly: true
            - mountPath: /etc/openvswitch
              name: host-config-openvswitch
            - mountPath: /var/log/openvswitch
              name: host-log-ovs
            - mountPath: /var/log/ovn
              name: host-log-ovn
          readinessProbe:
            exec:
              command: ["ovn4nfv-k8s", "check_ovn_controller"]
            periodSeconds: 5
          livenessProbe:
            exec:
              command: ["ovn4nfv-k8s", "check_ovn_controller"]
            initialDelaySeconds: 10
            periodSeconds: 5
            failureThreshold: 5
      volumes:
        - name: host-modules
          hostPath:
            path: /lib/modules
        - name: host-run-ovs
          hostPath:
            path: /run/openvswitch
        - name: host-run-ovn
          hostPath:
            path: /run/ovn
        - name: host-sys
          hostPath:
            path: /sys
        - name: host-config-openvswitch
          hostPath:
            path: /etc/origin/openvswitch
        - name: host-log-ovs
          hostPath:
            path: /var/log/openvswitch
        - name: host-log-ovn
          hostPath:
            path: /var/log/ovn