Glance: use endpoints section and lookups to set port
This PS moves glance to use the endpoints section and lookups to set the port it serves on. Change-Id: Ic22e5d59b0821b8482bcbfab1a72180f0b7375a8
This commit is contained in:
parent
32c5f8c65c
commit
b696c25d5d
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user