Skip to content

Commit f79bbe4

Browse files
committed
[openvswitch] Add pdb for ovn db
Related-Prod: PRODX-50258 Change-Id: I4bafc84658c201effa86632fd46015938ca137ed
1 parent 88c16d0 commit f79bbe4

File tree

2 files changed

+42
-11
lines changed

2 files changed

+42
-11
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
15+
{{- if .Values.manifests.pdb_ovn_db }}
16+
{{- $envAll := . }}
17+
---
18+
apiVersion: policy/v1
19+
kind: PodDisruptionBudget
20+
metadata:
21+
name: openvswitch-ovn-db
22+
spec:
23+
minAvailable: {{ .Values.pod.lifecycle.disruption_budget.ovn_db.min_available }}
24+
selector:
25+
matchLabels:
26+
{{ tuple $envAll "openvswitch_ovn" "db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
27+
{{- end }}

charts/infra/openvswitch/values.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ pod:
331331
enabled: true
332332
min_ready_seconds: 0
333333
max_unavailable: 1
334+
disruption_budget:
335+
ovn_db:
336+
min_available: 2
334337
resources:
335338
enabled: false
336339
ovs:
@@ -471,17 +474,6 @@ dependencies:
471474
- endpoint: internal
472475
service: local_image_registry
473476

474-
manifests:
475-
configmap_bin: true
476-
daemonset_ovs_db: true
477-
daemonset_ovs_vswitchd: true
478-
statefulset_ovn_db: false
479-
statefulset_ovn_northd: false
480-
daemonset_ovn_controller: false
481-
job_image_repo_sync: true
482-
network_policy: false
483-
service_discovery_ovn_db: false
484-
service_master_ovn_db: false
485477
conf:
486478
openvswitch_db_server:
487479
ptcp_port: null
@@ -524,4 +516,16 @@ volume:
524516
enabled: true
525517
size: 1G
526518
class_name: default
519+
manifests:
520+
configmap_bin: true
521+
daemonset_ovs_db: true
522+
daemonset_ovs_vswitchd: true
523+
statefulset_ovn_db: false
524+
statefulset_ovn_northd: false
525+
daemonset_ovn_controller: false
526+
job_image_repo_sync: true
527+
network_policy: false
528+
service_discovery_ovn_db: false
529+
service_master_ovn_db: false
530+
pdb_ovn_db: true
527531
...

0 commit comments

Comments
 (0)