Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 1 | {{/* |
| 2 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | you may not use this file except in compliance with the License. |
| 4 | You may obtain a copy of the License at |
| 5 | |
| 6 | http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | |
| 8 | Unless required by applicable law or agreed to in writing, software |
| 9 | distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | See the License for the specific language governing permissions and |
| 12 | limitations under the License. |
| 13 | */}} |
| 14 | |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 15 | {{- define "northdReadinessProbeTemplate" }} |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 16 | exec: |
| 17 | command: |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 18 | - /usr/bin/ovn-kube-util |
| 19 | - readiness-probe |
| 20 | - -t |
| 21 | - ovn-northd |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 22 | {{- 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 | --- |
| 30 | kind: Deployment |
| 31 | apiVersion: apps/v1 |
| 32 | metadata: |
| 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 }} |
| 38 | spec: |
| 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 Hall | dea3c67 | 2025-02-12 10:33:39 -0600 | [diff] [blame] | 52 | affinity: |
| 53 | {{- tuple $envAll "ovn" "ovn_northd" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 54 | nodeSelector: |
| 55 | {{ .Values.labels.ovn_northd.node_selector_key }}: {{ .Values.labels.ovn_northd.node_selector_value }} |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 56 | initContainers: |
| 57 | {{- tuple $envAll "ovn_northd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} |
| 58 | containers: |
| 59 | - name: northd |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 60 | command: |
| 61 | - /root/ovnkube.sh |
| 62 | - run-ovn-northd |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 63 | {{ tuple $envAll "ovn_northd" | include "helm-toolkit.snippets.image" | indent 10 }} |
Rico Lin | 60f9d37 | 2025-01-14 14:07:43 +0800 | [diff] [blame] | 64 | {{ tuple $envAll $envAll.Values.pod.resources.ovn_northd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 65 | {{ dict "envAll" $envAll "application" "ovn_northd" "container" "northd" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 66 | {{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "readiness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} |
Oleksandr K. | e4e8316 | 2024-10-23 22:09:30 +0200 | [diff] [blame] | 67 | {{ dict "envAll" . "component" "ovn_northd" "container" "northd" "type" "liveness" "probeTemplate" (include "northdReadinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 68 | 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 Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 83 | {{- end }} |