diff --git a/glance/templates/configmap-etc.yaml b/glance/templates/configmap-etc.yaml index bf90267a37..9c5591cbb3 100644 --- a/glance/templates/configmap-etc.yaml +++ b/glance/templates/configmap-etc.yaml @@ -136,6 +136,14 @@ limitations under the License. {{- end -}} {{- end -}} +{{- if empty .Values.conf.glance.DEFAULT.bind_port -}} +{{- tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.glance.DEFAULT "bind_port" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.glance_registry.DEFAULT.bind_port -}} +{{- tuple "image_registry" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.glance_registry.DEFAULT "bind_port" | quote | trunc 0 -}} +{{- end -}} + --- apiVersion: v1 kind: ConfigMap diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index dfd316358c..96f74b356d 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -101,10 +101,11 @@ spec: - /tmp/glance-api.sh - stop ports: - - containerPort: {{ .Values.conf.glance.DEFAULT.bind_port }} + - name: g-api + containerPort: {{ tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.conf.glance.DEFAULT.bind_port }} + port: {{ tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: etcglance mountPath: /etc/glance diff --git a/glance/templates/deployment-registry.yaml b/glance/templates/deployment-registry.yaml index 3c0a692808..ed670bfbd4 100644 --- a/glance/templates/deployment-registry.yaml +++ b/glance/templates/deployment-registry.yaml @@ -64,10 +64,11 @@ spec: - /tmp/glance-registry.sh - stop ports: - - containerPort: {{ .Values.conf.glance_registry.DEFAULT.bind_port }} + - name: g-reg + containerPort: {{ tuple "image_registry" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.conf.glance_registry.DEFAULT.bind_port }} + port: {{ tuple "image_registry" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: etcglance mountPath: /etc/glance diff --git a/glance/templates/service-api.yaml b/glance/templates/service-api.yaml index a234ab47c9..cf3310e994 100644 --- a/glance/templates/service-api.yaml +++ b/glance/templates/service-api.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: g-api - port: {{ .Values.conf.glance.DEFAULT.bind_port }} + port: {{ tuple "image" "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/glance/templates/service-registry.yaml b/glance/templates/service-registry.yaml index 72c89140bf..34f9567178 100644 --- a/glance/templates/service-registry.yaml +++ b/glance/templates/service-registry.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: g-reg - port: {{ .Values.conf.glance_registry.DEFAULT.bind_port }} + port: {{ tuple "image_registry" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.registry.node_port.enabled }} nodePort: {{ .Values.network.registry.node_port.port }} {{ end }} diff --git a/glance/values.yaml b/glance/values.yaml index ac08ada028..75f195fb3a 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -215,7 +215,9 @@ conf: add_metadef_tags: '' glance: DEFAULT: - bind_port: 9292 + #NOTE(portdirect): the bind port should not be defined, and is manipulated + # via the endpoints section. + bind_port: null keystone_authtoken: auth_type: password auth_version: v3 @@ -261,7 +263,9 @@ conf: enabled: yes #DEPRECATED glance_registry: DEFAULT: - bind_port: 9191 + #NOTE(portdirect): the bind port should not be defined, and is manipulated + # via the endpoints section. + bind_port: null keystone_authtoken: auth_type: password auth_version: v3