blob: baf5a0c75f277c0b02242f944e708b53a3da4697 [file] [log] [blame]
Mohammed Naser54ee9922023-07-22 18:40:25 +00001{{/*
2Licensed under the Apache License, Version 2.0 (the "License");
3you may not use this file except in compliance with the License.
4You may obtain a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8Unless required by applicable law or agreed to in writing, software
9distributed under the License is distributed on an "AS IS" BASIS,
10WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11See the License for the specific language governing permissions and
12limitations under the License.
13*/}}
14
Mohammed Naser12207172024-02-05 18:49:35 -050015{{- define "northdReadinessProbeTemplate" }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000016exec:
17 command:
Mohammed Naser12207172024-02-05 18:49:35 -050018 - /usr/bin/ovn-kube-util
19 - readiness-probe
20 - -t
21 - ovn-northd
Mohammed Naser54ee9922023-07-22 18:40:25 +000022{{- end }}
23
24{{- if .Values.manifests.deployment_northd }}
25{{- $envAll := . }}
26
27{{- $serviceAccountName := "ovn-northd" }}
28{{ tuple $envAll "ovn_northd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
29---
30kind: Deployment
31apiVersion: apps/v1
32metadata:
33 name: ovn-northd
34 annotations:
35 {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
36 labels:
37{{ tuple $envAll "ovn" "ovn-northd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
38spec:
39 replicas: {{ .Values.pod.replicas.ovn_northd }}
40 selector:
41 matchLabels:
42{{ tuple $envAll "ovn" "ovn-northd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
43 template:
44 metadata:
45 labels:
46{{ tuple $envAll "ovn" "ovn-northd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
47 annotations:
48{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
49 configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
50 spec:
51 serviceAccountName: {{ $serviceAccountName }}
Jason Halldea3c672025-02-12 10:33:39 -060052 affinity:
53{{- tuple $envAll "ovn" "ovn_northd" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000054 nodeSelector:
55 {{ .Values.labels.ovn_northd.node_selector_key }}: {{ .Values.labels.ovn_northd.node_selector_value }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000056 initContainers:
57{{- tuple $envAll "ovn_northd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
58 containers:
59 - name: northd
Mohammed Naser12207172024-02-05 18:49:35 -050060 command:
61 - /root/ovnkube.sh
62 - run-ovn-northd
Mohammed Naser54ee9922023-07-22 18:40:25 +000063{{ tuple $envAll "ovn_northd" | include "helm-toolkit.snippets.image" | indent 10 }}
Rico Lin60f9d372025-01-14 14:07:43 +080064{{ tuple $envAll $envAll.Values.pod.resources.ovn_northd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000065{{ dict "envAll" $envAll "application" "ovn_northd" "container" "northd" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
Mohammed Naser12207172024-02-05 18:49:35 -050066{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "readiness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
Oleksandr K.e4e83162024-10-23 22:09:30 +020067{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "liveness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
Mohammed Naser12207172024-02-05 18:49:35 -050068 env:
69 - name: OVN_DAEMONSET_VERSION
70 value: "3"
71 - name: OVN_LOGLEVEL_NORTHD
72 value: "-vconsole:info -vfile:info"
73 - name: OVN_KUBERNETES_NAMESPACE
74 valueFrom:
75 fieldRef:
76 fieldPath: metadata.namespace
77 - name: OVN_KUBERNETES_NB_STATEFULSET
78 value: ovn-ovsdb-nb
79 - name: OVN_KUBERNETES_SB_STATEFULSET
80 value: ovn-ovsdb-sb
81 - name: OVN_SSL_ENABLE
82 value: "no"
Mohammed Naser54ee9922023-07-22 18:40:25 +000083{{- end }}