diff --git a/magnum/templates/configmap-etc.yaml b/magnum/templates/configmap-etc.yaml index 4923766ecd..5447942507 100644 --- a/magnum/templates/configmap-etc.yaml +++ b/magnum/templates/configmap-etc.yaml @@ -59,6 +59,10 @@ limitations under the License. {{- tuple "oslo_messaging" "internal" "magnum" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.magnum.DEFAULT "transport_url" | quote | trunc 0 -}} {{- end -}} +{{- if empty .Values.conf.magnum.api.port -}} +{{- tuple "container-infra" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.magnum.api "port" | quote | trunc 0 -}} +{{- end -}} + --- apiVersion: v1 kind: ConfigMap diff --git a/magnum/templates/deployment-api.yaml b/magnum/templates/deployment-api.yaml index b1bc9665a6..a0379e1dd0 100644 --- a/magnum/templates/deployment-api.yaml +++ b/magnum/templates/deployment-api.yaml @@ -64,10 +64,11 @@ spec: - /tmp/magnum-api.sh - stop ports: - - containerPort: {{ .Values.conf.magnum.api.port }} + - name: m-api + containerPort: {{ tuple "container-infra" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.conf.magnum.api.port }} + port: {{ tuple "container-infra" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: magnum-bin mountPath: /tmp/magnum-api.sh diff --git a/magnum/templates/service-api.yaml b/magnum/templates/service-api.yaml index f401f0ccb7..ea0aa4d6e5 100644 --- a/magnum/templates/service-api.yaml +++ b/magnum/templates/service-api.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: m-api - port: {{ .Values.conf.magnum.api.port }} + port: {{ tuple "container-infra" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.api.node_port.enabled }} nodePort: {{ .Values.network.api.node_port.port }} {{ end }} diff --git a/magnum/values.yaml b/magnum/values.yaml index 18c493dd42..51f12a2149 100644 --- a/magnum/values.yaml +++ b/magnum/values.yaml @@ -116,7 +116,9 @@ conf: auth_version: v3 memcache_security_strategy: ENCRYPT api: - port: 9511 + #NOTE(portdirect): the bind port should not be defined, and is manipulated + # via the endpoints section. + port: null host: 0.0.0.0 network: