Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added optional resources to default initContainer #542

Closed
wants to merge 2 commits into from

Conversation

tkraan
Copy link
Contributor

@tkraan tkraan commented Aug 23, 2024

Closes #541

@dbkegley
Copy link
Contributor

@tkraan thank you for contributing! I've confirmed on your branch that the resources are present in the rendered templates:

david@ubuntu:helm [kegs-init-container●] » helm template ./charts/rstudio-connect --set launcher.enabled=true --set sharedStorage.create=true --show-only templates/configmap.yaml | grep -A 3 rstudio-library-templates-data.tpl
  rstudio-library-templates-data.tpl: |
    {{- define "rstudio-library.templates.data" -}}
    {"job":{"annotations":{},"labels":{}},"pod":{"affinity":{},"annotations":{},"command":[],"containerSecurityContext":{},"defaultSecurityContext":{},"env":[],"extraContainers":[],"imagePullPolicy":"","imagePullSecrets":[],"initContainers":[{"image":"ghcr.io/rstudio/rstudio-connect-content-init:ubuntu2204-2024.08.0","imagePullPolicy":"IfNotPresent","name":"init","resources":{},"securityContext":{},"volumeMounts":[{"mountPath":"/mnt/rstudio-connect-runtime/","name":"rsc-volume"}]}],"labels":{},"nodeSelector":{},"priorityClassName":"","securityContext":{},"serviceAccountName":"","tolerations":[],"volumeMounts":[{"mountPath":"/opt/rstudio-connect","name":"rsc-volume"}],"volumes":[{"emptydir":{},"name":"rsc-volume"}]},"service":{"annotations":{},"labels":{},"type":"ClusterIP"}}
    {{- end }}
david@ubuntu:helm [kegs-init-container●] » helm template ./charts/rstudio-connect --set launcher.enabled=true --set sharedStorage.create=true --set launcher.defaultInitContainer.resources.requests.cpu="512Mi" --show-only templates/configmap.yaml | grep -A 3 rstudio-library-templates-data.tpl
  rstudio-library-templates-data.tpl: |
    {{- define "rstudio-library.templates.data" -}}
    {"job":{"annotations":{},"labels":{}},"pod":{"affinity":{},"annotations":{},"command":[],"containerSecurityContext":{},"defaultSecurityContext":{},"env":[],"extraContainers":[],"imagePullPolicy":"","imagePullSecrets":[],"initContainers":[{"image":"ghcr.io/rstudio/rstudio-connect-content-init:ubuntu2204-2024.08.0","imagePullPolicy":"IfNotPresent","name":"init","resources":{"requests":{"cpu":"512Mi"}},"securityContext":{},"volumeMounts":[{"mountPath":"/mnt/rstudio-connect-runtime/","name":"rsc-volume"}]}],"labels":{},"nodeSelector":{},"priorityClassName":"","securityContext":{},"serviceAccountName":"","tolerations":[],"volumeMounts":[{"mountPath":"/opt/rstudio-connect","name":"rsc-volume"}],"volumes":[{"emptydir":{},"name":"rsc-volume"}]},"service":{"annotations":{},"labels":{},"type":"ClusterIP"}}
    {{- end }}

We will also need to bump the chart's minor version and add an entry to the NEWS.

https://github.com/rstudio/helm/blob/main/charts/rstudio-connect/NEWS.md

@colearendt would appreciate an extra pair of eyes to make sure I didn't miss anything.

@dbkegley
Copy link
Contributor

@tkraan I'm going to pull this branch into #545 and bump the chart version in that PR

@dbkegley
Copy link
Contributor

closing in favor of #545

@dbkegley dbkegley closed this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adding resources to the defaultInitContainer
2 participants