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:
@@ -136,6 +136,14 @@ limitations under the License.
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- 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
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
|
|||||||
@@ -101,10 +101,11 @@ spec:
|
|||||||
- /tmp/glance-api.sh
|
- /tmp/glance-api.sh
|
||||||
- stop
|
- stop
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.conf.glance.DEFAULT.bind_port }}
|
- name: g-api
|
||||||
|
containerPort: {{ tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: {{ .Values.conf.glance.DEFAULT.bind_port }}
|
port: {{ tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etcglance
|
- name: etcglance
|
||||||
mountPath: /etc/glance
|
mountPath: /etc/glance
|
||||||
|
|||||||
@@ -64,10 +64,11 @@ spec:
|
|||||||
- /tmp/glance-registry.sh
|
- /tmp/glance-registry.sh
|
||||||
- stop
|
- stop
|
||||||
ports:
|
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:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: {{ .Values.conf.glance_registry.DEFAULT.bind_port }}
|
port: {{ tuple "image_registry" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etcglance
|
- name: etcglance
|
||||||
mountPath: /etc/glance
|
mountPath: /etc/glance
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: g-api
|
- 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 }}
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
nodePort: {{ .Values.network.api.node_port.port }}
|
nodePort: {{ .Values.network.api.node_port.port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: g-reg
|
- 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 }}
|
{{ if .Values.network.registry.node_port.enabled }}
|
||||||
nodePort: {{ .Values.network.registry.node_port.port }}
|
nodePort: {{ .Values.network.registry.node_port.port }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -215,7 +215,9 @@ conf:
|
|||||||
add_metadef_tags: ''
|
add_metadef_tags: ''
|
||||||
glance:
|
glance:
|
||||||
DEFAULT:
|
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:
|
keystone_authtoken:
|
||||||
auth_type: password
|
auth_type: password
|
||||||
auth_version: v3
|
auth_version: v3
|
||||||
@@ -261,7 +263,9 @@ conf:
|
|||||||
enabled: yes #DEPRECATED
|
enabled: yes #DEPRECATED
|
||||||
glance_registry:
|
glance_registry:
|
||||||
DEFAULT:
|
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:
|
keystone_authtoken:
|
||||||
auth_type: password
|
auth_type: password
|
||||||
auth_version: v3
|
auth_version: v3
|
||||||
|
|||||||
Reference in New Issue
Block a user