diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index 1dc3144225..63ea5ed167 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -92,6 +92,9 @@ limitations under the License. {{- end -}} {{- end -}} +{{- if empty .Values.conf.cinder.DEFAULT.osapi_volume_listen_port -}} +{{- tuple "volume" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.cinder.DEFAULT "osapi_volume_listen_port" | quote | trunc 0 -}} +{{- end -}} --- apiVersion: v1 kind: ConfigMap diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index 820daea953..9daadc3c12 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -80,10 +80,10 @@ spec: - stop ports: - name: c-api - containerPort: {{ .Values.conf.cinder.DEFAULT.osapi_volume_listen_port }} + containerPort: {{ tuple "volume" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.conf.cinder.DEFAULT.osapi_volume_listen_port }} + port: {{ tuple "volume" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: cinder-bin mountPath: /tmp/cinder-api.sh diff --git a/cinder/templates/service-api.yaml b/cinder/templates/service-api.yaml index a009e764ff..d52697a71b 100644 --- a/cinder/templates/service-api.yaml +++ b/cinder/templates/service-api.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: c-api - port: {{ .Values.conf.cinder.DEFAULT.osapi_volume_listen_port }} + port: {{ tuple "volume" "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/cinder/values.yaml b/cinder/values.yaml index 70fca277ad..2377c7016a 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -447,7 +447,9 @@ conf: glance_api_version: 2 os_region_name: RegionOne host: cinder-volume-worker - osapi_volume_listen_port: 8776 + #NOTE(portdirect): the bind port should not be defined, and is manipulated + # via the endpoints section. + osapi_volume_listen_port: null enabled_backends: "rbd1" # NOTE(portdirect): "cinder.backup.drivers.swift" and # "cinder.backup.drivers.posix" also supported