From a8623f70de8f8644d203aef3bbc635950f336697 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Wed, 15 Sep 2021 11:12:37 -0400 Subject: [PATCH 1/4] remove/update python configurations in example connect values --- .../connect/high-availability-nginx-launcher/values.yaml | 5 ----- examples/connect/standalone/values.yaml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/connect/high-availability-nginx-launcher/values.yaml b/examples/connect/high-availability-nginx-launcher/values.yaml index 5ec592e0..c163e444 100644 --- a/examples/connect/high-availability-nginx-launcher/values.yaml +++ b/examples/connect/high-availability-nginx-launcher/values.yaml @@ -78,11 +78,6 @@ config: # Enables building and executing Python content. Python: Enabled: true - # Note: this setting will no longer be required in a future version of Connect. - # When running Connect with launcher enabled, Python installations should be defined in - # runtime.yaml files, specified by Launcher.ClusterDefinition. - Executable: - - "/opt/python/3.9.5/bin/python" Database: Provider: "Postgres" diff --git a/examples/connect/standalone/values.yaml b/examples/connect/standalone/values.yaml index ef17c987..fed5f654 100644 --- a/examples/connect/standalone/values.yaml +++ b/examples/connect/standalone/values.yaml @@ -23,7 +23,7 @@ config: Python: Enabled: true Executable: - - /opt/python/3.6.5/bin/python + - /opt/python/3.9.5/bin/python 'RPackageRepository "CRAN"': URL: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest 'RPackageRepository "RSPM"': From 61da549d2db1df984ba78db4f0aaa11da878f7b3 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 23 Sep 2021 13:57:14 -0400 Subject: [PATCH 2/4] enable python by default when launcher.enabled=true --- charts/rstudio-connect/Chart.yaml | 2 +- charts/rstudio-connect/NEWS.md | 12 ++++++++---- charts/rstudio-connect/templates/_helpers.tpl | 4 +++- .../high-availability-nginx-launcher/values.yaml | 4 ---- .../connect/high-availability-traefik/values.yaml | 6 ++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index af77df29..74bcd6f6 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 RStudio Connect -version: 0.2.3 +version: 0.2.4 apiVersion: v2 appVersion: 2021.08.2 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index e9aa9ce5..31a1560b 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,13 +1,17 @@ +# 0.2.4 + +- Enabled Python support in Connect by default when `launcher.enabled=true` + # 0.2.3 - Update default RStudio Connect version to 2021.08.2 # 0.2.2 -- Added a new parameter `rbac.clusterRoleCreate` to `values.yaml` to allow for disabling the creation of the +- Added a new parameter `rbac.clusterRoleCreate` to `values.yaml` to allow for disabling the creation of the `ClusterRole` that allows for access to the nodes API. This API is used to ensure that all of the IP addresses - for nodes are available when reporting the addresses of the node that is running a particular job so that - clients can connect to it. This is generally not a needed permission for the Launcher as the internal IP is + for nodes are available when reporting the addresses of the node that is running a particular job so that + clients can connect to it. This is generally not a needed permission for the Launcher as the internal IP is usually sufficient, so it is disabled by default. # 0.2.1 @@ -33,7 +37,7 @@ - Change default configuration when launcher is enabled - Add the ability to more easily customize `launcher.kubernetes.profiles.conf` - Set up the profiles defaults to include the init container -- Allow more easily mounting a named PVC that was not created by the chart +- Allow more easily mounting a named PVC that was not created by the chart - Make the "target" launcher namespace configurable - Add a default value for `service.port: 80` diff --git a/charts/rstudio-connect/templates/_helpers.tpl b/charts/rstudio-connect/templates/_helpers.tpl index 02acdfbe..73a68f20 100644 --- a/charts/rstudio-connect/templates/_helpers.tpl +++ b/charts/rstudio-connect/templates/_helpers.tpl @@ -64,7 +64,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- $namespace := default $.Release.Namespace .Values.launcher.namespace }} {{- $launcherSettingsDict := dict "Enabled" ("true") "Kubernetes" ("true") "ClusterDefinition" (list "/etc/rstudio-connect/runtime.yaml") "KubernetesNamespace" ($namespace) "KubernetesProfilesConfig" ("/etc/rstudio-connect/launcher.kubernetes.profiles.conf") }} {{- $launcherDict := dict "Launcher" ( $launcherSettingsDict ) }} - {{- $defaultConfig = merge $defaultConfig $launcherDict }} + {{- $pythonSettingsDict := dict "Enabled" ("true") }} + {{- $pythonDict := dict "Python" ( $pythonSettingsDict ) }} + {{- $defaultConfig = merge $defaultConfig $launcherDict $pythonDict }} {{- end }} {{- /* default licensing configuration */}} {{- if .Values.license.server }} diff --git a/examples/connect/high-availability-nginx-launcher/values.yaml b/examples/connect/high-availability-nginx-launcher/values.yaml index c163e444..c26e79e2 100644 --- a/examples/connect/high-availability-nginx-launcher/values.yaml +++ b/examples/connect/high-availability-nginx-launcher/values.yaml @@ -75,10 +75,6 @@ config: # Note: `DataDir` has the same value as `pod.volumeMounts.mountPath`. DataDir: "/var/lib/rstudio-connect" - # Enables building and executing Python content. - Python: - Enabled: true - Database: Provider: "Postgres" diff --git a/examples/connect/high-availability-traefik/values.yaml b/examples/connect/high-availability-traefik/values.yaml index 488f1564..e7b36999 100644 --- a/examples/connect/high-availability-traefik/values.yaml +++ b/examples/connect/high-availability-traefik/values.yaml @@ -80,12 +80,10 @@ config: # Note: `DataDir` has the same value as `pod.volumeMounts.mountPath`. DataDir: "/var/lib/rstudio-connect" - # Enables building and executing Python content. + # Enables building and executing Python content Python: Enabled: true - # Note: this setting will no longer be required in a future version of Connect. - # When running Connect with launcher enabled, Python installations should be defined in - # runtime.yaml files, specified by Launcher.ClusterDefinition. + # An executable path must be provided when using local execution Executable: - "/opt/python/3.9.5/bin/python" From 8c1d151e4d21201d16309e718cf0e1ad9433c539 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 23 Sep 2021 17:57:37 +0000 Subject: [PATCH 3/4] Update helm-docs and README.md --- charts/rstudio-connect/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index edf6f756..ea185941 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # RStudio Connect -![Version: 0.2.3](https://img.shields.io/badge/Version-0.2.3-informational?style=flat-square) ![AppVersion: 2021.08.2](https://img.shields.io/badge/AppVersion-2021.08.2-informational?style=flat-square) +![Version: 0.2.4](https://img.shields.io/badge/Version-0.2.4-informational?style=flat-square) ![AppVersion: 2021.08.2](https://img.shields.io/badge/AppVersion-2021.08.2-informational?style=flat-square) #### _Official Helm chart for RStudio Connect_ @@ -23,11 +23,11 @@ As a result, please: ## Installing the Chart -To install the chart with the release name `my-release` at version 0.2.3: +To install the chart with the release name `my-release` at version 0.2.4: ```bash helm repo add rstudio https://helm.rstudio.com -helm install my-release rstudio/rstudio-connect --version=0.2.3 +helm install my-release rstudio/rstudio-connect --version=0.2.4 ``` ## Required Configuration From bf2b3477687f9beaf8e40601c60d62b97058cef0 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 23 Sep 2021 15:27:27 -0400 Subject: [PATCH 4/4] fix config value precendence when merging .Values.config into the final .gcfg file --- charts/rstudio-connect/NEWS.md | 2 ++ charts/rstudio-connect/templates/_helpers.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/rstudio-connect/NEWS.md b/charts/rstudio-connect/NEWS.md index 31a1560b..0f9c6362 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,6 +1,8 @@ # 0.2.4 - Enabled Python support in Connect by default when `launcher.enabled=true` +- Any values defined in the `config` section now take precendence over + those that are set by the Helm chart's logic. # 0.2.3 diff --git a/charts/rstudio-connect/templates/_helpers.tpl b/charts/rstudio-connect/templates/_helpers.tpl index 73a68f20..269aaf29 100644 --- a/charts/rstudio-connect/templates/_helpers.tpl +++ b/charts/rstudio-connect/templates/_helpers.tpl @@ -73,7 +73,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- $licenseDict := dict "Licensing" ( dict "LicenseType" ("Remote") ) }} {{- $defaultConfig = merge $defaultConfig $licenseDict }} {{- end }} - {{- include "rstudio-library.config.gcfg" (merge .Values.config $defaultConfig) }} + {{- include "rstudio-library.config.gcfg" ( mergeOverwrite $defaultConfig .Values.config ) }} {{- end -}} {{- define "rstudio-connect.annotations" -}}