Skip to content

Commit 9813ec3

Browse files
committed
Add session.components for init container delivery
Change the default session image from rstudio/r-session-complete to rstudio/workbench-session and enable session component delivery via init containers by default. The launcher configures a workbench-session-init container that injects Workbench session components into session pods at startup. - Add session.components.enabled (default true) and session.components.sessionInit values for init container config - Configure rserver.conf with launcher-sessions-auto-update and launcher-sessions-init-container-image-{name,tag} when both launcher and components are enabled - When launcher is disabled, components are silently ignored - Set session.components.enabled=false and session.image.repository to rstudio/r-session-complete to restore classic behavior - Bump chart version to 0.11.0 (breaking change)
1 parent 290b410 commit 9813ec3

File tree

8 files changed

+179
-9
lines changed

8 files changed

+179
-9
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ charts/<chart-name>/
4848
### Documentation Generation
4949
- READMEs are auto-generated using helm-docs from `README.md.gotmpl` templates
5050
- Never edit `README.md` directly - edit the `.gotmpl` template
51-
- CI auto-generates and commits docs back to PRs
51+
- Run `just docs` locally before committing — CI will reject uncommitted changes
5252

5353
## Critical Workflow Requirements
5454

charts/rstudio-workbench/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rstudio-workbench
22
description: Official Helm chart for Posit Workbench
3-
version: 0.10.12
3+
version: 0.11.0
44
apiVersion: v2
55
appVersion: 2026.01.1
66
icon:

charts/rstudio-workbench/NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22

33

4+
## 0.11.0
5+
6+
- **BREAKING**: Change default session image from `rstudio/r-session-complete` to `rstudio/workbench-session` and enable session component delivery via init containers by default
7+
- Add `session.components` values for configuring session component init containers.
8+
Set `session.components.enabled: false` and `session.image.repository: rstudio/r-session-complete` to restore the previous behavior
9+
410
## 0.10.12
511

612
- Fix invalid JSON in default `positron-user-settings.json`

charts/rstudio-workbench/README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Posit Workbench
22

