Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to using a volume instead of an env var for encryption key #410

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/rstudio-pm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-pm
description: Official Helm chart for RStudio Package Manager
version: 0.5.13
version: 0.5.14-rc01
apiVersion: v2
appVersion: 2023.04.0
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-pm/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.5.14-rc01

- Switch PM encryption key to use a volume instead of environment variable

# 0.5.13

- Change default operating system from `bionic` to `ubuntu2204` (`jammy`)
Expand Down
12 changes: 8 additions & 4 deletions charts/rstudio-pm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RStudio Package Manager

![Version: 0.5.13](https://img.shields.io/badge/Version-0.5.13-informational?style=flat-square) ![AppVersion: 2023.04.0](https://img.shields.io/badge/AppVersion-2023.04.0-informational?style=flat-square)
![Version: 0.5.14-rc01](https://img.shields.io/badge/Version-0.5.14--rc01-informational?style=flat-square) ![AppVersion: 2023.04.0](https://img.shields.io/badge/AppVersion-2023.04.0-informational?style=flat-square)

#### _Official Helm chart for RStudio Package Manager_

Expand All @@ -21,16 +21,20 @@ To ensure a stable production deployment, please:

## Installing the Chart

To install the chart with the release name `my-release` at version 0.5.13:
To install the chart with the release name `my-release` at version 0.5.14-rc01:

```bash
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.13
# to install latest release (NOTE: `--version` flag still recommended!)
helm upgrade --install my-release rstudio/rstudio-pm

# WARNING: to install devel version / release candidate / etc.
helm upgrade --install --devel my-release rstudio/rstudio-pm --version=0.5.14-rc01
```

To explore other chart versions, take a look at:
```
helm search repo rstudio/rstudio-pm -l
helm search repo --devel rstudio/rstudio-pm -l
```

## Upgrade Guidance
Expand Down
18 changes: 11 additions & 7 deletions charts/rstudio-pm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ spec:
{{- if .Values.pod.env }}
{{- toYaml .Values.pod.env | nindent 8 }}
{{- end }}
{{- if .Values.rstudioPMKey }}
- name: PACKAGEMANAGER_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: {{ include "rstudio-pm.fullname" . }}-rstudio-pm-key
key: rstudio-pm.key
{{- end }}
{{- if (not .Values.enableSandboxing) }}
- name: PACKAGEMANAGER_GIT_ALLOWUNSANDBOXEDGITBUILDS
value: "1"
Expand Down Expand Up @@ -116,6 +109,11 @@ spec:
- name: rstudio-pm-config
mountPath: "/etc/rstudio-pm/rstudio-pm.gcfg"
subPath: "rstudio-pm.gcfg"
{{- if .Values.rstudioPMKey }}
- name: key-volume
mountPath: /var/lib/rstudio-pm/rstudio-pm.key
subPath: rstudio-pm.key
{{- end }}
{{- if .Values.awsAccessKeyId }}
- name: aws-creds
readOnly: true
Expand Down Expand Up @@ -173,6 +171,12 @@ spec:
items:
- key: rstudio-pm.gcfg
path: "rstudio-pm.gcfg"
{{- if .Values.rstudioPMKey }}
- name: key-volume
secret:
secretName: {{ include "rstudio-pm.fullname" . }}-rstudio-pm-key
defaultMode: 0600
{{- end }}
{{- if .Values.awsAccessKeyId }}
- name: aws-creds
secret:
Expand Down
Loading