Skip to content

Commit e1bcefd

Browse files
authored
Merge pull request #22 from rstudio/jon/pvc
Shared Storage Mounting for RSPM
2 parents 4446e24 + 5c188b1 commit e1bcefd

File tree

9 files changed

+22
-16
lines changed

9 files changed

+22
-16
lines changed

charts/rstudio-connect/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rstudio-connect
22
description: Kubernetes deployment for RStudio Connect
3-
version: 0.2.0-rc03
3+
version: 0.2.0-rc04
44
apiVersion: v2
55
appVersion: 1.9.0
66
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png

charts/rstudio-connect/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Kubernetes deployment for RStudio Connect
44

5-
![Version: 0.2.0-rc03](https://img.shields.io/badge/Version-0.2.0--rc03-informational?style=flat-square) ![AppVersion: 1.9.0](https://img.shields.io/badge/AppVersion-1.9.0-informational?style=flat-square)
5+
![Version: 0.2.0-rc04](https://img.shields.io/badge/Version-0.2.0--rc04-informational?style=flat-square) ![AppVersion: 1.9.0](https://img.shields.io/badge/AppVersion-1.9.0-informational?style=flat-square)
66

77
## Disclaimer
88

@@ -20,11 +20,11 @@ changes, as well as documentation below on how to use the chart
2020

2121
## Installing the Chart
2222

23-
To install the chart with the release name `my-release` at version 0.2.0-rc03:
23+
To install the chart with the release name `my-release` at version 0.2.0-rc04:
2424

2525
```bash
2626
helm repo add rstudio https://helm.rstudio.com
27-
helm install my-release rstudio/rstudio-connect --version=0.2.0-rc03
27+
helm install my-release rstudio/rstudio-connect --version=0.2.0-rc04
2828
```
2929

3030
## Required Configuration
@@ -36,7 +36,7 @@ This chart requires the following in order to function:
3636
* If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume.
3737
Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box.
3838
In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then
39-
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters.
39+
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters, or by specifying your `PersistentVolumeClaim` using `sharedStorage.name` and `sharedStorage.mount`.
4040
* If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container
4141
by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`.
4242

charts/rstudio-connect/README.md.gotmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This chart requires the following in order to function:
1616
* If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume.
1717
Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box.
1818
In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then
19-
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters.
19+
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters, or by specifying your `PersistentVolumeClaim` using `sharedStorage.name` and `sharedStorage.mount`.
2020
* If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container
2121
by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`.
2222

charts/rstudio-pm/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rstudio-pm
22
description: Kubernetes deployment for RStudio Package Manager
3-
version: 0.2.0-rc05
3+
version: 0.2.0-rc06
44
apiVersion: v2
55
appVersion: 1.2.2.1-17
66
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png

charts/rstudio-pm/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Kubernetes deployment for RStudio Package Manager
44

5-
![Version: 0.2.0-rc05](https://img.shields.io/badge/Version-0.2.0--rc05-informational?style=flat-square) ![AppVersion: 1.2.2.1-17](https://img.shields.io/badge/AppVersion-1.2.2.1--17-informational?style=flat-square)
5+
![Version: 0.2.0-rc06](https://img.shields.io/badge/Version-0.2.0--rc06-informational?style=flat-square) ![AppVersion: 1.2.2.1-17](https://img.shields.io/badge/AppVersion-1.2.2.1--17-informational?style=flat-square)
66

77
## Disclaimer
88

@@ -20,11 +20,11 @@ changes, as well as documentation below on how to use the chart
2020

2121
## Installing the Chart
2222

23-
To install the chart with the release name `my-release` at version 0.2.0-rc05:
23+
To install the chart with the release name `my-release` at version 0.2.0-rc06:
2424

2525
```bash
2626
helm repo add rstudio https://helm.rstudio.com
27-
helm install my-release rstudio/rstudio-pm --version=0.2.0-rc05
27+
helm install my-release rstudio/rstudio-pm --version=0.2.0-rc06
2828
```
2929

3030
## Required Configuration
@@ -36,7 +36,7 @@ This chart requires the following in order to function:
3636
* If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume.
3737
Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box.
3838
In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then
39-
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters.
39+
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters, or by specifying your `PersistentVolumeClaim` using `sharedStorage.name` and `sharedStorage.mount`.
4040
* If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container
4141
by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`.
4242
* Alternatively, S3 storage can be used. See the next section for details.
@@ -118,6 +118,8 @@ The values are converted into configuration files in the necessary format via go
118118
| service.type | string | `"NodePort"` | The service type (NodePort, LoadBalancer, etc.) |
119119
| sharedStorage.accessModes | list | `["ReadWriteMany"]` | accessModes defined for the storage PVC (represented as YAML) |
120120
| sharedStorage.create | bool | `false` | whether to create the persistentVolumeClaim for shared storage |
121+
| sharedStorage.mount | bool | `false` | Whether the persistentVolumeClaim should be mounted (even if not created) |
122+
| sharedStorage.name | string | `""` | The name of the pvc. By default, computes a value from the release name |
121123
| sharedStorage.path | string | `"/var/lib/rstudio-pm"` | the path to mount the sharedStorage claim within the pod |
122124
| sharedStorage.requests.storage | string | `"10Gi"` | the volume of storage to request for this persistent volume claim |
123125
| sharedStorage.storageClassName | bool | `false` | storageClassName - the type of storage to use. Must allow ReadWriteMany |

charts/rstudio-pm/README.md.gotmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This chart requires the following in order to function:
1616
* If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume.
1717
Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box.
1818
In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then
19-
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters.
19+
mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters, or by specifying your `PersistentVolumeClaim` using `sharedStorage.name` and `sharedStorage.mount`.
2020
* If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container
2121
by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`.
2222
* Alternatively, S3 storage can be used. See the next section for details.

charts/rstudio-pm/templates/deployment.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ spec:
7070
mountPath: "/var/lib/rstudio-pm/rstudio-pm.key"
7171
subPath: rstudio-pm.key
7272
{{- end }}
73-
{{- if .Values.sharedStorage.create }}
73+
{{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }}
7474
- name: rstudio-pm-data
7575
mountPath: "{{ .Values.sharedStorage.path }}"
7676
{{- end }}
@@ -140,10 +140,10 @@ spec:
140140
secretName: {{ include "rstudio-pm.fullname" . }}-rstudio-pm-key
141141
defaultMode: 0600
142142
{{- end }}
143-
{{- if .Values.sharedStorage.create }}
143+
{{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }}
144144
- name: rstudio-pm-data
145145
persistentVolumeClaim:
146-
claimName: {{ include "rstudio-pm.fullname" . }}-shared-storage
146+
claimName: {{default (print (include "rstudio-pm.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }}
147147
{{- end }}
148148
{{ include "rstudio-library.license-volume" (dict "license" ( .Values.license ) "fullName" (include "rstudio-pm.fullname" .)) | indent 6 }}
149149
{{- if .Values.pod.volumes }}

charts/rstudio-pm/templates/pvc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
kind: PersistentVolumeClaim
33
apiVersion: v1
44
metadata:
5-
name: {{ include "rstudio-pm.fullname" . }}-shared-storage
5+
name: {{default (print (include "rstudio-pm.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }}
66
namespace: {{ $.Release.Namespace }}
77
annotations:
88
"helm.sh/resource-policy": keep

charts/rstudio-pm/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ versionOverride: ""
99
sharedStorage:
1010
# -- whether to create the persistentVolumeClaim for shared storage
1111
create: false
12+
# -- The name of the pvc. By default, computes a value from the release name
13+
name: ""
14+
# -- Whether the persistentVolumeClaim should be mounted (even if not created)
15+
mount: false
1216
# -- the path to mount the sharedStorage claim within the pod
1317
path: /var/lib/rstudio-pm
1418
# -- storageClassName - the type of storage to use. Must allow ReadWriteMany

0 commit comments

Comments
 (0)