Skip to content

Commit

Permalink
Merge pull request #563 from rstudio/tylfin/fix-fsGroup-section
Browse files Browse the repository at this point in the history
Fix: Move PPM `fsGroup` setting to `securityContext`
  • Loading branch information
tylfin authored Sep 30, 2024
2 parents f6174fc + e32d012 commit 76b4923
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
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 Posit Package Manager
version: 0.5.34
version: 0.5.35
apiVersion: v2
appVersion: 2024.08.2
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
7 changes: 6 additions & 1 deletion charts/rstudio-pm/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

## 0.5.35

- Move `pod.containerSecurityContext.fsGroup = 999` to `pod.securityContext.fsGroup` to resolve
the helm warning `unknown field "spec.template.spec.containers[0].securityContext.fsGroup"`.

## 0.5.34

- Add `pod.securityContext.fsGroup = 999` value to set file permissions correctly when using shared storage.
- Add `pod.containerSecurityContext.fsGroup = 999` value to set file permissions correctly when using shared storage.

## 0.5.33

Expand Down
10 changes: 5 additions & 5 deletions charts/rstudio-pm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Package Manager

![Version: 0.5.34](https://img.shields.io/badge/Version-0.5.34-informational?style=flat-square) ![AppVersion: 2024.08.2](https://img.shields.io/badge/AppVersion-2024.08.2-informational?style=flat-square)
![Version: 0.5.35](https://img.shields.io/badge/Version-0.5.35-informational?style=flat-square) ![AppVersion: 2024.08.2](https://img.shields.io/badge/AppVersion-2024.08.2-informational?style=flat-square)

#### _Official Helm chart for Posit Package Manager_

Expand All @@ -24,11 +24,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.5.34:
To install the chart with the release name `my-release` at version 0.5.35:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.34
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.35
```

To explore other chart versions, look at:
Expand Down Expand Up @@ -222,11 +222,11 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config
| nameOverride | string | `""` | the name of the chart deployment (can be overridden) |
| nodeSelector | object | `{}` | A map used verbatim as the pod's "nodeSelector" definition |
| pod.annotations | object | `{}` | annotations is a map of keys / values that will be added as annotations to the pods |
| pod.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"fsGroup":999,"runAsNonRoot":true,"runAsUser":999,"seccompProfile":{"type":"{{ if .Values.enableSandboxing }}Unconfined{{ else }}RuntimeDefault{{ end }}"}}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the main Package Manager container. Evaluated as a template. |
| pod.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"runAsNonRoot":true,"runAsUser":999,"seccompProfile":{"type":"{{ if .Values.enableSandboxing }}Unconfined{{ else }}RuntimeDefault{{ end }}"}}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the main Package Manager container. Evaluated as a template. |
| pod.env | list | `[]` | env is an array of maps that is injected as-is into the "env:" component of the pod.container spec |
| pod.labels | object | `{}` | Additional labels to add to the rstudio-pm pods |
| pod.lifecycle | object | `{}` | Container [lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) |
| pod.securityContext | object | `{}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod |
| pod.securityContext | object | `{"fsGroup":999}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod |
| pod.serviceAccountName | string | `""` | Deprecated, use `serviceAccount.name` instead |
| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown |
| pod.volumeMounts | list | `[]` | volumeMounts is an array of maps that is injected as-is into the "volumeMounts" component of the pod spec |
Expand Down
4 changes: 2 additions & 2 deletions charts/rstudio-pm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ pod:
# -- Container [lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/)
lifecycle: {}
# -- the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod
securityContext: {}
securityContext:
fsGroup: 999
# -- the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the main Package Manager container. Evaluated as a template.
containerSecurityContext:
runAsUser: 999
fsGroup: 999
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit 76b4923

Please sign in to comment.