From 81ca5738415c132f92587ae4701dcf8a2708274b Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 6 Aug 2025 10:29:11 -0600 Subject: [PATCH 1/5] Skip rstudio-library call for Chronicle Agent server address if auto-discovery is disabled Require server address be specified if auto-discovery is disabled --- charts/rstudio-connect/templates/deployment.yaml | 4 ++++ charts/rstudio-workbench/templates/deployment.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/rstudio-connect/templates/deployment.yaml b/charts/rstudio-connect/templates/deployment.yaml index bf9b2961..95d5e87c 100644 --- a/charts/rstudio-connect/templates/deployment.yaml +++ b/charts/rstudio-connect/templates/deployment.yaml @@ -118,7 +118,11 @@ spec: {{- end }} env: - name: CHRONICLE_SERVER_ADDRESS + {{- if .Values.chronicleAgent.autoDiscovery }} value: {{ include "rstudio-library.chronicle-agent.serverAddress" (dict "chronicleAgent" .Values.chronicleAgent "Release" .Release) | trim | quote }} + {{- else }} + value: {{ required "chronicleAgent.serverAddress must be specified if autoDiscovery is disabled." .Values.chronicleAgent.serverAddress | quote }} + {{- end }} - name: CHRONICLE_CONNECT_APIKEY {{- if .Values.chronicleAgent.connectApiKey.valueFrom }} valueFrom: diff --git a/charts/rstudio-workbench/templates/deployment.yaml b/charts/rstudio-workbench/templates/deployment.yaml index 1700e68e..b9550db0 100644 --- a/charts/rstudio-workbench/templates/deployment.yaml +++ b/charts/rstudio-workbench/templates/deployment.yaml @@ -125,7 +125,11 @@ spec: {{- end }} env: - name: CHRONICLE_SERVER_ADDRESS + {{- if .Values.chronicleAgent.autoDiscovery }} value: {{ include "rstudio-library.chronicle-agent.serverAddress" (dict "chronicleAgent" .Values.chronicleAgent "Release" .Release) | trim | quote }} + {{- else }} + value: {{ required "chronicleAgent.serverAddress must be specified if autoDiscovery is disabled." .Values.chronicleAgent.serverAddress | quote }} + {{- end }} - name: CHRONICLE_WORKBENCH_APIKEY {{- if .Values.chronicleAgent.workbenchApiKey.valueFrom }} valueFrom: From 114f230172e19b5344c4520deced6049a0034175 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 6 Aug 2025 10:29:59 -0600 Subject: [PATCH 2/5] Enhance server address template logic to check lookup returns values Fail template if no server address is resolved --- charts/rstudio-library/templates/_chronicle-agent.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/rstudio-library/templates/_chronicle-agent.tpl b/charts/rstudio-library/templates/_chronicle-agent.tpl index 6f8a40a7..3481b7de 100644 --- a/charts/rstudio-library/templates/_chronicle-agent.tpl +++ b/charts/rstudio-library/templates/_chronicle-agent.tpl @@ -39,7 +39,7 @@ Takes a dict: {{- define "rstudio-library.chronicle-agent.serverAddress" }} {{- if .chronicleAgent.serverAddress }} {{- .chronicleAgent.serverAddress }} -{{- else }} +{{- else if lookup "v1" "Service" (default .Release.Namespace .chronicleAgent.serverNamespace) "" }} {{- range $index, $service := (lookup "v1" "Service" (default .Release.Namespace .chronicleAgent.serverNamespace) "").items }} {{- $name := get $service.metadata.labels "app.kubernetes.io/name" }} {{- $component := get $service.metadata.labels "app.kubernetes.io/component" }} @@ -47,5 +47,7 @@ Takes a dict: {{- (index $service.spec.ports 0).name }}://{{ $service.metadata.name }}.{{ $service.metadata.namespace }} {{- end }} {{- end }} +{{- else }} +{{- fail "Unable to resolve a Chronicle server address for Chronicle agent. Ensure that a Chronicle server is deployed in the same namespace as this chart or the namespace is specfied with chronicleAgent.serverNamespace when using chronicleAgent.autoDiscovery=true. Alternatively, specify chronicleAgent.serverAddress in the values.yaml file." }} {{- end }} {{- end }} From af167097b197199c1633a11b8fb7fe901e599005 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 6 Aug 2025 10:31:46 -0600 Subject: [PATCH 3/5] Bump rstudio-library --- charts/rstudio-library/Chart.yaml | 4 ++-- charts/rstudio-library/NEWS.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charts/rstudio-library/Chart.yaml b/charts/rstudio-library/Chart.yaml index 3b786201..1a4794be 100644 --- a/charts/rstudio-library/Chart.yaml +++ b/charts/rstudio-library/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rstudio-library description: Helm library helpers for use by official RStudio charts type: library -version: 0.1.34 -appVersion: 0.1.34 +version: 0.1.35 +appVersion: 0.1.35 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png home: https://www.rstudio.com diff --git a/charts/rstudio-library/NEWS.md b/charts/rstudio-library/NEWS.md index 068e0f42..e9237354 100644 --- a/charts/rstudio-library/NEWS.md +++ b/charts/rstudio-library/NEWS.md @@ -1,5 +1,10 @@ # Changelog +# 0.1.35 + +- Fix `rstudio-library.chronicle-agent.serverAddress` failure when lookup returns none. +- Fail `rstudio-library.chronicle-agent.serverAddress` if no server address could be resolved. + ## 0.1.34 - Add HTTP/HTTPS protocol prefix to `rstudio-library.chronicle-agent.serverAddress` function return. From 6a4ca23d597bf0efc69b0b17a6cabf375c43b411 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Wed, 6 Aug 2025 10:35:39 -0600 Subject: [PATCH 4/5] Bump rstudio-workbench and rstudio-connect --- charts/rstudio-connect/Chart.yaml | 2 +- charts/rstudio-connect/NEWS.md | 5 +++++ charts/rstudio-workbench/Chart.yaml | 2 +- charts/rstudio-workbench/NEWS.md | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/rstudio-connect/Chart.yaml b/charts/rstudio-connect/Chart.yaml index 3282e585..40364ffb 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.8.6 +version: 0.8.7 apiVersion: v2 appVersion: 2025.07.0 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 4ca02b81..9584b52c 100644 --- a/charts/rstudio-connect/NEWS.md +++ b/charts/rstudio-connect/NEWS.md @@ -1,5 +1,10 @@ # Changelog +## 0.8.7 + +- Skip `rstudio-library` template call when `chronicleAgent.autoDiscovery=false`. Require `chronicleAgent.serverAddress` + to be set instead. + ## 0.8.6 - Add options to specify resources for the Chronicle Agent container. diff --git a/charts/rstudio-workbench/Chart.yaml b/charts/rstudio-workbench/Chart.yaml index 28a97f78..fcf6c775 100644 --- a/charts/rstudio-workbench/Chart.yaml +++ b/charts/rstudio-workbench/Chart.yaml @@ -1,6 +1,6 @@ name: rstudio-workbench description: Official Helm chart for Posit Workbench -version: 0.9.10 +version: 0.9.11 apiVersion: v2 appVersion: 2025.05.1 icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png diff --git a/charts/rstudio-workbench/NEWS.md b/charts/rstudio-workbench/NEWS.md index 14c52492..1e875133 100644 --- a/charts/rstudio-workbench/NEWS.md +++ b/charts/rstudio-workbench/NEWS.md @@ -1,5 +1,10 @@ # Changelog +## 0.9.11 + +- Skip `rstudio-library` template call when `chronicleAgent.autoDiscovery=false`. Require `chronicleAgent.serverAddress` + to be set instead. + ## 0.9.10 - Fix a bug with the new `ephermalStorage` options where it was set every time, even if it was unset in the `values.yaml`. From a2aa494d80a8e169a634fa551102f41d0e01e44e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 6 Aug 2025 16:40:22 +0000 Subject: [PATCH 5/5] Update helm-docs and README.md --- charts/rstudio-connect/README.md | 6 +++--- charts/rstudio-library/README.md | 2 +- charts/rstudio-workbench/README.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/rstudio-connect/README.md b/charts/rstudio-connect/README.md index 5be514c7..57039706 100644 --- a/charts/rstudio-connect/README.md +++ b/charts/rstudio-connect/README.md @@ -1,6 +1,6 @@ # Posit Connect -![Version: 0.8.6](https://img.shields.io/badge/Version-0.8.6-informational?style=flat-square) ![AppVersion: 2025.07.0](https://img.shields.io/badge/AppVersion-2025.07.0-informational?style=flat-square) +![Version: 0.8.7](https://img.shields.io/badge/Version-0.8.7-informational?style=flat-square) ![AppVersion: 2025.07.0](https://img.shields.io/badge/AppVersion-2025.07.0-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.8.6: +To install the chart with the release name `my-release` at version 0.8.7: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.6 +helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.7 ``` To explore other chart versions, look at: diff --git a/charts/rstudio-library/README.md b/charts/rstudio-library/README.md index 98d3fd3e..793fdc8f 100644 --- a/charts/rstudio-library/README.md +++ b/charts/rstudio-library/README.md @@ -1,6 +1,6 @@ # rstudio-library -![Version: 0.1.34](https://img.shields.io/badge/Version-0.1.34-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.34](https://img.shields.io/badge/AppVersion-0.1.34-informational?style=flat-square) +![Version: 0.1.35](https://img.shields.io/badge/Version-0.1.35-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.35](https://img.shields.io/badge/AppVersion-0.1.35-informational?style=flat-square) #### _Helm library helpers for use by official RStudio charts_ diff --git a/charts/rstudio-workbench/README.md b/charts/rstudio-workbench/README.md index a5af6e40..f4847cb5 100644 --- a/charts/rstudio-workbench/README.md +++ b/charts/rstudio-workbench/README.md @@ -1,6 +1,6 @@ # Posit Workbench -![Version: 0.9.10](https://img.shields.io/badge/Version-0.9.10-informational?style=flat-square) ![AppVersion: 2025.05.1](https://img.shields.io/badge/AppVersion-2025.05.1-informational?style=flat-square) +![Version: 0.9.11](https://img.shields.io/badge/Version-0.9.11-informational?style=flat-square) ![AppVersion: 2025.05.1](https://img.shields.io/badge/AppVersion-2025.05.1-informational?style=flat-square) #### _Official Helm chart for Posit Workbench_ @@ -24,11 +24,11 @@ To ensure a stable production deployment: ## Installing the chart -To install the chart with the release name `my-release` at version 0.9.10: +To install the chart with the release name `my-release` at version 0.9.11: ```{.bash} helm repo add rstudio https://helm.rstudio.com -helm upgrade --install my-release rstudio/rstudio-workbench --version=0.9.10 +helm upgrade --install my-release rstudio/rstudio-workbench --version=0.9.11 ``` To explore other chart versions, look at: