Skip to content

Commit 5c054f4

Browse files
authored
Merge pull request #649 from rstudio/km/workbench/configurable-targetPort-etal
PWB: add `targetPort`, `hostAliases` fix `pod.port`
2 parents 2a90068 + 0ee68e5 commit 5c054f4

File tree

8 files changed

+30
-7
lines changed

8 files changed

+30
-7
lines changed

Diff for: charts/rstudio-workbench/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rstudio-workbench
22
description: Official Helm chart for Posit Workbench
3-
version: 0.8.12
3+
version: 0.8.13
44
apiVersion: v2
55
appVersion: 2024.12.1
66
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png

Diff for: charts/rstudio-workbench/NEWS.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.8.13
4+
5+
- Add `service.targetPort`
6+
- Add `pod.hostAliases` and `launcher.templateValues.pod.hostAliases`
7+
- Fix `pod.port`: now mapped correctly in `_helpers.tpl`
8+
39
## 0.8.12
410

511
- Bump Chronicle Agent to version 2025.03.0

Diff for: charts/rstudio-workbench/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Posit Workbench
22

3-
![Version: 0.8.12](https://img.shields.io/badge/Version-0.8.12-informational?style=flat-square) ![AppVersion: 2024.12.1](https://img.shields.io/badge/AppVersion-2024.12.1-informational?style=flat-square)
3+
![Version: 0.8.13](https://img.shields.io/badge/Version-0.8.13-informational?style=flat-square) ![AppVersion: 2024.12.1](https://img.shields.io/badge/AppVersion-2024.12.1-informational?style=flat-square)
44

55
#### _Official Helm chart for Posit Workbench_
66

@@ -24,11 +24,11 @@ To ensure a stable production deployment:
2424

2525
## Installing the chart
2626

27-
To install the chart with the release name `my-release` at version 0.8.12:
27+
To install the chart with the release name `my-release` at version 0.8.13:
2828

2929
```{.bash}
3030
helm repo add rstudio https://helm.rstudio.com
31-
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.12
31+
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.13
3232
```
3333

3434
To explore other chart versions, look at:
@@ -504,7 +504,7 @@ Use of [Sealed secrets](https://github.com/bitnami-labs/sealed-secrets) disables
504504
| launcher.includeTemplateValues | bool | `true` | whether to include the templateValues rendering process |
505505
| launcher.kubernetesHealthCheck | object | `{"enabled":true,"extraCurlArgs":["-fsSL"]}` | configuration for the "Kubernetes Health Check" that the launcher entrypoint runs at startup |
506506
| launcher.namespace | string | `""` | allow customizing the namespace that sessions are launched into. Note RBAC and some config issues today |
507-
| launcher.templateValues | object | `{"job":{"annotations":{},"labels":{},"ttlSecondsAfterFinished":null},"pod":{"affinity":{},"annotations":{},"command":[],"containerSecurityContext":{},"defaultSecurityContext":{},"env":[],"extraContainers":[],"imagePullPolicy":"","imagePullSecrets":[],"initContainers":[],"labels":{},"nodeSelector":{},"securityContext":{},"serviceAccountName":"","tolerations":[],"volumeMounts":[],"volumes":[]},"service":{"annotations":{},"labels":{},"type":"ClusterIP"}}` | values that are passed along to the launcher job rendering process as a data object (in JSON). These values are then used within session templates. |
507+
| launcher.templateValues | object | `{"job":{"annotations":{},"labels":{},"ttlSecondsAfterFinished":null},"pod":{"affinity":{},"annotations":{},"command":[],"containerSecurityContext":{},"defaultSecurityContext":{},"env":[],"extraContainers":[],"hostAliases":[],"imagePullPolicy":"","imagePullSecrets":[],"initContainers":[],"labels":{},"nodeSelector":{},"securityContext":{},"serviceAccountName":"","tolerations":[],"volumeMounts":[],"volumes":[]},"service":{"annotations":{},"labels":{},"type":"ClusterIP"}}` | values that are passed along to the launcher job rendering process as a data object (in JSON). These values are then used within session templates. |
508508
| launcher.templateValues.pod.command | list | `[]` | command for all pods. This is really not something we should expose and will be removed once we have a better option |
509509
| launcher.useTemplates | bool | `false` | whether to render and use templates in the job launching process |
510510
| launcherPem | string | `""` | An inline launcher.pem key. If not provided, one will be auto-generated. See README for more details. |
@@ -523,6 +523,7 @@ Use of [Sealed secrets](https://github.com/bitnami-labs/sealed-secrets) disables
523523
| nodeSelector | object | `{}` | A map used verbatim as the pod's "nodeSelector" definition |
524524
| pod.annotations | object | `{}` | Additional annotations to add to the rstudio-workbench pods |
525525
| pod.env | list | `[]` | env is an array of maps that is injected as-is into the "env:" component of the pod.container spec |
526+
| pod.hostAliases | list | `[]` | Array of hostnames to supply to the main pod |
526527
| pod.labels | object | `{}` | Additional labels to add to the rstudio-workbench pods |
527528
| pod.lifecycle | object | `{}` | container lifecycle hooks |
528529
| pod.port | int | `8787` | The containerPort used by the main pod container |
@@ -559,6 +560,7 @@ Use of [Sealed secrets](https://github.com/bitnami-labs/sealed-secrets) disables
559560
| service.loadBalancerIP | string | `""` | The external IP to use with `service.type` LoadBalancer, when supported by the cloud provider |
560561
| service.nodePort | bool | `false` | The explicit nodePort to use for `service.type` NodePort. If not provided, Kubernetes will choose one automatically |
561562
| service.port | int | `80` | The Service port. This is the port your service will run under. |
563+
| service.targetPort | int | `8787` | The port to forward to on the Workbench pod. Also see pod.port |
562564
| service.type | string | `"ClusterIP"` | The service type, usually ClusterIP (in-cluster only) or LoadBalancer (to expose the service using your cloud provider's load balancer) |
563565
| serviceMonitor.additionalLabels | object | `{}` | additionalLabels normally includes the release name of the Prometheus Operator |
564566
| serviceMonitor.enabled | bool | `false` | Whether to create a ServiceMonitor CRD for use with a Prometheus Operator |

Diff for: charts/rstudio-workbench/files/job.tpl

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ spec:
8888
{{- if or $templateData.pod.serviceAccountName .Job.serviceAccountName }}
8989
serviceAccountName: {{ .Job.serviceAccountName | default $templateData.pod.serviceAccountName | quote }}
9090
{{- end }}
91+
{{- with $templateData.pod.hostAliases }}
92+
hostAliases:
93+
{{- toYaml . | nindent 8 }}
94+
{{- end }}
9195
shareProcessNamespace: {{ .Job.shareProcessNamespace }}
9296
{{- if or (ne (len .Job.volumes) 0) (ne (len $templateData.pod.volumes) 0) }}
9397
volumes:

Diff for: charts/rstudio-workbench/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ containers:
8787
{{- end }}
8888
imagePullPolicy: "{{ .Values.image.imagePullPolicy }}"
8989
ports:
90-
- containerPort: 8787
90+
- containerPort: {{ .Values.pod.port }}
9191
name: http
9292
{{- if and .Values.prometheus.enabled (not .Values.prometheus.legacy) }}
9393
- containerPort: {{ .Values.prometheus.port }}

Diff for: charts/rstudio-workbench/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ spec:
7272
nodeSelector:
7373
{{- toYaml . | nindent 8 }}
7474
{{- end }}
75+
{{- with .Values.pod.hostAliases }}
76+
hostAliases:
77+
{{- toYaml . | nindent 8 }}
78+
{{- end }}
7579
{{- with .Values.affinity }}
7680
affinity:
7781
{{- toYaml . | nindent 8 }}

Diff for: charts/rstudio-workbench/templates/svc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
2828
nodePort: {{ .Values.service.nodePort }}
2929
{{- end }}
30-
targetPort: 8787
30+
targetPort: {{ .Values.service.targetPort }}
3131
{{- if .Values.prometheus.enabled }}
3232
- name: metrics
3333
targetPort: metrics

Diff for: charts/rstudio-workbench/values.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ launcher:
101101
tolerations: []
102102
affinity: {}
103103
nodeSelector: {}
104+
hostAliases: []
104105
# -- command for all pods. This is really not something we should expose and will be removed once we have a better option
105106
command: []
106107
job:
@@ -188,6 +189,9 @@ service:
188189
nodePort: false
189190
# -- The Service port. This is the port your service will run under.
190191
port: 80
192+
# -- The port to forward to on the Workbench pod. Also see pod.port
193+
targetPort: 8787
194+
191195

192196
# -- resources define requests and limits for the rstudio-server pod
193197
resources:
@@ -320,6 +324,9 @@ pod:
320324
lifecycle: {}
321325
# -- The termination grace period seconds allowed for the pod before shutdown
322326
terminationGracePeriodSeconds: 120
327+
# -- Array of hostnames to supply to the main pod
328+
hostAliases: []
329+
323330

324331
prometheus:
325332
# -- The parent setting for whether to enable prometheus metrics. Default is to use the built-in product exporter

0 commit comments

Comments
 (0)