Skip to content

Add declarative execution environment management to rstudio-connect chart#800

Open
lucasrod16 wants to merge 1 commit intomainfrom
claude-issue-37460
Open

Add declarative execution environment management to rstudio-connect chart#800
lucasrod16 wants to merge 1 commit intomainfrom
claude-issue-37460

Conversation

@lucasrod16
Copy link
Contributor

@lucasrod16 lucasrod16 commented Mar 10, 2026

Summary

  • Add executionEnvironments values key for declarative management of execution environments via ExecutionEnvironments.ConfigFilePath
  • Requires Connect version 2026.03.0 or later
  • Unlike launcher.customRuntimeYaml, changes take effect on every helm upgrade without requiring a pod restart or database reset
  • The chart excludes the execution environments ConfigMap from checksum annotations so the kubelet can update the mounted file in-place without triggering a pod restart

Test plan

  • just test rstudio-connect — 34 unit tests pass covering ConfigMap rendering, volume/volumeMount, gcfg config injection, checksum absence, custom ConfigFilePath override, launcher coexistence, and validation
  • just docs — README regenerated from template
  • CI lint and install tests pass

🤖 Generated with Claude Code

@lucasrod16 lucasrod16 force-pushed the claude-issue-37460 branch 16 times, most recently from bc25eaf to 680e3d2 Compare March 12, 2026 19:24
@lucasrod16 lucasrod16 marked this pull request as ready for review March 12, 2026 19:32
@lucasrod16 lucasrod16 requested a review from a team as a code owner March 12, 2026 19:32
@lucasrod16
Copy link
Contributor Author

Tested on EKS reference architecture cluster. Attached the testing notes as a markdown file

test-notes-execution-environments.md

ConfigMap and mounts it into the Connect pod.

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!

@dbkegley
Copy link
Contributor

These changes look good but I'd like folks from SE to weigh in on our docs updates. Let's wait to merge this until after the 2026.03.0 release.

Copy link
Contributor

@SamEdwardes SamEdwardes left a comment

Choose a reason for hiding this comment

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

This is awesome. Thank you for working on this. This is something that has caused a lot of confusion for customers, and a declarative execution environment will be much easier for them to use. I left one comment for discussion.

Comment on lines +210 to +213
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great that we don't need to redeploy and the Helm chart handles this.

Comment on lines +201 to +202
When `executionEnvironments` is set, the chart renders the list into a dedicated
ConfigMap and mounts it into the Connect pod.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to go into a little bit more detail about how the settings get merged. If you remove an environment, it will also get removed from Connect. What about execution environments that users might have set manually through the UI? Is there a way to disable users adding environments to the UI or the API so that it is truly only declarative?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fwiw, there are docs that go into more detail about the behavior in the admin guide for execution environments that will be included in the 2026.03.0 release that these helm docs can point to.

Using the declarative management feature does not prevent you from creating environments via UI/API. Connect tracks and manages declarative and UI/API-managed environments separately. Here is what it looks like in the UI:

Screenshot 2026-03-17 at 2 22 48 PM

You cannot create/update/delete environments managed by the declarative configuration using the UI/API, except for ACLs. Environment ACLs currently can only be managed via UI/API.

Is the ask to completely disable managing environments via API/UI when using the declarative approach? Is this what most admins would want and expect from what you've seen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants