Mistral: use endpoints section and lookups to set port

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

Change-Id: I3cbe2d5359a616595c2145fd23d6be65fcc77b3f
This commit is contained in:
Pete Birley 2018-03-03 18:23:09 +00:00
parent 16c6d31155
commit 02136ea2f1
4 changed files with 12 additions and 6 deletions

View File

@ -61,6 +61,10 @@ limitations under the License.
{{- tuple "oslo_messaging" "internal" "mistral" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.mistral.DEFAULT "transport_url" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.mistral.api.port -}}
{{- tuple "workflow" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.mistral.api "port" | quote | trunc 0 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap

View File

@ -63,11 +63,11 @@ spec:
- /tmp/mistral-api.sh
- stop
ports:
- name: {{ .Values.network.api.name }}
containerPort: {{ .Values.conf.mistral.api.port }}
- name: w-api
containerPort: {{ tuple "workflow" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
port: {{ .Values.conf.mistral.api.port }}
port: {{ tuple "workflow" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-etc-mistral
mountPath: /etc/mistral

View File

@ -24,7 +24,7 @@ metadata:
spec:
ports:
- name: w-api
port: {{ .Values.conf.mistral.api.port }}
port: {{ tuple "workflow" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ if .Values.network.api.node_port.enabled }}
nodePort: {{ .Values.network.api.node_port.port }}
{{ end }}

View File

@ -311,10 +311,12 @@ conf:
DEFAULT:
transport_url: null
api:
port: 8989
#NOTE(portdirect): the bind port should not be defined, and is manipulated
# via the endpoints section.
port: null
api_workers: 8
coordination:
backend_url:
backend_url: null
database:
max_retries: -1
keystone_authtoken: