diff --git a/Justfile b/Justfile index 434a66529..51e37a612 100644 --- a/Justfile +++ b/Justfile @@ -96,7 +96,7 @@ test-connect-interpreter-versions: helm template ./charts/rstudio-connect \ --set launcher.enabled=false \ --show-only templates/deployment.yaml | \ - grep "image\:.*rstudio-connect.*" | \ + grep "image\:.*posit/connect\:.*" | \ awk -F": " '{print $2}' | \ xargs) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index 682831a54..4ac12ebeb 100644 --- a/charts/rstudio-connect/Chart.yaml +++ b/charts/rstudio-connect/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-connect description: Official Helm chart for Posit Connect -version: 0.9.2 +version: 0.20.0 apiVersion: v2 appVersion: 2026.03.1 icon: https://raw.githubusercontent.com/rstudio/helm/main/images/posit-icon-fullcolor.svg @@ -17,8 +17,8 @@ dependencies: repository: https://helm.rstudio.com annotations: artifacthub.io/images: | - - name: rstudio-connect - image: rstudio/rstudio-connect:ubuntu2204-2026.03.1 + - name: connect + image: posit/connect:2026.03.1-ubuntu-24.04 artifacthub.io/license: MIT artifacthub.io/links: | - name: Docker Images diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index e91cb18a9..55df829ad 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,5 +1,15 @@ # Changelog +## 0.20.0 + +- BREAKING: + - Default images now use `posit/connect` instead of `ghcr.io/rstudio/rstudio-connect` + - Image tag format changed from `{os}{version}` (e.g. `ubuntu2204-2026.03.1`) to `{version}-{os}` (e.g. `2026.03.1-ubuntu-24.04`) + - `image.tagPrefix` replaced by `image.os`; `launcher.defaultInitContainer.tagPrefix` replaced by `launcher.defaultInitContainer.os` + - Remove `launcher.customRuntimeYaml` and `launcher.additionalRuntimeImages`. Use `executionEnvironments` for declarative management of execution environments. + - Remove the bundled `default-runtime.yaml` and `default-runtime-pro.yaml` files. +- Default Quarto executable path for Local Execution updated to `/usr/local/bin/quarto` + ## 0.9.2 - Add `events: list` permission to the direct Kubernetes runner Role. Connect 2026.04.0 lists events in the target namespace when a content pod fails to start and the failure reason cannot be determined from pod conditions. diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index fa264eacf..f640ccd54 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # Posit Connect -![Version: 0.9.2](https://img.shields.io/badge/Version-0.9.2-informational?style=flat-square) ![AppVersion: 2026.03.1](https://img.shields.io/badge/AppVersion-2026.03.1-informational?style=flat-square) +![Version: 0.20.0](https://img.shields.io/badge/Version-0.20.0-informational?style=flat-square) ![AppVersion: 2026.03.1](https://img.shields.io/badge/AppVersion-2026.03.1-informational?style=flat-square) #### _Official Helm chart for Posit Connect_ @@ -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.9.2: +To install the chart with the release name `my-release` at version 0.20.0: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.9.2 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.20.0 ``` To explore other chart versions, look at: @@ -199,8 +199,8 @@ can be set and the release can be upgraded to include the new value. 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. +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 @@ -297,31 +297,29 @@ 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. | +| 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. 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 | +| image | object | `{"imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"os":"ubuntu-24.04","repository":"posit/connect","tag":""}` | Defines the Posit Connect image to deploy | | image.imagePullPolicy | string | `"IfNotPresent"` | The imagePullPolicy for the main pod image | | image.imagePullSecrets | list | `[]` | an array of kubernetes secrets for pulling the main pod image from private registries | -| image.repository | string | `"ghcr.io/rstudio/rstudio-connect"` | The repository to use for the main pod image | +| image.os | string | `"ubuntu-24.04"` | The OS version for the image tag (e.g. ubuntu-24.04, ubuntu-22.04). Only used if tag is not defined | +| image.repository | string | `"posit/connect"` | The repository to use for the main pod image | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | -| image.tagPrefix | string | `"ubuntu2204-"` | A tag prefix for the server image (common selections: jammy-, ubuntu2204-). Only used if tag is not defined | | ingress.annotations | object | `{}` | | | ingress.enabled | bool | `false` | | | ingress.hosts | string | `nil` | | | ingress.ingressClassName | string | `""` | The ingressClassName for the ingress resource. Only used for clusters that support networking.k8s.io/v1 Ingress resources | | ingress.tls | list | `[]` | | | initContainers | bool | `false` | The initContainer spec that will be used verbatim | -| launcher.additionalRuntimeImages | list | `[]` | Deprecated, use `executionEnvironments` instead. Optional. Additional images to append to the end of the "launcher.customRuntimeYaml" (in the "images" key). If `customRuntimeYaml` is a "map", then "additionalRuntimeImages" will only be used if it is a "list". | -| launcher.customRuntimeYaml | string | `""` | Deprecated, use `executionEnvironments` instead. Optional. The runtime.yaml definition of Kubernetes runtime containers. If set to "base", will pull in the default runtime.yaml file. If set to "pro", will pull in the "pro" versions of the default runtime images (i.e. including the pro drivers at the cost of a larger image). Starting with Connect v2023.05.0, this configuration is used to bootstrap the initial set of execution environments the first time the server starts. If any execution environments already exist in the database, these values are ignored; execution environments are not created or modified during subsequent restarts. | -| launcher.defaultInitContainer | object | `{"enabled":true,"imagePullPolicy":"","repository":"ghcr.io/rstudio/rstudio-connect-content-init","resources":{},"securityContext":{},"tag":"","tagPrefix":"ubuntu2204-"}` | Image definition for the default Posit Connect Content InitContainer | +| launcher.defaultInitContainer | object | `{"enabled":true,"imagePullPolicy":"","os":"ubuntu-24.04","repository":"posit/connect-content-init","resources":{},"securityContext":{},"tag":""}` | Image definition for the default Posit Connect Content InitContainer | | launcher.defaultInitContainer.enabled | bool | `true` | Whether to enable the defaultInitContainer. If disabled, you must ensure that the session components are available another way. | | launcher.defaultInitContainer.imagePullPolicy | string | `""` | The imagePullPolicy for the default initContainer | -| launcher.defaultInitContainer.repository | string | `"ghcr.io/rstudio/rstudio-connect-content-init"` | The repository to use for the Content InitContainer image | +| launcher.defaultInitContainer.os | string | `"ubuntu-24.04"` | The OS version for the image tag (e.g. ubuntu-24.04, ubuntu-22.04). Only used if tag is not defined | +| launcher.defaultInitContainer.repository | string | `"posit/connect-content-init"` | The repository to use for the Content InitContainer image | | launcher.defaultInitContainer.resources | object | `{}` | Optional resources for the default initContainer | | launcher.defaultInitContainer.securityContext | object | `{}` | The securityContext for the default initContainer | | launcher.defaultInitContainer.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | -| launcher.defaultInitContainer.tagPrefix | string | `"ubuntu2204-"` | A tag prefix for the Content InitContainer image (common selections: jammy-, ubuntu2204-). Only used if tag is not defined | | launcher.enabled | bool | `true` | Whether to enable the launcher | | launcher.extraTemplates | object | `{}` | extra templates to render in the template directory. | | launcher.includeDefaultTemplates | bool | `true` | whether to include the default `job.tpl` and `service.tpl` files included with the chart | diff --git a/charts/rstudio-connect/README.md.gotmpl b/charts/rstudio-connect/README.md.gotmpl index bb511abd9..a71ec6388 100644 --- a/charts/rstudio-connect/README.md.gotmpl +++ b/charts/rstudio-connect/README.md.gotmpl @@ -139,8 +139,8 @@ can be set and the release can be upgraded to include the new value. 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. +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 diff --git a/charts/rstudio-connect/default-runtime-pro.yaml b/charts/rstudio-connect/default-runtime-pro.yaml deleted file mode 100644 index a94522a2d..000000000 --- a/charts/rstudio-connect/default-runtime-pro.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: Kubernetes -images: - - - name: ghcr.io/rstudio/content-pro:r3.6.3-py3.8.19-ubuntu2204 - python: - installations: - - - path: /opt/python/3.8.19/bin/python3 - version: 3.8.19 - r: - installations: - - - path: /opt/R/3.6.3/bin/R - version: 3.6.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-pro:r4.0.5-py3.9.19-ubuntu2204 - python: - installations: - - - path: /opt/python/3.9.19/bin/python3 - version: 3.9.19 - r: - installations: - - - path: /opt/R/4.0.5/bin/R - version: 4.0.5 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-pro:r4.1.3-py3.10.14-ubuntu2204 - python: - installations: - - - path: /opt/python/3.10.14/bin/python3 - version: 3.10.14 - r: - installations: - - - path: /opt/R/4.1.3/bin/R - version: 4.1.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-pro:r4.2.3-py3.11.9-ubuntu2204 - python: - installations: - - - path: /opt/python/3.11.9/bin/python3 - version: 3.11.9 - r: - installations: - - - path: /opt/R/4.2.3/bin/R - version: 4.2.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-pro:r4.3.3-py3.12.3-ubuntu2204 - python: - installations: - - - path: /opt/python/3.12.3/bin/python3 - version: 3.12.3 - r: - installations: - - - path: /opt/R/4.3.3/bin/R - version: 4.3.3 - quarto: - installations: - - path: /opt/quarto/1.4.553/bin/quarto - version: 1.4.553 - - - name: ghcr.io/rstudio/content-pro:r4.4.0-py3.12.3-ubuntu2204 - python: - installations: - - - path: /opt/python/3.12.3/bin/python3 - version: 3.12.3 - r: - installations: - - - path: /opt/R/4.4.0/bin/R - version: 4.4.0 - quarto: - installations: - - path: /opt/quarto/1.4.553/bin/quarto - version: 1.4.553 diff --git a/charts/rstudio-connect/default-runtime.yaml b/charts/rstudio-connect/default-runtime.yaml deleted file mode 100644 index 888a763a0..000000000 --- a/charts/rstudio-connect/default-runtime.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: Kubernetes -images: - - - name: ghcr.io/rstudio/content-base:r3.6.3-py3.8.19-ubuntu2204 - python: - installations: - - - path: /opt/python/3.8.19/bin/python3 - version: 3.8.19 - r: - installations: - - - path: /opt/R/3.6.3/bin/R - version: 3.6.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-base:r4.0.5-py3.9.19-ubuntu2204 - python: - installations: - - - path: /opt/python/3.9.19/bin/python3 - version: 3.9.19 - r: - installations: - - - path: /opt/R/4.0.5/bin/R - version: 4.0.5 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-base:r4.1.3-py3.10.14-ubuntu2204 - python: - installations: - - - path: /opt/python/3.10.14/bin/python3 - version: 3.10.14 - r: - installations: - - - path: /opt/R/4.1.3/bin/R - version: 4.1.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-base:r4.2.3-py3.11.9-ubuntu2204 - python: - installations: - - - path: /opt/python/3.11.9/bin/python3 - version: 3.11.9 - r: - installations: - - - path: /opt/R/4.2.3/bin/R - version: 4.2.3 - quarto: - installations: - - path: /opt/quarto/1.3.450/bin/quarto - version: 1.3.450 - - - name: ghcr.io/rstudio/content-base:r4.3.3-py3.12.3-ubuntu2204 - python: - installations: - - - path: /opt/python/3.12.3/bin/python3 - version: 3.12.3 - r: - installations: - - - path: /opt/R/4.3.3/bin/R - version: 4.3.3 - quarto: - installations: - - path: /opt/quarto/1.4.553/bin/quarto - version: 1.4.553 - - - name: ghcr.io/rstudio/content-base:r4.4.0-py3.12.3-ubuntu2204 - python: - installations: - - - path: /opt/python/3.12.3/bin/python3 - version: 3.12.3 - r: - installations: - - - path: /opt/R/4.4.0/bin/R - version: 4.4.0 - quarto: - installations: - - path: /opt/quarto/1.4.553/bin/quarto - version: 1.4.553 diff --git a/charts/rstudio-connect/lint/launcher-advanced-values.yaml b/charts/rstudio-connect/lint/launcher-advanced-values.yaml deleted file mode 100644 index 014df5736..000000000 --- a/charts/rstudio-connect/lint/launcher-advanced-values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -rbac: - create: true - serviceAccount: - create: true - name: "connect-service-account" -securityContext: null -sharedStorage: - create: true -launcher: - enabled: true - additionalRuntimeImages: - - name: ghcr.io/rstudio/content-base:r4.1.0-py3.9.2-bionic - python: - installations: - - path: /opt/python/3.9.2/bin/python3.9 - version: 3.9.2 - r: - installations: - - path: /opt/R/4.1.0/bin/R - version: 4.1.0 - customRuntimeYaml: - name: Kubernetes - images: - - - name: ghcr.io/rstudio/content-base:r3.1.3-py2.7.18-bionic - python: - installations: - - - path: /opt/python/2.7.18/bin/python2.7 - version: 2.7.18 - r: - installations: - - - path: /opt/R/3.1.3/bin/R - version: 3.1.3 diff --git a/charts/rstudio-connect/lint/launcher-advanced2-values.yaml b/charts/rstudio-connect/lint/launcher-advanced2-values.yaml deleted file mode 100644 index ff43deef6..000000000 --- a/charts/rstudio-connect/lint/launcher-advanced2-values.yaml +++ /dev/null @@ -1,38 +0,0 @@ -rbac: - create: true - serviceAccount: - create: true -securityContext: null -sharedStorage: - create: true -launcher: - enabled: true - defaultInitContainer: - enabled: true - securityContext: - allowPrivilegedEscalation: false - additionalRuntimeImages: | - - name: ghcr.io/rstudio/content-base:r4.1.0-py3.9.2-bionic - python: - installations: - - path: /opt/python/3.9.2/bin/python3.9 - version: 3.9.2 - r: - installations: - - path: /opt/R/4.1.0/bin/R - version: 4.1.0 - customRuntimeYaml: | - name: Kubernetes - images: - - - name: ghcr.io/rstudio/content-base:r3.1.3-py2.7.18-bionic - python: - installations: - - - path: /opt/python/2.7.18/bin/python2.7 - version: 2.7.18 - r: - installations: - - - path: /opt/R/3.1.3/bin/R - version: 3.1.3 diff --git a/charts/rstudio-connect/lint/launcher-advanced3-values.yaml b/charts/rstudio-connect/lint/launcher-advanced3-values.yaml deleted file mode 100644 index af86dd337..000000000 --- a/charts/rstudio-connect/lint/launcher-advanced3-values.yaml +++ /dev/null @@ -1,20 +0,0 @@ -rbac: - create: true - serviceAccount: - create: true -securityContext: null -sharedStorage: - create: true -launcher: - enabled: true - customRuntimeYaml: pro - additionalRuntimeImages: - - name: ghcr.io/rstudio/content-base:r4.1.0-py3.9.2-bionic - python: - installations: - - path: /opt/python/3.9.2/bin/python3.9 - version: 3.9.2 - r: - installations: - - path: /opt/R/4.1.0/bin/R - version: 4.1.0 diff --git a/charts/rstudio-connect/templates/NOTES.txt b/charts/rstudio-connect/templates/NOTES.txt index 805b109b9..ab95d52be 100644 --- a/charts/rstudio-connect/templates/NOTES.txt +++ b/charts/rstudio-connect/templates/NOTES.txt @@ -70,6 +70,22 @@ Please consider removing this configuration value. {{- fail "\n\n`launcher.contentInitContainer` values are now stored at `launcher.defaultInitContainer`" }} {{- end }} +{{- if .Values.launcher.customRuntimeYaml }} + {{- fail "\n\n`launcher.customRuntimeYaml` has been removed. Use `executionEnvironments` for declarative management of execution environments." }} +{{- end }} + +{{- if .Values.launcher.additionalRuntimeImages }} + {{- fail "\n\n`launcher.additionalRuntimeImages` has been removed. Use `executionEnvironments` for declarative management of execution environments." }} +{{- end }} + +{{- if .Values.image.tagPrefix }} + {{- fail "\n\n`image.tagPrefix` has been removed. Use `image.os` instead (e.g. `ubuntu-24.04`). The image tag format is now `{version}-{os}`." }} +{{- end }} + +{{- if .Values.launcher.defaultInitContainer.tagPrefix }} + {{- fail "\n\n`launcher.defaultInitContainer.tagPrefix` has been removed. Use `launcher.defaultInitContainer.os` instead (e.g. `ubuntu-24.04`). The image tag format is now `{version}-{os}`." }} +{{- end }} + {{- if .Values.pod.serviceAccountName }} {{- fail "\n\n`pod.serviceAccountName` is no longer used. Use `rbac.serviceAccount.name` instead." }} diff --git a/charts/rstudio-connect/templates/_helpers.tpl b/charts/rstudio-connect/templates/_helpers.tpl index c27634658..162fc03b9 100644 --- a/charts/rstudio-connect/templates/_helpers.tpl +++ b/charts/rstudio-connect/templates/_helpers.tpl @@ -72,9 +72,6 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Values.launcher.enabled }} {{- $namespace := default $.Release.Namespace .Values.launcher.namespace }} {{- $launcherSettingsDict := dict "Enabled" ("true") "Kubernetes" ("true") "KubernetesNamespace" ($namespace) "KubernetesProfilesConfig" ("/etc/rstudio-connect/launcher/launcher.kubernetes.profiles.conf") }} - {{- if include "rstudio-connect.runtimeYaml" . }} - {{- $_ := set $launcherSettingsDict "ClusterDefinition" (list "/etc/rstudio-connect/runtime.yaml") }} - {{- end }} {{- if and (or .Values.sharedStorage.create .Values.sharedStorage.mount) .Values.sharedStorage.mountContent }} {{- $dataDirPVCName := default (print (include "rstudio-connect.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }} {{- $_ := set $launcherSettingsDict "DataDirPVCName" $dataDirPVCName }} @@ -128,59 +125,6 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- include "rstudio-library.config.gcfg" ( mergeOverwrite $defaultConfig $configCopy ) }} {{- end -}} -{{/* - - Define the runtime.yaml file - - If a string: - - if "pro" - use pro runtime.yaml - - If additionalRuntimeImages is a string, append - - if "base" - use base runtime.yaml - - If additionalRuntimeImages is a string, append - - otherwise use the string verbatim - - If additionalRuntimeImages is a string, append - - If a map, pass it to "toYaml" - - If additionalRuntimeImages is a list, append - - Otherwise use the base runtime.yaml - - When we append additionalRuntimeImages as a string, we presume that - the end of the runtimeImages file is still in the context of the "images" key -*/}} -{{- define "rstudio-connect.runtimeYaml" -}} - {{- $runtimeYaml := deepCopy (.Values.launcher.customRuntimeYaml | default "") }} - {{- $additionalImages := deepCopy .Values.launcher.additionalRuntimeImages }} - {{- if kindIs "string" $runtimeYaml }} - {{- if eq $runtimeYaml "pro" }} - {{- .Files.Get "default-runtime-pro.yaml" }} - {{- include "rstudio-connect.additionalImagesString" $additionalImages }} - {{- else if eq $runtimeYaml "base" }} - {{- .Files.Get "default-runtime.yaml" }} - {{- include "rstudio-connect.additionalImagesString" $additionalImages }} - {{- else }} - {{- /* Allow verbatim output */ -}} - {{- $runtimeYaml }} - {{- include "rstudio-connect.additionalImagesString" $additionalImages }} - {{- end }} - {{- else if kindIs "map" $runtimeYaml }} - {{- /* - only include additionalImages if it is a list. - otherwise it is possible the keys could be mismatched - */ -}} - {{- if kindIs "list" $additionalImages }} - {{- $_ := set $runtimeYaml "images" (append $runtimeYaml.images $additionalImages) }} - {{- end }} - {{- toYaml $runtimeYaml }} - {{- end }} -{{- end -}} - -{{- define "rstudio-connect.additionalImagesString" }} - {{- if . }} - {{- if kindIs "string" . }} - {{- . | nindent 2 }} - {{- else }} - {{- toYaml . | nindent 2 }} - {{- end }} - {{- end }} -{{- end }} - {{- define "rstudio-connect.pod.annotations" -}} {{- range $key,$value := $.Values.pod.annotations -}} {{ $key }}: {{ $value | quote }} diff --git a/charts/rstudio-connect/templates/configmap.yaml b/charts/rstudio-connect/templates/configmap.yaml index e8c3681a2..1b83785e6 100644 --- a/charts/rstudio-connect/templates/configmap.yaml +++ b/charts/rstudio-connect/templates/configmap.yaml @@ -26,11 +26,6 @@ data: {{- end }} {{- $sessionTemplate := deepCopy .Values.launcher.templateValues }} {{- if .Values.launcher.enabled }} - {{- $runtimeYamlContent := include "rstudio-connect.runtimeYaml" . }} - {{- if $runtimeYamlContent }} - runtime.yaml: | - {{- $runtimeYamlContent | nindent 4 }} - {{- end }} {{- /* configuration for job customization (also used below) */ -}} {{- /* 1 - volume */ -}} {{- $emptyRscVolume := dict "name" ("rsc-volume") "emptydir" (dict) }} @@ -46,7 +41,7 @@ data: {{- $jobJsonRuntimeMountExt := dict "target" ("/spec/template/spec/containers/0/volumeMounts/-") "name" ("defaultRuntimeContainerVolumeMountExt") "json" ( $rscVolumeMountExt ) }} {{- /* 3 - init container */ -}} {{- $defaultVersion := .Values.versionOverride | default $.Chart.AppVersion }} - {{- $initContainerImageTag := .Values.launcher.defaultInitContainer.tag | default (printf "%s%s" .Values.launcher.defaultInitContainer.tagPrefix $defaultVersion )}} + {{- $initContainerImageTag := .Values.launcher.defaultInitContainer.tag | default (printf "%s-%s" $defaultVersion .Values.launcher.defaultInitContainer.os )}} {{- $initContainerImage := print .Values.launcher.defaultInitContainer.repository ":" ( $initContainerImageTag ) }} {{- $initContainerPullPolicy := default "IfNotPresent" .Values.launcher.defaultInitContainer.imagePullPolicy }} {{- $initContainerResources := .Values.launcher.defaultInitContainer.resources }} diff --git a/charts/rstudio-connect/templates/deployment.yaml b/charts/rstudio-connect/templates/deployment.yaml index bd8183dc4..3f8d74ccd 100644 --- a/charts/rstudio-connect/templates/deployment.yaml +++ b/charts/rstudio-connect/templates/deployment.yaml @@ -139,7 +139,7 @@ spec: containers: - name: connect {{- $defaultVersion := .Values.versionOverride | default $.Chart.AppVersion }} - {{- $imageTag := .Values.image.tag | default (printf "%s%s" .Values.image.tagPrefix $defaultVersion )}} + {{- $imageTag := .Values.image.tag | default (printf "%s-%s" $defaultVersion .Values.image.os )}} image: "{{ .Values.image.repository }}:{{ $imageTag }}" env: {{- if .Values.pod.haste }} @@ -167,11 +167,6 @@ spec: {{- if .Values.command }} command: {{ toYaml .Values.command | indent 10 }} - {{- else if (include "rstudio-connect.oheEnabled" .) }} - command: - - tini - - -s - - -- {{- end }} {{- if .Values.args }} args: @@ -208,11 +203,6 @@ spec: {{- end }} {{- end }} {{- if .Values.launcher.enabled }} - {{- if include "rstudio-connect.runtimeYaml" . }} - - name: rstudio-connect-config - mountPath: "/etc/rstudio-connect/runtime.yaml" - subPath: "runtime.yaml" - {{- end }} - name: rstudio-connect-config mountPath: "/etc/rstudio-connect/launcher/launcher.kubernetes.profiles.conf" subPath: "launcher.kubernetes.profiles.conf" diff --git a/charts/rstudio-connect/tests/deprecated_keys_test.yaml b/charts/rstudio-connect/tests/deprecated_keys_test.yaml new file mode 100644 index 000000000..a9e35dcff --- /dev/null +++ b/charts/rstudio-connect/tests/deprecated_keys_test.yaml @@ -0,0 +1,48 @@ +suite: Connect Deprecated Keys +templates: + - NOTES.txt +tests: + - it: should fail when launcher.customRuntimeYaml is set + set: + launcher: + enabled: true + customRuntimeYaml: "base" + sharedStorage: + create: true + asserts: + - failedTemplate: + errorPattern: "launcher.customRuntimeYaml.*has been removed.*executionEnvironments" + + - it: should fail when launcher.additionalRuntimeImages is set + set: + launcher: + enabled: true + additionalRuntimeImages: + - name: ghcr.io/my-org/content-base:r4.4.0-py3.11.3-jammy + sharedStorage: + create: true + asserts: + - failedTemplate: + errorPattern: "launcher.additionalRuntimeImages.*has been removed.*executionEnvironments" + + - it: should fail when image.tagPrefix is set + set: + image: + tagPrefix: "ubuntu2204-" + sharedStorage: + create: true + asserts: + - failedTemplate: + errorPattern: "image.tagPrefix.*has been removed.*image.os" + + - it: should fail when launcher.defaultInitContainer.tagPrefix is set + set: + launcher: + enabled: true + defaultInitContainer: + tagPrefix: "ubuntu2204-" + sharedStorage: + create: true + asserts: + - failedTemplate: + errorPattern: "launcher.defaultInitContainer.tagPrefix.*has been removed.*launcher.defaultInitContainer.os" diff --git a/charts/rstudio-connect/tests/execution_environments_test.yaml b/charts/rstudio-connect/tests/execution_environments_test.yaml index e60dbfc4b..919fe0848 100644 --- a/charts/rstudio-connect/tests/execution_environments_test.yaml +++ b/charts/rstudio-connect/tests/execution_environments_test.yaml @@ -187,7 +187,6 @@ tests: set: launcher: enabled: true - customRuntimeYaml: "pro" sharedStorage: create: true mount: true @@ -270,114 +269,3 @@ tests: asserts: - failedTemplate: errorMessage: "executionEnvironments[0].name is required" - - # ============================================================================= - # configmap.yaml - runtime.yaml key omitted when customRuntimeYaml is empty - # ============================================================================= - - - it: should not include runtime.yaml key in configmap when customRuntimeYaml is empty (default) - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - asserts: - - notExists: - path: data["runtime.yaml"] - - - it: should not include runtime.yaml key in configmap when customRuntimeYaml is null - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - customRuntimeYaml: null - asserts: - - notExists: - path: data["runtime.yaml"] - - - it: should include runtime.yaml key in configmap when customRuntimeYaml is "base" - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - customRuntimeYaml: "base" - asserts: - - exists: - path: data["runtime.yaml"] - - - it: should include runtime.yaml key in configmap when customRuntimeYaml is "pro" - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - customRuntimeYaml: "pro" - asserts: - - exists: - path: data["runtime.yaml"] - - # ============================================================================= - # configmap.yaml - ClusterDefinition omitted when customRuntimeYaml is empty - # ============================================================================= - - - it: should not set ClusterDefinition in gcfg when customRuntimeYaml is empty (default) - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - asserts: - - notMatchRegex: - path: data["rstudio-connect.gcfg"] - pattern: "ClusterDefinition" - - - it: should set ClusterDefinition in gcfg when customRuntimeYaml is "base" - template: configmap.yaml - documentIndex: 0 - set: - launcher: - enabled: true - customRuntimeYaml: "base" - asserts: - - matchRegex: - path: data["rstudio-connect.gcfg"] - pattern: "ClusterDefinition = /etc/rstudio-connect/runtime.yaml" - - # ============================================================================= - # deployment.yaml - runtime.yaml volumeMount omitted when customRuntimeYaml is empty - # ============================================================================= - - - it: should not mount runtime.yaml when customRuntimeYaml is empty (default) - template: deployment.yaml - set: - launcher: - enabled: true - sharedStorage: - create: true - mount: true - asserts: - - notContains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: rstudio-connect-config - mountPath: "/etc/rstudio-connect/runtime.yaml" - subPath: "runtime.yaml" - - - it: should mount runtime.yaml when customRuntimeYaml is "base" - template: deployment.yaml - set: - launcher: - enabled: true - customRuntimeYaml: "base" - sharedStorage: - create: true - mount: true - asserts: - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: rstudio-connect-config - mountPath: "/etc/rstudio-connect/runtime.yaml" - subPath: "runtime.yaml" diff --git a/charts/rstudio-connect/tests/kubernetes_test.yaml b/charts/rstudio-connect/tests/kubernetes_test.yaml index 8c73f0665..8505aefb0 100644 --- a/charts/rstudio-connect/tests/kubernetes_test.yaml +++ b/charts/rstudio-connect/tests/kubernetes_test.yaml @@ -1132,3 +1132,25 @@ tests: - matchRegex: path: data["job.yaml"] pattern: "name: connect-content" + + - it: should set default prestart args when backends.kubernetes is enabled + template: deployment.yaml + values: + - kubernetes-values.yaml + asserts: + - equal: + path: spec.template.spec.containers[0].args + value: + - /scripts/prestart.bash + - /usr/local/bin/startup.sh + + - it: should mount prestart script when backends.kubernetes is enabled + template: deployment.yaml + values: + - kubernetes-values.yaml + asserts: + - contains: + path: spec.template.spec.containers[0].volumeMounts + content: + name: rstudio-connect-prestart + mountPath: "/scripts/" diff --git a/charts/rstudio-connect/values.yaml b/charts/rstudio-connect/values.yaml index 7946cfe0c..79f94063b 100644 --- a/charts/rstudio-connect/values.yaml +++ b/charts/rstudio-connect/values.yaml @@ -69,9 +69,9 @@ podDisruptionBudget: {} # -- Defines the Posit Connect image to deploy image: # -- The repository to use for the main pod image - repository: ghcr.io/rstudio/rstudio-connect - # -- A tag prefix for the server image (common selections: jammy-, ubuntu2204-). Only used if tag is not defined - tagPrefix: ubuntu2204- + repository: posit/connect + # -- The OS version for the image tag (e.g. ubuntu-24.04, ubuntu-22.04). Only used if tag is not defined + os: "ubuntu-24.04" # -- Overrides the image tag whose default is the chart appVersion. tag: "" # -- The imagePullPolicy for the main pod image @@ -347,18 +347,6 @@ launcher: enabled: true # -- The namespace to launch sessions into. Uses the Release namespace by default namespace: "" - # -- Deprecated, use `executionEnvironments` instead. Optional. The runtime.yaml definition of Kubernetes runtime containers. - # If set to "base", will pull in the default runtime.yaml file. - # If set to "pro", will pull in the "pro" versions of the default runtime images (i.e. including the pro drivers at the - # cost of a larger image). - # Starting with Connect v2023.05.0, this configuration is used to bootstrap the initial set of execution environments - # the first time the server starts. If any execution environments already exist in the database, these values are ignored; - # execution environments are not created or modified during subsequent restarts. - customRuntimeYaml: "" - # -- Deprecated, use `executionEnvironments` instead. Optional. Additional images to append to the end of - # the "launcher.customRuntimeYaml" (in the "images" key). - # If `customRuntimeYaml` is a "map", then "additionalRuntimeImages" will only be used if it is a "list". - additionalRuntimeImages: [] # -- User definition of launcher.kubernetes.profiles.conf for job customization launcherKubernetesProfilesConf: {} # -- Whether to use launcher templates when launching sessions. Defaults to true @@ -418,9 +406,9 @@ launcher: # -- Whether to enable the defaultInitContainer. If disabled, you must ensure that the session components are available another way. enabled: true # -- The repository to use for the Content InitContainer image - repository: ghcr.io/rstudio/rstudio-connect-content-init - # -- A tag prefix for the Content InitContainer image (common selections: jammy-, ubuntu2204-). Only used if tag is not defined - tagPrefix: ubuntu2204- + repository: posit/connect-content-init + # -- The OS version for the image tag (e.g. ubuntu-24.04, ubuntu-22.04). Only used if tag is not defined + os: "ubuntu-24.04" # -- Overrides the image tag whose default is the chart appVersion. tag: "" # -- The imagePullPolicy for the default initContainer @@ -440,8 +428,7 @@ launcher: # 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. +# Changes take effect on every helm upgrade without requiring a pod restart or database reset. # @default -- `[]` (disabled) executionEnvironments: [] # - name: ghcr.io/my-org/connect-runtime:ubuntu22 @@ -499,14 +486,13 @@ config: # For Off-Host Execution, Python versions are defined by the set of Execution Environments # https://docs.posit.co/connect/admin/python/ Executable: - - /opt/python/3.12.11/bin/python - - /opt/python/3.13.9/bin/python + - /opt/python/3.14.3/bin/python Quarto: Enabled: true # Note: The `Executable` listed below is only used for Local Execution. # For Off-Host Execution, Quarto versions are defined by the set of Execution Environments # https://docs.posit.co/connect/admin/quarto/ - Executable: "/opt/quarto/1.8.25/bin/quarto" + Executable: "/usr/local/bin/quarto" TensorFlow: Enabled: true # For off-host Execution, TensorFlow versions are defined by the set of Execution Environments https://docs.posit.co/connect/admin/tensorflow/