Distinguish between port number of internal endpoint and binding
port number in neutron Now binding ports of service and pod spec are configured using internal endpoint values. To support reverse proxy for internalUrl, need to distinguish between binding ports and internal endpoint ports. I added `service` section in endpoint items apart from admin,public ,internal and default. Change-Id: I38dca50a8462faa4e9a7eeed56839b1b996eae06
This commit is contained in:
parent
350d55baad
commit
52bdfae2bf
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Neutron
|
||||
name: neutron
|
||||
version: 0.2.26
|
||||
version: 0.2.27
|
||||
home: https://docs.openstack.org/neutron/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
|
||||
sources:
|
||||
|
@ -161,7 +161,7 @@ just set it along with nova_metadata_host.
|
||||
{{- 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" -}}
|
||||
{{- $_ := tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.neutron.DEFAULT "bind_port" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
||||
|
@ -14,12 +14,12 @@ limitations under the License.
|
||||
|
||||
{{- define "bagpipeBgpLivenessProbeTemplate" }}
|
||||
tcpSocket:
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bagpipeBgpReadinessProbeTemplate" }}
|
||||
tcpSocket:
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "neutron.bagpipe_bgp.daemonset" }}
|
||||
|
@ -18,13 +18,13 @@ exec:
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
|
||||
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
|
||||
initialDelaySeconds: 30
|
||||
{{- else }}
|
||||
httpGet:
|
||||
scheme: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
scheme: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: /
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- define "serverLivenessProbeTemplate" }}
|
||||
@ -33,13 +33,13 @@ exec:
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
|
||||
- "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')"
|
||||
initialDelaySeconds: 30
|
||||
{{- else }}
|
||||
httpGet:
|
||||
scheme: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
scheme: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }}
|
||||
path: /
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@ -113,10 +113,10 @@ spec:
|
||||
{{ dict "envAll" $envAll "application" "neutron_server" "container" "nginx" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||
ports:
|
||||
- name: q-api
|
||||
containerPort: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
containerPort: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
env:
|
||||
- name: PORT
|
||||
value: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||
value: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
@ -127,7 +127,7 @@ spec:
|
||||
httpGet:
|
||||
scheme: HTTPS
|
||||
path: /
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
command:
|
||||
- /tmp/nginx.sh
|
||||
- start
|
||||
@ -172,7 +172,7 @@ spec:
|
||||
- stop
|
||||
ports:
|
||||
- name: q-api
|
||||
containerPort: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
containerPort: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
volumeMounts:
|
||||
- name: pod-tmp
|
||||
mountPath: /tmp
|
||||
|
@ -22,7 +22,7 @@ metadata:
|
||||
spec:
|
||||
ports:
|
||||
- name: q-api
|
||||
port: {{ tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
port: {{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{ if .Values.network.server.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.server.node_port.port }}
|
||||
{{ end }}
|
||||
|
@ -2441,10 +2441,12 @@ endpoints:
|
||||
default: null
|
||||
scheme:
|
||||
default: 'http'
|
||||
service: 'http'
|
||||
port:
|
||||
api:
|
||||
default: 9696
|
||||
public: 80
|
||||
service: 9696
|
||||
load_balancer:
|
||||
name: octavia
|
||||
hosts:
|
||||
|
@ -40,4 +40,5 @@ neutron:
|
||||
- 0.2.24 Added OCI registry authentication
|
||||
- 0.2.25 Support TLS endpoints
|
||||
- 0.2.26 Use HTTP probe instead of TCP probe
|
||||
- 0.2.27 Distinguish between port number of internal endpoint and binding port number
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user