summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/helm/ovn4nfv/templates/ovn/deployment.yaml
blob: a9dd42882be08d82c73f163bef2b550c54df3bf2 (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
103
104
105
106
107
kind: Deployment
apiVersion: apps/v1
metadata:
  name: {{ include "ovn4nfv.fullname" . }}-ovn-control-plane
  labels:
    {{- include "ovn4nfv.labels" . | nindent 4 }}
    role: ovn-control-plane
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 0%
      maxUnavailable: 100%
    type: RollingUpdate
  selector:
    matchLabels:
      {{- include "ovn4nfv.selectorLabels" . | nindent 6 }}
      role: ovn-control-plane
  template:
    metadata:
      labels:
        {{- include "ovn4nfv.selectorLabels" . | nindent 8 }}
        role: ovn-control-plane
    spec:
      {{- with .Values.ovn.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      hostNetwork: true
      {{- with .Values.ovnControlPlane.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.ovnControlPlane.tolerations }}
      tolerations:
        {{- toYaml . | nindent 6 }}
      {{- end }}
      {{- with .Values.ovnControlPlane.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      priorityClassName: system-cluster-critical
      containers:
        - name: ovn-control-plane
          image: "{{ .Values.ovn.image.repository }}:{{ .Values.ovn.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.ovn.image.pullPolicy }}
          command: ["ovn4nfv-k8s", "start_ovn_control_plane"]
          resources:
            {{- toYaml .Values.ovnControlPlane.resources | nindent 12 }}
          securityContext:
            {{- toYaml .Values.ovnControlPlane.securityContext | nindent 12 }}
          env:
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          volumeMounts:
            - 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_control_plane"]
            periodSeconds: 3
          livenessProbe:
            exec:
              command: ["ovn4nfv-k8s", "check_ovn_control_plane"]
            initialDelaySeconds: 30
            periodSeconds: 7
            failureThreshold: 5
      volumes:
        - 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