Skip to content
Snippets Groups Projects
Commit a71c7eff authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Merge branch 'add-storage' into 'helm'

Add storage

See merge request !22
parents c35050bc e307c88b
No related branches found
No related tags found
1 merge request!22Add storage
Pipeline #131516 passed
Pipeline: shiny-k8s-example

#131517

    ......@@ -15,7 +15,7 @@ type: application
    # This is the chart version. This version number should be incremented each time you make changes
    # to the chart and its templates, including the app version.
    # Versions are expected to follow Semantic Versioning (https://semver.org/)
    version: 0.6.3
    version: 0.7.0
    # This is the version number of the application being deployed. This version number should be
    # incremented each time you make changes to the application. Versions are not expected to
    ......
    ......@@ -39,6 +39,21 @@ spec:
    - name: http
    containerPort: 3838
    protocol: TCP
    {{- if and .Values.storage.enabled }}
    volumeMounts:
    - name: persistent-storage
    mountPath: /srv/shiny-server/www/persistent
    subPath: www
    - name: persistent-storage
    mountPath: /srv/shiny-server/data
    subPath: data
    {{- end }}
    resources:
    {{- toYaml .Values.resources | nindent 12 }}
    {{- if and .Values.storage.enabled }}
    volumes:
    - name: persistent-storage
    persistentVolumeClaim:
    claimName: {{ include "chart.fullname" . }}
    {{- end }}
    ---
    \ No newline at end of file
    {{- if .Values.storage.enabled }}
    {{- if and (eq .Values.storage.className "ceph-block") .Values.nodowntime.enabled }}
    {{- required "Using ceph-block storage is incompatible with nodowntime enabled." "" }}
    {{- end }}
    {{- if not (or (eq .Values.storage.className "ceph-block") (eq .Values.storage.className "isilon")) }}
    {{- required (printf "Storage class unkown (%s). Only isilon or ceph-block expected." .Values.storage.className) "" }}
    {{- end }}
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: {{ include "chart.fullname" . }}
    {{- if .Values.storage.keepOnDelete }}
    annotations:
    "helm.sh/resource-policy": "keep"
    {{- end }}
    labels:
    {{- include "chart.labels" . | nindent 4 }}
    spec:
    accessModes:
    - {{if eq .Values.storage.className "ceph-block" }}"ReadWriteOnce"{{else}}"ReadWriteMany"{{end}}
    resources:
    requests:
    storage: {{ (default "1Gi" .Values.storage.size ) | quote }}
    storageClassName: {{ (default "isilon" .Values.storage.className ) | quote }}
    {{- end }}
    \ No newline at end of file
    ......@@ -31,4 +31,11 @@ ingress:
    registry:
    private: false
    \ No newline at end of file
    private: false
    storage:
    enabled: false
    size: "1Gi"
    className: "isilon" # could be ceph-block, incompatible with nodowntime
    keepOnDelete: true
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment