Skip to content

Instantly share code, notes, and snippets.

@coulof
Last active June 9, 2020 09:16
Show Gist options
  • Save coulof/25d38cc5fc58fa16df71f2e87dfcb840 to your computer and use it in GitHub Desktop.
Save coulof/25d38cc5fc58fa16df71f2e87dfcb840 to your computer and use it in GitHub Desktop.
{{ if eq .Values.tag "latest"}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: todosdb{{ .Values.tag }}
namespace: {{ .Values.ns }}
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: {{ .Values.sc }}
{{ else }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: todosdb{{ .Values.tag }}
namespace: {{ .Values.ns }}
spec:
storageClassName: {{ .Values.sc }}
dataSource:
name: todosdblatest-snap
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
{{ end }}
apiVersion: v1
kind: ResourceQuota
metadata:
name: storagequota
spec:
hard:
persistentvolumeclaims: "1"
requests.storage: "5Gi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment