diff options
| author | Lars Kellogg-Stedman <lars@redhat.com> | 2014-10-10 14:49:32 -0400 |
|---|---|---|
| committer | Lars Kellogg-Stedman <lars@redhat.com> | 2014-10-13 16:43:13 -0400 |
| commit | 282345c12e44194b73674464a98e207b396a9294 (patch) | |
| tree | 2e6b41ffda1f7f085728121a27126554472f9bf3 | |
| parent | 7b682062fea256b7f8a3c714a615d20e9aa4b666 (diff) | |
| download | kolla-282345c12e44194b73674464a98e207b396a9294.tar.gz kolla-282345c12e44194b73674464a98e207b396a9294.zip | |
add kubernetes volumes to glance pod
Use kubernetes volumes for data storage rather than placing data
directly on the container filesystem. That provides a starting point
for thinking about persistent data -- one could replace the emptyDir
source with an explicit path via hostDir, and then you would have
storage that would persist over a container delete/re-create.
Change-Id: Ifade1cb2ba546e5e0207c3d8c84965dc2195716b
| -rw-r--r-- | k8s/pod/glance-pod.yaml | 62 | ||||
| -rw-r--r-- | k8s/pod/mariadb-pod.yaml | 7 |
2 files changed, 43 insertions, 26 deletions
diff --git a/k8s/pod/glance-pod.yaml b/k8s/pod/glance-pod.yaml index 09d8824ea..a7b8e2944 100644 --- a/k8s/pod/glance-pod.yaml +++ b/k8s/pod/glance-pod.yaml @@ -1,32 +1,42 @@ desiredState: manifest: + volumes: + - name: glance-data + source: + emptyDir: {} containers: - - env: - - name: DB_ROOT_PASSWORD - value: password - - name: GLANCE_KEYSTONE_PASSWORD - value: password - - name: GLANCE_DB_PASSWORD - value: password - - name: KEYSTONE_ADMIN_TOKEN - value: ADMINTOKEN - image: kollaglue/fedora-rdo-glance-registry - name: glance-registry - ports: - - containerPort: 9191 - - env: - - name: DB_ROOT_PASSWORD - value: password - - name: GLANCE_KEYSTONE_PASSWORD - value: password - - name: GLANCE_DB_PASSWORD - value: password - - name: KEYSTONE_ADMIN_TOKEN - value: ADMINTOKEN - image: kollaglue/fedora-rdo-glance-api - name: glance-api - ports: - - containerPort: 9292 + - name: glance-registry + env: + - name: DB_ROOT_PASSWORD + value: password + - name: GLANCE_KEYSTONE_PASSWORD + value: password + - name: GLANCE_DB_PASSWORD + value: password + - name: KEYSTONE_ADMIN_TOKEN + value: ADMINTOKEN + image: kollaglue/fedora-rdo-glance-registry + ports: + - containerPort: 9191 + volumeMounts: + - name: glance-data + mountPath: /var/lib/glance + - name: glance-api + env: + - name: DB_ROOT_PASSWORD + value: password + - name: GLANCE_KEYSTONE_PASSWORD + value: password + - name: GLANCE_DB_PASSWORD + value: password + - name: KEYSTONE_ADMIN_TOKEN + value: ADMINTOKEN + image: kollaglue/fedora-rdo-glance-api + ports: + - containerPort: 9292 + volumeMounts: + - name: glance-data + mountPath: /var/lib/glance id: glance-1 version: v1beta1 id: glance diff --git a/k8s/pod/mariadb-pod.yaml b/k8s/pod/mariadb-pod.yaml index 7b18a4327..493a393e6 100644 --- a/k8s/pod/mariadb-pod.yaml +++ b/k8s/pod/mariadb-pod.yaml @@ -1,5 +1,9 @@ desiredState: manifest: + volumes: + - name: mariadb-data + source: + emptyDir: {} containers: - env: - name: DB_ROOT_PASSWORD @@ -8,6 +12,9 @@ desiredState: name: mariadb ports: - containerPort: 3306 + volumeMounts: + - name: mariadb-data + mountPath: /var/lib/mysql id: mariadb-1 version: v1beta1 id: mariadb |
