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

Set 0600 fileMode for rstudio-connect.gcfg #44

Closed
wants to merge 4 commits into from
Closed
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-connect/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-connect
description: Official Helm chart for RStudio Connect
version: 0.2.1
version: 0.2.2
apiVersion: v2
appVersion: 1.9.0.1
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
6 changes: 5 additions & 1 deletion charts/rstudio-connect/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.2.2

- Set `0600` file mode for rstudio-connect.gcfg

# 0.2.1

- Update docs
Expand All @@ -21,7 +25,7 @@
- Change default configuration when launcher is enabled
- Add the ability to more easily customize `launcher.kubernetes.profiles.conf`
- Set up the profiles defaults to include the init container
- Allow more easily mounting a named PVC that was not created by the chart
- Allow more easily mounting a named PVC that was not created by the chart
- Make the "target" launcher namespace configurable
- Add a default value for `service.port: 80`

Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-connect/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RStudio Connect

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![AppVersion: 1.9.0.1](https://img.shields.io/badge/AppVersion-1.9.0.1-informational?style=flat-square)
![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![AppVersion: 1.9.0.1](https://img.shields.io/badge/AppVersion-1.9.0.1-informational?style=flat-square)

#### _Official Helm chart for RStudio Connect_

Expand All @@ -23,11 +23,11 @@ As a result, please:

## Installing the Chart

To install the chart with the release name `my-release` at version 0.2.1:
To install the chart with the release name `my-release` at version 0.2.2:

```bash
helm repo add rstudio https://helm.rstudio.com
helm install my-release rstudio/rstudio-connect --version=0.2.1
helm install my-release rstudio/rstudio-connect --version=0.2.2
```

## Required Configuration
Expand Down
7 changes: 7 additions & 0 deletions charts/rstudio-connect/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ data:
rstudio-connect.gcfg: |
{{- include "rstudio-connect.config" . | nindent 4 }}
{{- if .Values.launcher.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rstudio-connect.fullname" . }}-runtime
namespace: {{ $.Release.Namespace }}
data:
runtime.yaml: |
{{- include "rstudio-connect.runtimeYaml" . | nindent 4 }}

Expand Down
9 changes: 7 additions & 2 deletions charts/rstudio-connect/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ spec:
mountPath: "/etc/rstudio-connect/rstudio-connect.gcfg"
subPath: "rstudio-connect.gcfg"
{{- if .Values.launcher.enabled }}
- name: rstudio-connect-config
- name: runtime
mountPath: "/etc/rstudio-connect/runtime.yaml"
subPath: "runtime.yaml"
- name: rstudio-connect-config
- name: runtime
mountPath: "/etc/rstudio-connect/launcher.kubernetes.profiles.conf"
subPath: "launcher.kubernetes.profiles.conf"
{{- end }}
Expand Down Expand Up @@ -163,6 +163,7 @@ spec:
- name: rstudio-connect-config
configMap:
name: {{ include "rstudio-connect.fullname" . }}-config
defaultMode: 0600
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to change the permissions for everything in the configMap, including the runtime.yaml and the JSON overrides. Is that OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch. We'll have to split those out into a separate configmap if we want to make this change. Unfortunately you can only set the defaultMode on the volume not on the volumeMount where we define the subPath

{{- if or .Values.sharedStorage.create .Values.sharedStorage.mount }}
- name: rstudio-connect-data
persistentVolumeClaim:
Expand All @@ -183,6 +184,10 @@ spec:
configMap:
name: {{ include "rstudio-connect.fullname" . }}-overrides
defaultMode: 0644
- name: runtime
configMap:
name: {{ include "rstudio-connect.fullname" . }}-runtime
defaultMode: 0644
- name: rstudio-connect-prestart
configMap:
name: {{ include "rstudio-connect.fullname" . }}-prestart
Expand Down