Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 27c0858

Browse files
committedMay 21, 2025
[neutron] add ovn-db-sync job
1 parent 58b49e8 commit 27c0858

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
 
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{{- if .Values.ovn.enabled }}
2+
---
3+
apiVersion: batch/v1
4+
kind: Job
5+
metadata:
6+
name: neutron-ovn-db-sync-{{ randAlphaNum 4 | lower }}
7+
labels:
8+
system: openstack
9+
type: configuration
10+
component: neutron
11+
spec:
12+
template:
13+
metadata:
14+
annotations:
15+
kubectl.kubernetes.io/default-container: "{{ .Release.Name }}-ovn-db-sync"
16+
spec:
17+
restartPolicy: OnFailure
18+
{{ include "utils.proxysql.job_pod_settings" . | nindent 6 }}
19+
initContainers:
20+
- name: dependencies
21+
image: {{.Values.global.registry}}/loci-neutron:{{default .Values.imageVersion | required "Please set neutron.imageVersion or similar"}}
22+
imagePullPolicy: IfNotPresent
23+
command:
24+
- kubernetes-entrypoint
25+
env:
26+
- name: COMMAND
27+
value: "true"
28+
- name: NAMESPACE
29+
value: {{ .Release.Namespace }}
30+
- name: DEPENDENCY_SERVICE
31+
value: "{{ .Release.Name }}-server,{{ .Release.Name }}-ovsdb-nb,{{ .Release.Name }}-ovsdb-sb,{{ .Release.Name }}-mariadb"
32+
{{ include "utils.sentry_config" . | nindent 12 }}
33+
containers:
34+
- name: {{ .Release.Name }}-ovn-db-sync
35+
image: {{.Values.global.registry}}/loci-neutron:{{default .Values.imageVersion | required "Please set neutron.imageVersion or similar"}}
36+
imagePullPolicy: IfNotPresent
37+
command: ["dumb-init", "--"]
38+
args:
39+
- bash
40+
- -c
41+
- |
42+
set -e
43+
neutron-ovn-db-sync-util \
44+
--config-file /etc/neutron/neutron.conf \
45+
--config-file /etc/neutron/ml2-conf.ini \
46+
--config-dir /etc/neutron/secrets \
47+
--ovn-neutron_sync_mod repair
48+
{{ include "utils.script.job_finished_hook" . | nindent 14 }}
49+
env:
50+
{{ include "utils.trust_bundle.env" . | nindent 12 }}
51+
volumeMounts:
52+
- mountPath: /etc/neutron
53+
name: etc-neutron
54+
readOnly: true
55+
{{ include "utils.trust_bundle.volume_mount" . | nindent 12 }}
56+
{{ include "utils.proxysql.volume_mount" . | nindent 12 }}
57+
{{ include "utils.proxysql.container" . | nindent 8 }}
58+
volumes:
59+
- name: etc-neutron
60+
projected:
61+
defaultMode: 420
62+
sources:
63+
- configMap:
64+
items:
65+
- key: neutron.conf
66+
path: neutron.conf
67+
- key: ml2-conf.ini
68+
path: ml2-conf.ini
69+
- key: logging.conf
70+
path: logging.conf
71+
name: neutron-etc
72+
- secret:
73+
name: neutron-server-secrets
74+
items:
75+
- key: neutron-server-secrets.conf
76+
path: secrets/neutron-server-secrets.conf
77+
{{ include "utils.trust_bundle.volumes" . | nindent 8 }}
78+
{{ include "utils.proxysql.volumes" . | nindent 8 }}
79+
{{- end }}

0 commit comments

Comments
 (0)
Please sign in to comment.