From b7150eb0b42df73e3ae5a04dcd97f45207944569 Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Thu, 25 May 2017 16:50:34 +0000 Subject: [PATCH] Allow glance to use file method Allow glance to use the "pvc" method, this was previously called file but has been renamed for clarity. We now require Kubernetes 1.6 or later; remove the storage annotation in favor of storageClassName. Change-Id: I315eaf68937f91b56c1a26954072bda53767c606 --- glance/templates/deployment-api.yaml | 4 ++-- glance/templates/pvc-images.yaml | 5 ++--- glance/values.yaml | 3 ++- tools/overrides/mvp/glance.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index 148795aa..8ec5c78d 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -80,7 +80,7 @@ spec: mountPath: /etc/glance/policy.json subPath: policy.json readOnly: true -{{- if eq .Values.storage "file" }} +{{- if eq .Values.storage "pvc" }} - name: glance-images mountPath: {{ .Values.conf.glance.glance_store.glance.store.filesystem_store_datadir }} {{- else }} @@ -98,7 +98,7 @@ spec: - name: glance-etc configMap: name: glance-etc -{{- if eq .Values.storage "file" }} +{{- if eq .Values.storage "pvc" }} - name: glance-images persistentVolumeClaim: claimName: glance-images diff --git a/glance/templates/pvc-images.yaml b/glance/templates/pvc-images.yaml index 469ee429..3a346283 100644 --- a/glance/templates/pvc-images.yaml +++ b/glance/templates/pvc-images.yaml @@ -12,16 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -{{- if eq .Values.storage "file" }} +{{- if eq .Values.storage "pvc" }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: glance-images - annotations: - {{ .Values.volume.class_path }}: {{ .Values.volume.class_name }} spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: {{ .Values.volume.size }} + storageClassName: {{ .Values.volume.class_name }} {{- end }} diff --git a/glance/values.yaml b/glance/values.yaml index 099c03a4..5b8ece23 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -21,6 +21,7 @@ replicas: api: 1 registry: 1 +# ceph or pvc storage: ceph labels: @@ -118,6 +119,7 @@ conf: rbd_store_pool: images rbd_store_user: admin rbd_store_ceph_conf: /etc/ceph/ceph.conf + filesystem_store_datadir: /var/lib/glance/store paste_registry: override: append: @@ -153,7 +155,6 @@ network: port: 30091 volume: - class_path: volume.beta.kubernetes.io/storage-class class_name: general size: 2Gi diff --git a/tools/overrides/mvp/glance.yaml b/tools/overrides/mvp/glance.yaml index d8c81f5a..215e672f 100644 --- a/tools/overrides/mvp/glance.yaml +++ b/tools/overrides/mvp/glance.yaml @@ -17,7 +17,7 @@ # OpenStack-Helm Single node gates, and local development use. It should be # kept to the bare minimum required for this purpose. -storage: file +storage: pvc conf: glance: