Skip to content
Draft
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
14 changes: 14 additions & 0 deletions charts/rstudio-workbench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,20 @@ pip can be configured with `config.session.pip.conf`:
trusted-host: packagemanager.posit.co
```

#### uv repositories

[uv](https://docs.astral.sh/uv/) can be configured with `config.session.uv.toml`. When defined, the chart
automatically mounts the file to `/etc/uv/uv.toml` on both the server and session pods:

```yaml
config:
session:
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple"
default = true
```

#### R repositories

R package repositories can be configured with `config.session.repos.conf`:
Expand Down
14 changes: 14 additions & 0 deletions charts/rstudio-workbench/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@ pip can be configured with `config.session.pip.conf`:
trusted-host: packagemanager.posit.co
```

#### uv repositories

[uv](https://docs.astral.sh/uv/) can be configured with `config.session.uv.toml`. When defined, the chart
automatically mounts the file to `/etc/uv/uv.toml` on both the server and session pods:

```yaml
config:
session:
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple"
default = true
```

#### R repositories

R package repositories can be configured with `config.session.repos.conf`:
Expand Down
5 changes: 5 additions & 0 deletions charts/rstudio-workbench/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ containers:
mountPath: "/etc/pip.conf"
subPath: "pip.conf"
{{- end }}
{{- if hasKey .Values.config.session "uv.toml" }}
- name: rstudio-session-config
mountPath: "/etc/uv/uv.toml"
subPath: "uv.toml"
{{- end }}
{{- if .Values.config.sessionSecret }}
- name: rstudio-session-secret
mountPath: {{ .Values.session.defaultSecretMountPath }}
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-workbench/templates/configmap-general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
{{- $pipVolumeMount := dict "mountPath" "/etc/pip.conf" "subPath" "pip.conf" "name" "session-config" }}
{{- $volumeMountList = append $volumeMountList $pipVolumeMount }}
{{- end }}
{{- if hasKey .Values.config.session "uv.toml" }}
{{- $uvVolumeMount := dict "mountPath" "/etc/uv/uv.toml" "subPath" "uv.toml" "name" "session-config" }}
{{- $volumeMountList = append $volumeMountList $uvVolumeMount }}
{{- end }}
{{- $_ := set $sessionTemplate.pod "volumeMounts" $volumeMountList }}
{{- end }}
{{- if .Values.config.sessionSecret}}
Expand Down
58 changes: 58 additions & 0 deletions charts/rstudio-workbench/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,3 +728,61 @@ tests:
asserts:
- exists:
path: 'spec.template.spec.containers[?(@.name=="sidecarTest")]'
- it: should mount uv.toml to /etc/uv/uv.toml if config.session.uv.toml is defined
template: deployment.yaml
set:
config:
session:
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple"
default = true
asserts:
- contains:
path: 'spec.template.spec.containers[0].volumeMounts'
content:
name: "rstudio-session-config"
mountPath: "/etc/uv/uv.toml"
subPath: "uv.toml"
any: true
- it: should not mount uv.toml if config.session.uv.toml is not defined
template: deployment.yaml
asserts:
- notContains:
path: 'spec.template.spec.containers[0].volumeMounts'
content:
name: "rstudio-session-config"
mountPath: "/etc/uv/uv.toml"
subPath: "uv.toml"
any: true
- it: should include uv.toml in the session configmap
template: configmap-session.yaml
set:
config:
session:
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple"
default = true
asserts:
- isKind:
of: ConfigMap
- matchRegex:
path: data["uv.toml"]
pattern: 'packagemanager\.posit\.co'
- it: should include uv.toml volumeMount in launcher template when config.session.uv.toml is defined
template: configmap-general.yaml
documentSelector:
path: metadata.name
value: RELEASE-NAME-rstudio-workbench-templates
set:
config:
session:
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple"
default = true
asserts:
- matchRegex:
path: data["rstudio-library-templates-data.tpl"]
pattern: '/etc/uv/uv\.toml'
3 changes: 2 additions & 1 deletion examples/workbench/application-configuration/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ These settings are recommend for most deployments and are described below:
- [Set replicas > 1 to deploy Workbench load balanced across multiple pods](https://docs.posit.co/ide/server-pro/load_balancing/configuration.html)
- [Set a default Posit Connect URL](https://docs.posit.co/ide/server-pro/rstudio_pro_sessions/rstudio_connect_server.html)
- [Set a default Posit Package Manager CRAN URL](https://docs.posit.co/ide/server-pro/rstudio_pro_sessions/package_installation.html#cran-repositories)
- [Set a default Posit Package Manager PyPI URL](https://pip.pypa.io/en/stable/topics/configuration/)
- [Set a default Posit Package Manager PyPI URL for pip](https://pip.pypa.io/en/stable/topics/configuration/)
- [Set a default Posit Package Manager PyPI URL for uv](https://docs.astral.sh/uv/concepts/configuration-files/)
- [Set RStudio Pro IDE timeout settings](https://docs.posit.co/ide/server-pro/admin/rstudio_pro_sessions/user_and_group_profiles.html)
- [Set Jupyter IDE timeout settings](https://docs.posit.co/ide/server-pro/jupyter_sessions/configuration.html)
- [Enable the administrator dashboard and set user group(s) to have admin and admin super user permissions](https://docs.posit.co/ide/server-pro/server_management/administrative_dashboard.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ config:
"global":
index-url: https://packagemanager.posit.co/pypi/latest/simple # TODO: Change this URL to point to your own Package Manager PyPI URL if desired
trusted-host: packagemanager.posit.co # TODO: Change this to match the domain name specified in `index-url`. Do NOT include http:// or https://
uv.toml: |
[[index]]
url = "https://packagemanager.posit.co/pypi/latest/simple" # TODO: Change this URL to point to your own Package Manager PyPI URL if desired
default = true
server:
rserver.conf:
admin-enabled: 1 # More information at https://docs.posit.co/ide/server-pro/server_management/administrative_dashboard.html
Expand Down
Loading