Skip to content
Merged
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
2 changes: 1 addition & 1 deletion charts/rstudio-pm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-pm
description: Official Helm chart for Posit Package Manager
version: 0.5.44
version: 0.5.45
apiVersion: v2
appVersion: 2024.11.0
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-pm/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog

## 0.5.45

- Allow values for `service.targetPort`, `pod.port`, and `pod.hostAliases`

## 0.5.44

Expand Down
9 changes: 6 additions & 3 deletions charts/rstudio-pm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Package Manager

![Version: 0.5.44](https://img.shields.io/badge/Version-0.5.44-informational?style=flat-square) ![AppVersion: 2024.11.0](https://img.shields.io/badge/AppVersion-2024.11.0-informational?style=flat-square)
![Version: 0.5.45](https://img.shields.io/badge/Version-0.5.45-informational?style=flat-square) ![AppVersion: 2024.11.0](https://img.shields.io/badge/AppVersion-2024.11.0-informational?style=flat-square)

#### _Official Helm chart for Posit Package Manager_

Expand All @@ -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.5.44:
To install the chart with the release name `my-release` at version 0.5.45:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.44
helm upgrade --install my-release rstudio/rstudio-pm --version=0.5.45
```

To explore other chart versions, look at:
Expand Down Expand Up @@ -232,8 +232,10 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config
| pod.annotations | object | `{}` | annotations is a map of keys / values that will be added as annotations to the pods |
| pod.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"runAsNonRoot":true,"runAsUser":999,"seccompProfile":{"type":"{{ if .Values.enableSandboxing }}Unconfined{{ else }}RuntimeDefault{{ end }}"}}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the main Package Manager container. Evaluated as a template. |
| pod.env | list | `[]` | env is an array of maps that is injected as-is into the "env:" component of the pod.container spec |
| pod.hostAliases | list | `[]` | |
| pod.labels | object | `{}` | Additional labels to add to the rstudio-pm pods |
| pod.lifecycle | object | `{}` | Container [lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) |
| pod.port | int | `4242` | |
| pod.securityContext | object | `{"fsGroup":999,"fsGroupChangePolicy":"OnRootMismatch"}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod |
| pod.serviceAccountName | string | `""` | Deprecated, use `serviceAccount.name` instead |
| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown |
Expand All @@ -251,6 +253,7 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config
| service.loadBalancerIP | string | `""` | The external IP to use with `service.type` LoadBalancer, when supported by the cloud provider |
| service.nodePort | bool | `false` | The explicit nodePort to use for `service.type` NodePort. If not provided, Kubernetes will choose one automatically |
| service.port | int | `80` | The Service port. This is the port your service will run under. |
| service.targetPort | int | `4242` | The port to forward to on the Package Manager pod. Also see pod.port |
| 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) |
| serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount, if any |
| serviceAccount.create | bool | `true` | Whether to create a [Service Account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) |
Expand Down
6 changes: 5 additions & 1 deletion charts/rstudio-pm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.pod.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -106,7 +110,7 @@ spec:
{{- toYaml .Values.pod.lifecycle | nindent 10 }}
{{- end }}
ports:
- containerPort: 4242
- containerPort: {{ .Values.pod.port }}
{{- if .Values.config.Metrics.Enabled }}
- name: metrics
containerPort: 2112
Expand Down
2 changes: 1 addition & 1 deletion charts/rstudio-pm/templates/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
targetPort: 4242
targetPort: {{ .Values.service.targetPort }}
{{- if .Values.config.Metrics.Enabled }}
- name: metrics
port: 2112
Expand Down
4 changes: 4 additions & 0 deletions charts/rstudio-pm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ service:
nodePort: false
# -- The Service port. This is the port your service will run under.
port: 80
# -- The port to forward to on the Package Manager pod. Also see pod.port
targetPort: 4242
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides service.targetPort and pod.port, there are a bunch of other 4242 references in the values, like the config.HTTP.Listen = :4242 setting, liveness/startup probe. I assume users would have to find-and-replace all 4242 references manually to fully change the running port?

Is it possible to use a template variable here so you only have to set 4242 once somewhere?

Otherwise this is fine of course, as it's still better than what we had before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @glin !

I created #652 to capture this. I'd like to see us do this across all three products to be consistent.


# -- replicas is the number of replica pods to maintain for this service
replicas: 1
Expand Down Expand Up @@ -137,8 +139,10 @@ pod:
drop: ["ALL"]
seccompProfile:
type: "{{ if .Values.enableSandboxing }}Unconfined{{ else }}RuntimeDefault{{ end }}"
port: 4242
# -- The termination grace period seconds allowed for the pod before shutdown
terminationGracePeriodSeconds: 120
hostAliases: []

# -- Extra objects to deploy (value evaluated as a template)
extraObjects: []
Expand Down