openstack-helm/glance/templates/deployment-registry.yaml
Pete Birley 489b641d33 Glance Config Overrides
This commit moves Glance to use the configuration methods from Heat,
Nova, Neutron and Keystone.

It includes a _values-mvp.yaml that applies values suitable for using
a file backend, including the auto creation of a PVC.

Change-Id: I55a96982a7d0adbc118492aff4b56adf127b2cd1
2017-04-25 15:59:09 -05:00

85 lines
3.2 KiB
YAML

# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.registry }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: glance-registry
spec:
replicas: {{ .Values.replicas.registry }}
template:
metadata:
labels:
app: glance-registry
annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: glance-registry
image: {{ .Values.images.registry }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.registry.limits.cpu | quote }}
memory: {{ .Values.resources.registry.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.registry.requests.cpu | quote }}
memory: {{ .Values.resources.registry.requests.memory | quote }}
{{- end }}
command:
- glance-registry
- --config-file
- /etc/glance/glance-registry.conf
ports:
- containerPort: {{ .Values.conf.glance_registry.default.glance.registry.bind_port }}
readinessProbe:
tcpSocket:
port: {{ .Values.conf.glance_registry.default.glance.registry.bind_port }}
volumeMounts:
- name: etcglance
mountPath: /etc/glance
- name: glanceregistryconf
mountPath: /etc/glance/glance-registry.conf
subPath: glance-registry.conf
readOnly: true
- name: glanceregistrypaste
mountPath: /etc/glance/glance-registry-paste.ini
subPath: glance-registry-paste.ini
readOnly: true
- name: glancepolicy
mountPath: /etc/glance/policy.json
subPath: policy.json
readOnly: true
volumes:
- name: etcglance
emptyDir: {}
- name: glanceregistryconf
configMap:
name: glance-etc
- name: glanceregistrypaste
configMap:
name: glance-etc
- name: glancepolicy
configMap:
name: glance-etc