From b51249a334b65ae849d071900d400c5d36dcb24c Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Fri, 6 Aug 2021 09:02:43 -0400 Subject: [PATCH 1/6] Shared Storage Mounting for RSPM --- charts/rstudio-pm/Chart.yaml | 2 +- charts/rstudio-pm/templates/deployment.yaml | 6 +++--- charts/rstudio-pm/templates/pvc.yaml | 2 +- charts/rstudio-pm/values.yaml | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/rstudio-pm/Chart.yaml b/charts/rstudio-pm/Chart.yaml index fcb6a692..13b712a7 100644 --- a/charts/rstudio-pm/Chart.yaml +++ b/charts/rstudio-pm/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-pm description: Kubernetes deployment for RStudio Package Manager -version: 0.2.0-rc05 +version: 0.2.0-rc06 apiVersion: v2 appVersion: 1.2.2.1-17 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-pm/templates/deployment.yaml b/charts/rstudio-pm/templates/deployment.yaml index 265751bb..c2bde1e1 100644 --- a/charts/rstudio-pm/templates/deployment.yaml +++ b/charts/rstudio-pm/templates/deployment.yaml @@ -70,7 +70,7 @@ spec: mountPath: "/var/lib/rstudio-pm/rstudio-pm.key" subPath: rstudio-pm.key {{- end }} - {{- if .Values.sharedStorage.create }} + {{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }} - name: rstudio-pm-data mountPath: "{{ .Values.sharedStorage.path }}" {{- end }} @@ -140,10 +140,10 @@ spec: secretName: {{ include "rstudio-pm.fullname" . }}-rstudio-pm-key defaultMode: 0600 {{- end }} - {{- if .Values.sharedStorage.create }} + {{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }} - name: rstudio-pm-data persistentVolumeClaim: - claimName: {{ include "rstudio-pm.fullname" . }}-shared-storage + claimName: {{default (print (include "rstudio-pm.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }} {{- end }} {{ include "rstudio-library.license-volume" (dict "license" ( .Values.license ) "fullName" (include "rstudio-pm.fullname" .)) | indent 6 }} {{- if .Values.pod.volumes }} diff --git a/charts/rstudio-pm/templates/pvc.yaml b/charts/rstudio-pm/templates/pvc.yaml index 1ee637d1..4d5f6cc3 100644 --- a/charts/rstudio-pm/templates/pvc.yaml +++ b/charts/rstudio-pm/templates/pvc.yaml @@ -2,7 +2,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ include "rstudio-pm.fullname" . }}-shared-storage + name: {{default (print (include "rstudio-pm.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }} namespace: {{ $.Release.Namespace }} annotations: "helm.sh/resource-policy": keep diff --git a/charts/rstudio-pm/values.yaml b/charts/rstudio-pm/values.yaml index 9675f4de..e8964f96 100644 --- a/charts/rstudio-pm/values.yaml +++ b/charts/rstudio-pm/values.yaml @@ -9,6 +9,10 @@ versionOverride: "" sharedStorage: # -- whether to create the persistentVolumeClaim for shared storage create: false + # -- The name of the pvc. By default, computes a value from the release name + name: "" + # -- Whether the persistentVolumeClaim should be mounted (even if not created) + mount: false # -- the path to mount the sharedStorage claim within the pod path: /var/lib/rstudio-pm # -- storageClassName - the type of storage to use. Must allow ReadWriteMany From 298b396c56281b31241a2adb7cf157493a9a883c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 6 Aug 2021 13:03:44 +0000 Subject: [PATCH 2/6] Update helm-docs and README.md --- charts/rstudio-pm/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/rstudio-pm/README.md b/charts/rstudio-pm/README.md index 395c9b50..bbcf0992 100644 --- a/charts/rstudio-pm/README.md +++ b/charts/rstudio-pm/README.md @@ -2,7 +2,7 @@ Kubernetes deployment for RStudio Package Manager -![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) +![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) ## Disclaimer @@ -20,11 +20,11 @@ changes, as well as documentation below on how to use the chart ## Installing the Chart -To install the chart with the release name `my-release` at version 0.2.0-rc05: +To install the chart with the release name `my-release` at version 0.2.0-rc06: ```bash helm repo add rstudio https://helm.rstudio.com -helm install my-release rstudio/rstudio-pm --version=0.2.0-rc05 +helm install my-release rstudio/rstudio-pm --version=0.2.0-rc06 ``` ## Required Configuration @@ -118,6 +118,8 @@ The values are converted into configuration files in the necessary format via go | service.type | string | `"NodePort"` | The service type (NodePort, LoadBalancer, etc.) | | sharedStorage.accessModes | list | `["ReadWriteMany"]` | accessModes defined for the storage PVC (represented as YAML) | | sharedStorage.create | bool | `false` | whether to create the persistentVolumeClaim for shared storage | +| sharedStorage.mount | bool | `false` | Whether the persistentVolumeClaim should be mounted (even if not created) | +| sharedStorage.name | string | `""` | The name of the pvc. By default, computes a value from the release name | | sharedStorage.path | string | `"/var/lib/rstudio-pm"` | the path to mount the sharedStorage claim within the pod | | sharedStorage.requests.storage | string | `"10Gi"` | the volume of storage to request for this persistent volume claim | | sharedStorage.storageClassName | bool | `false` | storageClassName - the type of storage to use. Must allow ReadWriteMany | From 083959d219580cd4762fbaf8993e3fc1c78eb560 Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Fri, 6 Aug 2021 11:13:05 -0400 Subject: [PATCH 3/6] Update READMEs for RSC and RSPM --- charts/rstudio-connect/README.md.gotmpl | 2 +- charts/rstudio-pm/README.md.gotmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rstudio-connect/README.md.gotmpl b/charts/rstudio-connect/README.md.gotmpl index 1c83cde0..0365438d 100644 --- a/charts/rstudio-connect/README.md.gotmpl +++ b/charts/rstudio-connect/README.md.gotmpl @@ -16,7 +16,7 @@ This chart requires the following in order to function: * If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume. Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box. In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then - mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters. + 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`. * If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`. diff --git a/charts/rstudio-pm/README.md.gotmpl b/charts/rstudio-pm/README.md.gotmpl index e013f1cb..1fcd3ff8 100644 --- a/charts/rstudio-pm/README.md.gotmpl +++ b/charts/rstudio-pm/README.md.gotmpl @@ -16,7 +16,7 @@ This chart requires the following in order to function: * If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume. Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box. In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then - mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters. + 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`. * If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`. * Alternatively, S3 storage can be used. See the next section for details. From 9e248b67e1d8069dbf8e2a85d5c1ff199014be4b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 6 Aug 2021 15:31:46 +0000 Subject: [PATCH 4/6] Update helm-docs and README.md --- charts/rstudio-connect/README.md | 2 +- charts/rstudio-pm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 87affa43..43229e70 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -36,7 +36,7 @@ This chart requires the following in order to function: * If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume. Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box. In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then - mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters. + 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`. * If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`. diff --git a/charts/rstudio-pm/README.md b/charts/rstudio-pm/README.md index bbcf0992..16447a74 100644 --- a/charts/rstudio-pm/README.md +++ b/charts/rstudio-pm/README.md @@ -36,7 +36,7 @@ This chart requires the following in order to function: * If `sharedStorage.create` is set, a PVC that relies on the default storage class will be created to generate the PersistentVolume. Most Kubernetes environments do not have a default storage class that you can use with `ReadWriteMany` access mode out-of-the-box. In this case, we recommend you disable `sharedStorage.create` and create your own `PersistentVolume` and `PersistentVolumeClaim`, then - mount them into the container by specifying the `pod.volumes` and `pod.volumeMounts` parameters. + 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`. * If you cannot use a `PersistentVolume` to properly mount your data directory, you'll need to mount your data in the container by using a regular [Kubernetes Volume](https://kubernetes.io/docs/concepts/storage/volumes), specified in `pod.volumes` and `pod.volumeMounts`. * Alternatively, S3 storage can be used. See the next section for details. From 38c2b14d233a672cca650f63a7d824232c3988a2 Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Fri, 6 Aug 2021 11:39:51 -0400 Subject: [PATCH 5/6] Bump RSC version --- charts/rstudio-connect/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index 7a99558d..3e9e021a 100644 --- a/charts/rstudio-connect/Chart.yaml +++ b/charts/rstudio-connect/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-connect description: Kubernetes deployment for RStudio Connect -version: 0.2.0-rc03 +version: 0.2.0-rc04 apiVersion: v2 appVersion: 1.9.0 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png From 5c188b1dc7de79d476e501b10b161dd208b0e369 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 6 Aug 2021 15:41:05 +0000 Subject: [PATCH 6/6] Update helm-docs and README.md --- charts/rstudio-connect/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 43229e70..3c22ed2d 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -2,7 +2,7 @@ Kubernetes deployment for RStudio Connect -![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) +![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) ## Disclaimer @@ -20,11 +20,11 @@ changes, as well as documentation below on how to use the chart ## Installing the Chart -To install the chart with the release name `my-release` at version 0.2.0-rc03: +To install the chart with the release name `my-release` at version 0.2.0-rc04: ```bash helm repo add rstudio https://helm.rstudio.com -helm install my-release rstudio/rstudio-connect --version=0.2.0-rc03 +helm install my-release rstudio/rstudio-connect --version=0.2.0-rc04 ``` ## Required Configuration