diff --git a/neutron/templates/configmap-etc.yaml b/neutron/templates/configmap-etc.yaml index 069599e3a3..9474be967e 100644 --- a/neutron/templates/configmap-etc.yaml +++ b/neutron/templates/configmap-etc.yaml @@ -128,6 +128,10 @@ limitations under the License. {{- end -}} {{- end -}} +{{- if empty .Values.conf.neutron.DEFAULT.bind_port -}} +{{- tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.neutron.DEFAULT "bind_port" | quote | trunc 0 -}} +{{- end -}} + --- apiVersion: v1 kind: ConfigMap diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml index 76749ba3a7..468cb9ae31 100644 --- a/neutron/templates/deployment-server.yaml +++ b/neutron/templates/deployment-server.yaml @@ -66,10 +66,11 @@ spec: - /tmp/neutron-server.sh - stop ports: - - containerPort: {{ .Values.network.server.port }} + - name: q-api + containerPort: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.network.server.port }} + port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: neutron-bin mountPath: /tmp/neutron-server.sh diff --git a/neutron/templates/service-server.yaml b/neutron/templates/service-server.yaml index c7287eeb0d..cf346ca21e 100644 --- a/neutron/templates/service-server.yaml +++ b/neutron/templates/service-server.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: q-api - port: {{ .Values.network.server.port }} + port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.server.node_port.enabled }} nodePort: {{ .Values.network.server.node_port.port }} {{ end }} diff --git a/neutron/values.yaml b/neutron/values.yaml index 509a4c200c..3ffe65bc4f 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -95,7 +95,6 @@ network: # br0: if0 # br1: iface_two server: - port: 9696 ingress: public: true annotations: @@ -951,6 +950,9 @@ conf: append: neutron: DEFAULT: + #NOTE(portdirect): the bind port should not be defined, and is manipulated + # via the endpoints section. + bind_port: null default_availability_zones: nova api_workers: 4 allow_overlapping_ips: True