Neutron: use endpoints section and lookups to set port

This PS moves neutron to use the endpoints section and lookups to
set the port it serves on.

Change-Id: I3a31b55aac62732a12f6c05385dba891ac8cc495
This commit is contained in:
Pete Birley 2018-03-03 16:43:04 +00:00
parent 16c6d31155
commit ed8bd52b7a
4 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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 }}

View File

@ -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