Skip to content
Merged
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 Posit Connect
version: 0.8.34
version: 0.8.35
apiVersion: v2
appVersion: 2026.03.0
icon: https://raw.githubusercontent.com/rstudio/helm/main/images/posit-icon-fullcolor.svg
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-connect/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.8.35

- Add `executionEnvironments` value for [declarative management of execution environments](https://docs.posit.co/connect/admin/appendix/off-host/execution-environments/#declarative-management). Unlike `launcher.customRuntimeYaml`, changes take effect on every `helm upgrade` without requiring a pod restart or database reset. Requires Connect version 2026.03.0 or later.

## 0.8.34

- Bump Connect version to 2026.03.0
Expand Down
47 changes: 44 additions & 3 deletions charts/rstudio-connect/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Connect

![Version: 0.8.34](https://img.shields.io/badge/Version-0.8.34-informational?style=flat-square) ![AppVersion: 2026.03.0](https://img.shields.io/badge/AppVersion-2026.03.0-informational?style=flat-square)
![Version: 0.8.35](https://img.shields.io/badge/Version-0.8.35-informational?style=flat-square) ![AppVersion: 2026.03.0](https://img.shields.io/badge/AppVersion-2026.03.0-informational?style=flat-square)

#### _Official Helm chart for Posit Connect_

Expand Down Expand Up @@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future

## Installing the chart

To install the chart with the release name `my-release` at version 0.8.34:
To install the chart with the release name `my-release` at version 0.8.35:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.34
helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.35
```

To explore other chart versions, look at:
Expand Down Expand Up @@ -191,6 +191,46 @@ the API key unset for the Chronicle agent, deploy the chart, create an administr
secret with the API key. Once the secret is created, the value of `chronicleAgent.connectApiKey.secretKeyRef`
can be set and the release can be upgraded to include the new value.

## Execution environments

This chart supports [declarative management of execution environments](https://docs.posit.co/connect/admin/appendix/off-host/execution-environments/#declarative-management)
via `ExecutionEnvironments.ConfigFilePath`. Requires Connect version 2026.03.0 or later.
Unlike the legacy `launcher.customRuntimeYaml`, changes to `executionEnvironments`
take effect on every `helm upgrade` without requiring a pod restart or database reset.

When `executionEnvironments` is set, the chart renders the list into a dedicated
ConfigMap and mounts it into the Connect pod. Connect only manages the execution
environments defined in this file. You can still create and manage additional
execution environments separately through the Connect UI or API.

By default, the chart sets `ExecutionEnvironments.ConfigFilePath` to
`/etc/rstudio-connect/execution-environments/environments.yaml` and mounts the
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the extra path segment? Why not just /etc/rstudio-connect/execution-environments.yaml ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ConfigMap files mounted with subPath don't receive automatic updates from the kubelet, so we need a dedicated directory to avoid overwriting other files in /etc/rstudio-connect/

https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically

A container using a ConfigMap as a subPath volume mount will not receive ConfigMap updates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason we want automatic updates from the kubelet for this ConfigMap is so that we don't have to restart the Connect pod(s) to apply updates to execution environments

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, makes sense. Thanks!

ConfigMap at `/etc/rstudio-connect/execution-environments/`. If you set
`config.ExecutionEnvironments.ConfigFilePath` to a custom path, the chart uses
that path instead and mounts the ConfigMap at its parent directory.

The chart deliberately excludes this ConfigMap from the pod's checksum annotations,
so changes do not trigger a pod restart. The kubelet updates the mounted file
automatically when the ConfigMap changes (typically within 60-120 seconds), and
Connect detects the update automatically.

Example `values.yaml`:

```yaml
executionEnvironments:
- name: ghcr.io/my-org/connect-runtime:ubuntu22
title: "Default Runtime"
matching: any
python:
installations:
- version: "3.11.3"
path: /opt/python/3.11.3/bin/python3
r:
installations:
- version: "4.4.0"
path: /opt/R/4.4.0/bin/R
```

## General principles

- In most places, we opt to pass Helm values over configmaps. We translate these into the valid `.gcfg` file format
Expand Down Expand Up @@ -235,6 +275,7 @@ The Helm `config` values are converted into the `rstudio-connect.gcfg` service c
| command | list | `[]` | The pod's run command. By default, it uses the container's default |
| config | object | [Posit Connect Configuration Reference](https://docs.posit.co/connect/admin/appendix/off-host/helm-reference/) | A nested map of maps that generates the rstudio-connect.gcfg file |
| deployment.annotations | object | `{}` | Additional annotations to add to the rstudio-connect deployment |
| executionEnvironments | list | `[]` (disabled) | Optional list of execution environments to manage declaratively. Requires Connect version 2026.03.0 or later. When set, the chart renders these into a ConfigMap, mounts it into the Connect pod, and sets ExecutionEnvironments.ConfigFilePath in the Connect configuration. Unlike launcher.customRuntimeYaml, changes take effect on every helm upgrade without requiring a pod restart or database reset. |
| extraObjects | list | `[]` | Extra objects to deploy (value evaluated as a template) |
| fullnameOverride | string | `""` | The full name of the release (can be overridden) |
| image | object | `{"imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"repository":"ghcr.io/rstudio/rstudio-connect","tag":"","tagPrefix":"ubuntu2204-"}` | Defines the Posit Connect image to deploy |
Expand Down
40 changes: 40 additions & 0 deletions charts/rstudio-connect/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,46 @@ the API key unset for the Chronicle agent, deploy the chart, create an administr
secret with the API key. Once the secret is created, the value of `chronicleAgent.connectApiKey.secretKeyRef`
can be set and the release can be upgraded to include the new value.

## Execution environments

This chart supports [declarative management of execution environments](https://docs.posit.co/connect/admin/appendix/off-host/execution-environments/#declarative-management)
via `ExecutionEnvironments.ConfigFilePath`. Requires Connect version 2026.03.0 or later.
Unlike the legacy `launcher.customRuntimeYaml`, changes to `executionEnvironments`
take effect on every `helm upgrade` without requiring a pod restart or database reset.

When `executionEnvironments` is set, the chart renders the list into a dedicated
ConfigMap and mounts it into the Connect pod. Connect only manages the execution
environments defined in this file. You can still create and manage additional
execution environments separately through the Connect UI or API.

By default, the chart sets `ExecutionEnvironments.ConfigFilePath` to
`/etc/rstudio-connect/execution-environments/environments.yaml` and mounts the
ConfigMap at `/etc/rstudio-connect/execution-environments/`. If you set
`config.ExecutionEnvironments.ConfigFilePath` to a custom path, the chart uses
that path instead and mounts the ConfigMap at its parent directory.

The chart deliberately excludes this ConfigMap from the pod's checksum annotations,
so changes do not trigger a pod restart. The kubelet updates the mounted file
automatically when the ConfigMap changes (typically within 60-120 seconds), and
Connect detects the update automatically.

Example `values.yaml`:

```yaml
executionEnvironments:
- name: ghcr.io/my-org/connect-runtime:ubuntu22
title: "Default Runtime"
matching: any
python:
installations:
- version: "3.11.3"
path: /opt/python/3.11.3/bin/python3
r:
installations:
- version: "4.4.0"
path: /opt/R/4.4.0/bin/R
```

## General principles

- In most places, we opt to pass Helm values over configmaps. We translate these into the valid `.gcfg` file format
Expand Down
5 changes: 5 additions & 0 deletions charts/rstudio-connect/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- $launcherDict := dict "Launcher" ( $launcherSettingsDict ) }}
{{- $defaultConfig = merge $defaultConfig $launcherDict }}
{{- end }}
{{- /* declarative execution environments configuration */}}
{{- if .Values.executionEnvironments }}
{{- $eeDict := dict "ExecutionEnvironments" (dict "ConfigFilePath" "/etc/rstudio-connect/execution-environments/environments.yaml") }}
{{- $defaultConfig = merge $defaultConfig $eeDict }}
{{- end }}
{{- /* default licensing configuration */}}
{{- if .Values.license.server }}
{{- $licenseDict := dict "Licensing" ( dict "LicenseType" ("Remote") ) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
{{- if .Values.executionEnvironments }}
{{- range $i, $env := .Values.executionEnvironments }}
{{- if not $env.name }}
{{- fail (printf "executionEnvironments[%d].name is required" $i) }}
{{- end }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rstudio-connect.fullname" . }}-execution-environments
namespace: {{ $.Release.Namespace }}
labels:
{{- include "rstudio-connect.labels" . | nindent 4 }}
data:
environments.yaml: |
{{- toYaml .Values.executionEnvironments | nindent 4 }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/rstudio-connect/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ spec:
subPath: "libnss_connect.conf"
readOnly: true
{{- end }}
{{- if .Values.executionEnvironments }}
- name: execution-environments
mountPath: {{ dir (default "/etc/rstudio-connect/execution-environments/environments.yaml" (dig "ExecutionEnvironments" "ConfigFilePath" "" .Values.config)) | quote }}
readOnly: true
{{- end }}
{{- if .Values.pod.volumeMounts }}
{{- toYaml .Values.pod.volumeMounts | nindent 10 }}
{{- end }}
Expand Down Expand Up @@ -308,6 +313,11 @@ spec:
- key: libnss_connect.conf
path: libnss_connect.conf
{{- end }}
{{- if .Values.executionEnvironments }}
- name: execution-environments
configMap:
name: {{ include "rstudio-connect.fullname" . }}-execution-environments
{{- end }}
{{- if .Values.launcher.enabled }}
{{- if .Values.launcher.useTemplates }}
- name: rstudio-connect-templates
Expand Down
Loading
Loading