3-
![Version: 0.10.12](https://img.shields.io/badge/Version-0.10.12-informational?style=flat-square) ![AppVersion: 2026.01.1](https://img.shields.io/badge/AppVersion-2026.01.1-informational?style=flat-square)
3+
![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square) ![AppVersion: 2026.01.1](https://img.shields.io/badge/AppVersion-2026.01.1-informational?style=flat-square)
44

55
#### _Official Helm chart for Posit Workbench_
66

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

2525
## Installing the chart
2626

27-
To install the chart with the release name `my-release` at version 0.10.12:
27+
To install the chart with the release name `my-release` at version 0.11.0:
2828

2929
```{.bash}
3030
helm repo add rstudio https://helm.rstudio.com
31-
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.10.12
31+
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.11.0
3232
```
3333

3434
To explore other chart versions, look at:
@@ -172,6 +172,22 @@ Alternatively, database passwords may be set during `helm install` with the foll
172172

173173
`--set config.secret.'database\.conf'.password="<YOUR_PASSWORD_HERE>"`
174174

175+
## Session images
176+
177+
By default, session pods use the `rstudio/workbench-session` image with an init container
178+
(`rstudio/workbench-session-init`) that delivers Workbench session components at pod startup.
179+
180+
To use the classic all-in-one `r-session-complete` image instead (which bundles all components
181+
into a single image), disable session components and change the session image:
182+
183+
```yaml
184+
session:
185+
image:
186+
repository: "rstudio/r-session-complete"
187+
components:
188+
enabled: false
189+
```
190+
175191
## General principles
176192

177193
- In most places, we opt to pass Helm values directly into ConfigMaps. We automatically translate these into the
@@ -696,12 +712,16 @@ Use of [Sealed secrets](https://github.com/bitnami-labs/sealed-secrets) disables
696712
| serviceMonitor.additionalLabels | object | `{}` | additionalLabels normally includes the release name of the Prometheus Operator |
697713
| serviceMonitor.enabled | bool | `false` | Whether to create a ServiceMonitor CRD for use with a Prometheus Operator |
698714
| serviceMonitor.namespace | string | `""` | Namespace to create the ServiceMonitor in (usually the same as the one in which the Prometheus Operator is running). Defaults to the release namespace |
715+
| session.components | object | `{"enabled":true,"sessionInit":{"repository":"rstudio/workbench-session-init","tag":""}}` | Session component delivery via init containers. When enabled (default), the chart configures rserver.conf so the launcher injects init containers into session pods at startup. Set `enabled: false` and change `session.image.repository` to `rstudio/r-session-complete` to use the classic all-in-one session image instead. |
716+
| session.components.enabled | bool | `true` | Enable session component delivery via init containers. When false, no init containers are configured and session.image must be a self-contained image like r-session-complete. |
717+
| session.components.sessionInit.repository | string | `"rstudio/workbench-session-init"` | The repository for the session init container image |
718+
| session.components.sessionInit.tag | string | `""` | A tag override for the session init container. Default tag is the chart appVersion (or versionOverride) |
699719
| session.defaultConfigMount | bool | `true` | Whether to automatically mount the config.session configuration into session pods. If launcher.namespace is different from Release Namespace, then the chart will duplicate the session configmap in both namespaces to facilitate this |
700720
| session.defaultHomeMount | bool | `true` | Whether to automatically add the homeStorage PVC to the session (i.e. via the `launcher-mounts` file) |
701721
| session.defaultSecretMountPath | string | `"/mnt/session-secret/"` | The path to mount the sessionSecret (from `config.sessionSecret`) onto the server and session pods |
702-
| session.image.repository | string | `"rstudio/r-session-complete"` | The repository to use for the session image |
722+
| session.image.repository | string | `"rstudio/workbench-session"` | The repository to use for the session image |
703723
| session.image.tag | string | `""` | A tag override for the session image. Overrides the "tagPrefix" above, if set. Default tag is `{{ tagPrefix }}{{ version }}` |
704-
| session.image.tagPrefix | string | `"ubuntu2204-"` | A tag prefix for session images (common selections: ubuntu2204-, centos7-). Only used if tag is not defined |
724+
| session.image.tagPrefix | string | `"ubuntu2204-"` | A tag prefix for session images (common selections: ubuntu2204-). Only used if tag is not defined |
705725
| shareProcessNamespace | bool | `false` | whether to provide `shareProcessNamespace` to the pod. |
706726
| sharedStorage.accessModes | list | `["ReadWriteMany"]` | accessModes defined for the storage PVC (represented as YAML) |
707727
| sharedStorage.annotations | object | `{"helm.sh/resource-policy":"keep"}` | Define the annotations for the Persistent Volume Claim resource |

charts/rstudio-workbench/README.md.gotmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,22 @@ Alternatively, database passwords may be set during `helm install` with the foll
118118
119119
`--set config.secret.'database\.conf'.password="<YOUR_PASSWORD_HERE>"`
120120
121+
## Session images
122+
123+
By default, session pods use the `rstudio/workbench-session` image with an init container
124+
(`rstudio/workbench-session-init`) that delivers Workbench session components at pod startup.
125+
126+
To use the classic all-in-one `r-session-complete` image instead (which bundles all components
127+
into a single image), disable session components and change the session image:
128+
129+
```yaml
130+
session:
131+
image:
132+
repository: "rstudio/r-session-complete"
133+
components:
134+
enabled: false
135+
```
136+
121137
## General principles
122138
123139
- In most places, we opt to pass Helm values directly into ConfigMaps. We automatically translate these into the

charts/rstudio-workbench/templates/configmap-general.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
{{- $defaultIDEServiceName := include "rstudio-workbench.fullname" . }}
5050
{{- $defaultIDEServiceURL := printf "http://%s.%s.svc.cluster.local:80" $defaultIDEServiceName $.Release.Namespace }}
5151
{{- $defaultRServerConfigValues := dict "launcher-sessions-callback-address" ($defaultIDEServiceURL) }}
52+
{{- if and .Values.launcher.enabled .Values.session.components.enabled }}
53+
{{- $initTag := .Values.session.components.sessionInit.tag | default $defaultVersion }}
54+
{{- $_ := set $defaultRServerConfigValues "launcher-sessions-auto-update" 1 }}
55+
{{- $_ := set $defaultRServerConfigValues "launcher-sessions-init-container-image-name" .Values.session.components.sessionInit.repository }}
56+
{{- $_ := set $defaultRServerConfigValues "launcher-sessions-init-container-image-tag" $initTag }}
57+
{{- end }}
5258
{{- $defaultRServerConfig := dict "rserver.conf" ($defaultRServerConfigValues) }}
5359
{{- $defaultLauncherK8sConfigValues := dict "kubernetes-namespace" (default $.Release.Namespace .Values.launcher.namespace) }}
5460
{{- if .Values.launcher.useTemplates }}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
suite: Workbench ConfigMap
2+
templates:
3+
- configmap-general.yaml
4+
- configmap-prestart.yaml
5+
- configmap-secret.yaml
6+
- configmap-session.yaml
7+
tests:
8+
# -- Default behavior: components enabled
9+
- it: should include session-init settings by default
10+
template: configmap-general.yaml
11+
documentIndex: 0
12+
asserts:
13+
- matchRegex:
14+
path: data["rserver.conf"]
15+
pattern: "launcher-sessions-auto-update=1"
16+
- matchRegex:
17+
path: data["rserver.conf"]
18+
pattern: "launcher-sessions-init-container-image-name=rstudio/workbench-session-init"
19+
- matchRegex:
20+
path: data["rserver.conf"]
21+
pattern: "launcher-sessions-init-container-image-tag=\\d+\\.\\d+\\.\\d+"
22+
23+
- it: should use workbench-session as default session image
24+
template: configmap-general.yaml
25+
documentIndex: 0
26+
asserts:
27+
- matchRegex:
28+
path: data["launcher.kubernetes.profiles.conf"]
29+
pattern: "default-container-image=rstudio/workbench-session:"
30+
31+
# -- Components disabled (classic mode)
32+
- it: should not include session-init settings when components are disabled
33+
template: configmap-general.yaml
34+
documentIndex: 0
35+
set:
36+
session:
37+
components:
38+
enabled: false
39+
asserts:
40+
- notMatchRegex:
41+
path: data["rserver.conf"]
42+
pattern: "launcher-sessions-auto-update"
43+
- notMatchRegex:
44+
path: data["rserver.conf"]
45+
pattern: "launcher-sessions-init-container"
46+
47+
- it: should use r-session-complete when configured for classic mode
48+
template: configmap-general.yaml
49+
documentIndex: 0
50+
set:
51+
session:
52+
image:
53+
repository: "rstudio/r-session-complete"
54+
components:
55+
enabled: false
56+
asserts:
57+
- matchRegex:
58+
path: data["launcher.kubernetes.profiles.conf"]
59+
pattern: "default-container-image=rstudio/r-session-complete:"
60+
61+
# -- Custom session init container
62+
- it: should use custom session init repository when overridden
63+
template: configmap-general.yaml
64+
documentIndex: 0
65+
set:
66+
session:
67+
components:
68+
sessionInit:
69+
repository: "custom-registry/session-init"
70+
asserts:
71+
- matchRegex:
72+
path: data["rserver.conf"]
73+
pattern: "launcher-sessions-init-container-image-name=custom-registry/session-init"
74+
75+
- it: should use custom session init tag when overridden
76+
template: configmap-general.yaml
77+
documentIndex: 0
78+
set:
79+
session:
80+
components:
81+
sessionInit:
82+
tag: "jammy-2025.01.0"
83+
asserts:
84+
- matchRegex:
85+
path: data["rserver.conf"]
86+
pattern: "launcher-sessions-init-container-image-tag=jammy-2025.01.0"
87+
88+
# -- versionOverride propagates to init container tag
89+
- it: should use versionOverride for init container tag
90+
template: configmap-general.yaml
91+
documentIndex: 0
92+
set:
93+
versionOverride: "2025.06.0"
94+
asserts:
95+
- matchRegex:
96+
path: data["rserver.conf"]
97+
pattern: "launcher-sessions-init-container-image-tag=2025.06.0"
98+
99+
# -- Launcher disabled: components silently ignored
100+
- it: should not include session-init settings when launcher is disabled
101+
template: configmap-general.yaml
102+
documentIndex: 0
103+
set:
104+
launcher:
105+
enabled: false
106+
asserts:
107+
- notMatchRegex:
108+
path: data["rserver.conf"]
109+
pattern: "launcher-sessions-init-container"

charts/rstudio-workbench/values.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,25 @@ session:
2121
# -- The path to mount the sessionSecret (from `config.sessionSecret`) onto the server and session pods
2222
defaultSecretMountPath: /mnt/session-secret/
2323
image:
24-
# -- A tag prefix for session images (common selections: ubuntu2204-, centos7-). Only used if tag is not defined
24+
# -- A tag prefix for session images (common selections: ubuntu2204-). Only used if tag is not defined
2525
tagPrefix: ubuntu2204-
2626
# -- The repository to use for the session image
27-
repository: "rstudio/r-session-complete"
27+
repository: "rstudio/workbench-session"
2828
# -- A tag override for the session image. Overrides the "tagPrefix" above, if set. Default tag is `{{ tagPrefix }}{{ version }}`
2929
tag: ""
30+
# -- Session component delivery via init containers. When enabled (default), the chart configures
31+
# rserver.conf so the launcher injects init containers into session pods at startup.
32+
# Set `enabled: false` and change `session.image.repository` to `rstudio/r-session-complete`
33+
# to use the classic all-in-one session image instead.
34+
components:
35+
# -- Enable session component delivery via init containers. When false, no init containers
36+
# are configured and session.image must be a self-contained image like r-session-complete.
37+
enabled: true
38+
sessionInit:
39+
# -- The repository for the session init container image
40+
repository: "rstudio/workbench-session-init"
41+
# -- A tag override for the session init container. Default tag is the chart appVersion (or versionOverride)
42+
tag: ""
3043

3144
sharedStorage:
3245
# -- whether to create the persistentVolumeClaim for shared storage

0 commit comments

Comments
 (0)