Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Commit 206215c

Browse files
authored
Merge pull request #127 from portdirect/glance/command
Fix glance containers entrypoints
2 parents fc81612 + 09efab7 commit 206215c

4 files changed

Lines changed: 68 additions & 3 deletions

File tree

glance/templates/configmap-etc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ data:
1313
{{ tuple "etc/_glance-api-paste.ini.tpl" . | include "template" | indent 4 }}
1414
glance-registry.conf: |+
1515
{{ tuple "etc/_glance-registry.conf.tpl" . | include "template" | indent 4 }}
16+
glance-registry-paste.ini: |+
17+
{{ tuple "etc/_glance-registry-paste.ini.tpl" . | include "template" | indent 4 }}
1618
policy.json: |+
1719
{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }}

glance/templates/deployment-api.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,41 @@ spec:
3434
image: {{ .Values.images.api }}
3535
imagePullPolicy: {{ .Values.images.pull_policy }}
3636
command:
37-
- glance-api --config-dir /etc/glance
37+
- glance-api
38+
- --config-file
39+
- /etc/glance/glance-api.conf
3840
ports:
3941
- containerPort: {{ .Values.network.port.api }}
4042
readinessProbe:
4143
tcpSocket:
4244
port: {{ .Values.network.port.api }}
4345
volumeMounts:
46+
- name: etcglance
47+
mountPath: /etc/glance
4448
- name: glanceapiconf
4549
mountPath: /etc/glance/glance-api.conf
4650
subPath: glance-api.conf
51+
readOnly: true
4752
- name: glanceapipaste
4853
mountPath: /etc/glance/glance-api-paste.ini
4954
subPath: glance-api-paste.ini
50-
- name: etcglance
51-
mountPath: /etc/glance
55+
readOnly: true
5256
- name: glancepolicy
5357
mountPath: /etc/glance/policy.json
5458
subPath: policy.json
59+
readOnly: true
5560
{{- if .Values.development.enabled }}
5661
- name: glance-data
5762
mountPath: /var/lib/glance/images
5863
{{- else }}
5964
- name: cephconf
6065
mountPath: /etc/ceph/ceph.conf
6166
subPath: ceph.conf
67+
readOnly: true
6268
- name: cephclientglancekeyring
6369
mountPath: /etc/ceph/ceph.client.{{ .Values.ceph.glance_user }}.keyring
6470
subPath: ceph.client.{{ .Values.ceph.glance_user }}.keyring
71+
readOnly: true
6572
{{- end }}
6673
volumes:
6774
- name: glanceapiconf

glance/templates/deployment-registry.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,37 @@ spec:
2727
imagePullPolicy: {{ .Values.images.pull_policy }}
2828
command:
2929
- glance-registry
30+
- --config-file
31+
- /etc/glance/glance-registry.conf
3032
ports:
3133
- containerPort: {{ .Values.network.port.registry }}
3234
readinessProbe:
3335
tcpSocket:
3436
port: {{ .Values.network.port.registry }}
3537
volumeMounts:
38+
- name: etcglance
39+
mountPath: /etc/glance
3640
- name: glanceregistryconf
3741
mountPath: /etc/glance/glance-registry.conf
3842
subPath: glance-registry.conf
43+
readOnly: true
44+
- name: glanceregistrypaste
45+
mountPath: /etc/glance/glance-registry-paste.ini
46+
subPath: glance-registry-paste.ini
47+
readOnly: true
48+
- name: glancepolicy
49+
mountPath: /etc/glance/policy.json
50+
subPath: policy.json
51+
readOnly: true
3952
volumes:
53+
- name: etcglance
54+
emptyDir: {}
4055
- name: glanceregistryconf
4156
configMap:
4257
name: glance-etc
58+
- name: glanceregistrypaste
59+
configMap:
60+
name: glance-etc
61+
- name: glancepolicy
62+
configMap:
63+
name: glance-etc
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Use this pipeline for no auth - DEFAULT
2+
[pipeline:glance-registry]
3+
pipeline = healthcheck osprofiler unauthenticated-context registryapp
4+
5+
# Use this pipeline for keystone auth
6+
[pipeline:glance-registry-keystone]
7+
pipeline = healthcheck osprofiler authtoken context registryapp
8+
9+
# Use this pipeline for authZ only. This means that the registry will treat a
10+
# user as authenticated without making requests to keystone to reauthenticate
11+
# the user.
12+
[pipeline:glance-registry-trusted-auth]
13+
pipeline = healthcheck osprofiler context registryapp
14+
15+
[app:registryapp]
16+
paste.app_factory = glance.registry.api:API.factory
17+
18+
[filter:healthcheck]
19+
paste.filter_factory = oslo_middleware:Healthcheck.factory
20+
backends = disable_by_file
21+
disable_by_file_path = /etc/glance/healthcheck_disable
22+
23+
[filter:context]
24+
paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory
25+
26+
[filter:unauthenticated-context]
27+
paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory
28+
29+
[filter:authtoken]
30+
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
31+
32+
[filter:osprofiler]
33+
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
34+
hmac_keys = SECRET_KEY #DEPRECATED
35+
enabled = yes #DEPRECATED

0 commit comments

Comments
 (0)