openscanhub: add persistent storage for redis
Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>
This commit is contained in:
parent
c2862e1e8b
commit
914de65fe9
3 changed files with 25 additions and 1 deletions
|
@ -78,6 +78,10 @@
|
||||||
when: env == "staging"
|
when: env == "staging"
|
||||||
|
|
||||||
# Configurations for redis.
|
# Configurations for redis.
|
||||||
|
- role: openshift/object
|
||||||
|
app: openscanhub
|
||||||
|
template: pvc-var-lib-redis-data.yml
|
||||||
|
objectname: pvc-var-lib-redis-data
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: openscanhub
|
app: openscanhub
|
||||||
file: deployment-redis-6-c9s.yml
|
file: deployment-redis-6-c9s.yml
|
||||||
|
|
|
@ -53,7 +53,7 @@ spec:
|
||||||
terminationMessagePolicy: File
|
terminationMessagePolicy: File
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/lib/redis/data
|
- mountPath: /var/lib/redis/data
|
||||||
name: redis-6-c9s-1
|
name: pvc-var-lib-redis-data
|
||||||
dnsPolicy: ClusterFirst
|
dnsPolicy: ClusterFirst
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
schedulerName: default-scheduler
|
schedulerName: default-scheduler
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-var-lib-redis-data
|
||||||
|
spec:
|
||||||
|
# TODO: This name should be set when `storageClassName` is NFS
|
||||||
|
# volumeName: fedora-openscanhub-var-lib-osh-{{env_short}}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
# This should be manually expanded when production
|
||||||
|
# has gone beyond this limit.
|
||||||
|
{% if env == "staging" %}
|
||||||
|
storage: 1Gi
|
||||||
|
{% else %}
|
||||||
|
storage: 2Gi
|
||||||
|
{% endif %}
|
||||||
|
storageClassName: 'ocs-storagecluster-cephfs'
|
||||||
|
volumeMode: Filesystem
|
Loading…
Add table
Add a link
Reference in a new issue