blob: 2dbbb6890265e5661ebb6b0eec23ddb54c6ecf48 [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 }}
52 nodeSelector:
53 {{ .Values.labels.ovn_northd.node_selector_key }}: {{ .Values.labels.ovn_northd.node_selector_value }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000054 initContainers:
55{{- tuple $envAll "ovn_northd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
56 containers:
57 - name: northd
Mohammed Naser12207172024-02-05 18:49:35 -050058 command:
59 - /root/ovnkube.sh
60 - run-ovn-northd
Mohammed Naser54ee9922023-07-22 18:40:25 +000061{{ tuple $envAll "ovn_northd" | include "helm-toolkit.snippets.image" | indent 10 }}
vexxhost-bot10db87f2025-01-14 07:14:21 -050062{{ tuple $envAll $envAll.Values.pod.resources.ovn_northd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
Mohammed Naser54ee9922023-07-22 18:40:25 +000063{{ 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 -050064{{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "readiness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
Oleksandr K.dd6d2792024-10-25 18:36:50 +020065{{ 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 -050066 env:
67 - name: OVN_DAEMONSET_VERSION
68 value: "3"
69 - name: OVN_LOGLEVEL_NORTHD
70 value: "-vconsole:info -vfile:info"
71 - name: OVN_KUBERNETES_NAMESPACE
72 valueFrom:
73 fieldRef:
74 fieldPath: metadata.namespace
75 - name: OVN_KUBERNETES_NB_STATEFULSET
76 value: ovn-ovsdb-nb
77 - name: OVN_KUBERNETES_SB_STATEFULSET
78 value: ovn-ovsdb-sb
79 - name: OVN_SSL_ENABLE
80 value: "no"
Mohammed Naser54ee9922023-07-22 18:40:25 +000081{{- end }}