Skip to content

Commit b7182ef

Browse files
authored
Merge pull request #648 from rstudio/km/packagemanager/configurable-targetPort
PPM: implement service.targetPort as configurable
2 parents 5c054f4 + 6dfbbe9 commit b7182ef

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

charts/rstudio-pm/Chart.yaml

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

charts/rstudio-pm/NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
3+
## 0.5.45
4+
5+
- Allow values for `service.targetPort`, `pod.port`, and `pod.hostAliases`
26

37
## 0.5.44
48

charts/rstudio-pm/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Posit Package Manager
22

3-
![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)
3+
![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)
44

55
#### _Official Helm chart for Posit Package Manager_
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.5.44:
27+
To install the chart with the release name `my-release` at version 0.5.45:
2828

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

3434
To explore other chart versions, look at:
@@ -232,8 +232,10 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config
232232
| pod.annotations | object | `{}` | annotations is a map of keys / values that will be added as annotations to the pods |
233233
| 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. |
234234
| pod.env | list | `[]` | env is an array of maps that is injected as-is into the "env:" component of the pod.container spec |
235+
| pod.hostAliases | list | `[]` | |
235236
| pod.labels | object | `{}` | Additional labels to add to the rstudio-pm pods |
236237
| pod.lifecycle | object | `{}` | Container [lifecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) |
238+
| pod.port | int | `4242` | |
237239
| pod.securityContext | object | `{"fsGroup":999,"fsGroupChangePolicy":"OnRootMismatch"}` | the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the pod |
238240
| pod.serviceAccountName | string | `""` | Deprecated, use `serviceAccount.name` instead |
239241
| pod.terminationGracePeriodSeconds | int | `120` | The termination grace period seconds allowed for the pod before shutdown |
@@ -251,6 +253,7 @@ The Helm `config` values are converted into the `rstudio-pm.gcfg` service config
251253
| service.loadBalancerIP | string | `""` | The external IP to use with `service.type` LoadBalancer, when supported by the cloud provider |
252254
| service.nodePort | bool | `false` | The explicit nodePort to use for `service.type` NodePort. If not provided, Kubernetes will choose one automatically |
253255
| service.port | int | `80` | The Service port. This is the port your service will run under. |
256+
| service.targetPort | int | `4242` | The port to forward to on the Package Manager pod. Also see pod.port |
254257
| 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) |
255258
| serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount, if any |
256259
| serviceAccount.create | bool | `true` | Whether to create a [Service Account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) |

charts/rstudio-pm/templates/deployment.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ spec:
4949
imagePullSecrets:
5050
{{- toYaml . | nindent 8 }}
5151
{{- end }}
52+
{{- with .Values.pod.hostAliases }}
53+
hostAliases:
54+
{{- toYaml . | nindent 8 }}
55+
{{- end }}
5256
{{- with .Values.nodeSelector }}
5357
nodeSelector:
5458
{{- toYaml . | nindent 8 }}
@@ -106,7 +110,7 @@ spec:
106110
{{- toYaml .Values.pod.lifecycle | nindent 10 }}
107111
{{- end }}
108112
ports:
109-
- containerPort: 4242
113+
- containerPort: {{ .Values.pod.port }}
110114
{{- if .Values.config.Metrics.Enabled }}
111115
- name: metrics
112116
containerPort: 2112

charts/rstudio-pm/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: 4242
30+
targetPort: {{ .Values.service.targetPort }}
3131
{{- if .Values.config.Metrics.Enabled }}
3232
- name: metrics
3333
port: 2112

charts/rstudio-pm/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ service:
8585
nodePort: false
8686
# -- The Service port. This is the port your service will run under.
8787
port: 80
88+
# -- The port to forward to on the Package Manager pod. Also see pod.port
89+
targetPort: 4242
8890

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

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

0 commit comments

Comments
 (0)