Merge "ovn: make gateway label configurable"

This commit is contained in:
Zuul 2024-11-02 01:18:53 +00:00 committed by Gerrit Code Review
commit f10f516d2b
7 changed files with 11 additions and 8 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v23.3.0
description: OpenStack-Helm OVN
name: ovn
version: 0.1.13
version: 0.1.14
home: https://www.ovn.org
icon: https://www.ovn.org/images/ovn-logo.png
sources:

View File

@ -119,7 +119,7 @@ ovs-vsctl set open . external-ids:ovn-bridge="{{ .Values.conf.ovn_bridge }}"
ovs-vsctl set open . external-ids:ovn-bridge-mappings="{{ .Values.conf.ovn_bridge_mappings }}"
GW_ENABLED=$(cat /tmp/gw-enabled/gw-enabled)
if [[ ${GW_ENABLED} == enabled ]]; then
if [[ ${GW_ENABLED} == {{ .Values.labels.ovn_controller_gw.node_selector_value }} ]]; then
ovs-vsctl set open . external-ids:ovn-cms-options={{ .Values.conf.ovn_cms_options_gw_enabled }}
else
ovs-vsctl set open . external-ids:ovn-cms-options={{ .Values.conf.ovn_cms_options }}

View File

@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.daemonset_controller }}
{{- if .Values.manifests.daemonset_ovn_controller }}
{{- $envAll := . }}
{{- $configMapName := "ovn-etc" }}
@ -71,7 +71,7 @@ spec:
hostNetwork: true
hostPID: true
hostIPC: true
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: {{ .Values.pod.dns_policy }}
nodeSelector:
{{ .Values.labels.ovn_controller.node_selector_key }}: {{ .Values.labels.ovn_controller.node_selector_value }}
initContainers:
@ -82,7 +82,7 @@ spec:
- /bin/bash
- -c
- |
kubectl get node ${NODENAME} -o jsonpath='{.metadata.labels.l3-agent}' > /tmp/gw-enabled/gw-enabled
kubectl get node ${NODENAME} -o jsonpath='{.metadata.labels.{{ .Values.labels.ovn_controller_gw.node_selector_key }}}' > /tmp/gw-enabled/gw-enabled
env:
- name: NODENAME
valueFrom:

View File

@ -58,7 +58,7 @@ spec:
- name: OVS_DATABASE
value: nb
- name: OVS_PORT
value: "{{ tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}"
value: {{ tuple "ovn-ovsdb-nb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
command:
- /tmp/ovsdb-server.sh
- start

View File

@ -58,7 +58,7 @@ spec:
- name: OVS_DATABASE
value: sb
- name: OVS_PORT
value: "{{ tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}"
value: {{ tuple "ovn-ovsdb-sb" "internal" "ovsdb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
command:
- /tmp/ovsdb-server.sh
- start

View File

@ -47,6 +47,9 @@ labels:
ovn_controller:
node_selector_key: openvswitch
node_selector_value: enabled
ovn_controller_gw:
node_selector_key: l3-agent
node_selector_value: enabled
volume:
ovn_ovsdb_nb:
@ -312,7 +315,6 @@ manifests:
configmap_bin: true
configmap_etc: true
deployment_northd: true
daemonset_controller: true
service_ovn_ovsdb_nb: true
service_ovn_ovsdb_sb: true
statefulset_ovn_ovsdb_nb: true

View File

@ -14,4 +14,5 @@ ovn:
- 0.1.11 Use quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal by default
- 0.1.12 Fix oci_image_registry secret name
- 0.1.13 Allow share OVN DB NB/SB socket
- 0.1.14 Make the label for OVN controller gateway configurable
...