Skip to content

Commit 8c3673d

Browse files
add resource limits for chronicle (#699)
* add resource limits to chronicle stateful set * Update helm-docs and README.md * bump chart version * Update helm-docs and README.md * remove default resource limits * Update helm-docs and README.md * move resources to pod level * Update helm-docs and README.md * move resources to pod level * update chronicle news * add resources for chronicle agent in connect * add resources for chronicle agent in workbench * bump chart versions * Update helm-docs and README.md * add unit test * Update helm-docs and README.md * try updating unit test * remove unit test --------- Co-authored-by: GitHub Actions <[email protected]>
1 parent 4eab347 commit 8c3673d

File tree

16 files changed

+87
-14
lines changed

16 files changed

+87
-14
lines changed

charts/posit-chronicle/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: posit-chronicle
33
description: Official Helm chart for Posit Chronicle Server
4-
version: 0.4.3
4+
version: 0.4.4
55
appVersion: 2025.05.3
66
icon: https://posit.co/wp-content/themes/Posit/dist/images/favicon/apple-touch-icon-180x180.png
77
home: https://www.posit.co

charts/posit-chronicle/NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.4.4
4+
- Add option for CPU/Memory requests and limits to the chart.
5+
36
## 0.4.1
47
- Bump Chronicle to version 2025.05.3
58

charts/posit-chronicle/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Posit Chronicle
22

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

55
#### _Official Helm chart for Posit Chronicle Server_
66

@@ -25,11 +25,11 @@ To ensure a stable production deployment:
2525

2626
## Installing the chart
2727

28-
To install the chart with the release name `my-release` at version 0.4.3:
28+
To install the chart with the release name `my-release` at version 0.4.4:
2929

3030
```{.bash}
3131
helm repo add rstudio https://helm.rstudio.com
32-
helm upgrade --install my-release rstudio/posit-chronicle --version=0.4.3
32+
helm upgrade --install my-release rstudio/posit-chronicle --version=0.4.4
3333
```
3434

3535
To explore other chart versions, look at:
@@ -246,6 +246,7 @@ reference page](https://docs.posit.co/chronicle/appendix/library/advanced-server
246246
| pod.env | list | `[]` | Additional environment variables to set on the Chronicle server container |
247247
| pod.labels | object | `{}` | Additional labels for pods |
248248
| pod.nodeSelector | object | `{}` | A map used verbatim as the pod "nodeSelector" definition |
249+
| pod.resources | object | `{}` | Defines resources for the posit-chronicle container |
249250
| pod.securityContext | object | `{"fsGroup":1000,"fsGroupChangePolicy":"OnRootMismatch"}` | The pod-level security context ([reference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#podsecuritycontext-v1-core)) |
250251
| pod.terminationGracePeriodSeconds | int | `30` | The termination grace period seconds allowed for the pod before shutdown |
251252
| pod.tolerations | list | `[]` | An array used verbatim as the pod "tolerations" definition |

charts/posit-chronicle/templates/stateful-set.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ spec:
6969
- containerPort: 5252
7070
name: http
7171
{{- end }}
72+
{{- with .Values.pod.resources }}
73+
resources:
74+
{{- toYaml . | nindent 10 }}
75+
{{- end }}
7276
volumeMounts:
7377
{{- if .Values.persistence.enabled }}
7478
- name: {{ include "posit-chronicle.fullname" . }}

charts/posit-chronicle/tests/statefulset_test.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,30 @@ tests:
185185
- name: config
186186
mountPath: /etc/posit-chronicle/posit-chronicle.gcfg
187187
subPath: posit-chronicle.gcfg
188+
- it: should set resource limits if given
189+
set:
190+
pod:
191+
resources:
192+
limits:
193+
cpu: 2000m
194+
ephemeral-storage: 200Mi
195+
memory: 3Gi
196+
requests:
197+
cpu: 1000m
198+
ephemeral-storage: 100Mi
199+
memory: 2Gi
200+
asserts:
201+
- equal:
202+
path: spec.template.spec.containers[0].resources
203+
value:
204+
limits:
205+
cpu: 2000m
206+
ephemeral-storage: 200Mi
207+
memory: 3Gi
208+
requests:
209+
cpu: 1000m
210+
ephemeral-storage: 100Mi
211+
memory: 2Gi
188212
- it: should set an overridden image if given
189213
set:
190214
image:

charts/posit-chronicle/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ pod:
7777
securityContext:
7878
fsGroup: 1000
7979
fsGroupChangePolicy: "OnRootMismatch"
80-
80+
# -- Defines resources for the posit-chronicle container
81+
resources: {}
82+
# requests:
83+
# memory: "1Gi"
84+
# cpu: "100m"
85+
# limits:
86+
# memory: "2Gi"
87+
# cpu: "2000m"
8188

8289
# Configuration for application Persistent Volume Claims
8390
persistence:

charts/rstudio-connect/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rstudio-connect
22
description: Official Helm chart for Posit Connect
3-
version: 0.8.5
3+
version: 0.8.6
44
apiVersion: v2
55
appVersion: 2025.07.0
66
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png

charts/rstudio-connect/NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.8.6
4+
5+
- Add options to specify resources for the Chronicle Agent container.
6+
37
## 0.8.5
48

59
- Bump Connect version to 2025.07.0

charts/rstudio-connect/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Posit Connect
22

3-
![Version: 0.8.5](https://img.shields.io/badge/Version-0.8.5-informational?style=flat-square) ![AppVersion: 2025.07.0](https://img.shields.io/badge/AppVersion-2025.07.0-informational?style=flat-square)
3+
![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)
44

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

@@ -30,11 +30,11 @@ To ensure reproducibility in your environment and insulate yourself from future
3030

3131
## Installing the chart
3232

33-
To install the chart with the release name `my-release` at version 0.8.5:
33+
To install the chart with the release name `my-release` at version 0.8.6:
3434

3535
```{.bash}
3636
helm repo add rstudio https://helm.rstudio.com
37-
helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.5
37+
helm upgrade --install my-release rstudio/rstudio-connect --version=0.8.6
3838
```
3939

4040
To explore other chart versions, look at:
@@ -227,6 +227,7 @@ The Helm `config` values are converted into the `rstudio-connect.gcfg` service c
227227
| chronicleAgent.image.repository | string | `"rstudio/chronicle-agent"` | The Chronicle agent image repository |
228228
| chronicleAgent.image.sha | string | `""` | The Chronicle agent image digest |
229229
| chronicleAgent.image.tag | string | `"2025.05.2"` | The Chronicle agent image tag, defaults to using the auto-discovered Chronicle server version or is required if `chronicleAgent.autoDiscovery=false` |
230+
| chronicleAgent.resources | object | `{}` | Defines resources for the posit-chronicle-agent container |
230231
| chronicleAgent.securityContext | object | `{"privileged":false,"runAsNonRoot":true}` | The container-level security context for the Chronicle agent container |
231232
| chronicleAgent.serverAddress | string | `""` | Address for the Chronicle server including the protocol (ex. "http://address"), defaults to auto-discovered Chronicle server in the given namespace or is required if `chronicleAgent.autoDiscovery=false` |
232233
| chronicleAgent.serverNamespace | string | `""` | Namespace to search for the Chronicle server when `chronicleAgent.autoDiscovery=true`, has no effect if `chronicleAgent.autoDiscovery=false` |

charts/rstudio-connect/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ spec:
104104
{{- end }}
105105
imagePullPolicy: {{ .Values.chronicleAgent.image.imagePullPolicy }}
106106
restartPolicy: Always
107+
{{- with .Values.chronicleAgent.resources }}
108+
resources:
109+
{{- toYaml . | nindent 10 }}
110+
{{- end }}
107111
{{- with .Values.chronicleAgent.volumeMounts }}
108112
volumeMounts:
109113
{{- toYaml . | nindent 10 }}

0 commit comments

Comments
 (0)