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

feat: automatically add fs group when using pvc #1404

Merged
merged 9 commits into from
Jul 31, 2024
2 changes: 0 additions & 2 deletions charts/renovate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ To speed up execution time of jobs it could be useful to enable persistent cachi
can make use of the cache that have been build up in previous runs. Set `renovate.persistence.cache.enabled` to true
to enable this. If necessary, the storageClass can be configured and the storageSize can be set to the preferred value.

**NOTE**: `securityContext.fsGroup` must be set to the correct group ID to use the persistent cache. Without it, renovate
can't write to the mounted PVC. For the current default user (`ubuntu`), the correct fsGroup is `1000`.
KyriosGN0 marked this conversation as resolved.
Show resolved Hide resolved

## Renovate config templating

Expand Down
10 changes: 9 additions & 1 deletion charts/renovate/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,17 @@ spec:
tolerations:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.renovate.persistence.cache.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup | default 1000 }}
{{- with .Values.securityContext }}
{{- toYaml . | nindent 12 }}
KyriosGN0 marked this conversation as resolved.
Show resolved Hide resolved
{{ end }}
{{- else }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | nindent 12 }}
{{- toYaml . | nindent 12 }}
KyriosGN0 marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down