Skip to content

Commit

Permalink
feat: Add option to store cache in ramdisk/tmpfs 🔥 (mend#524)
Browse files Browse the repository at this point in the history
* feat: Add option to store cache in ramdisk/tmpfs 🔥

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>

* Apply suggestions from code review

Co-authored-by: Nabeel Saabna <48175656+nabeelsaabna@users.noreply.github.com>

---------

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>
Co-authored-by: Nabeel Saabna <48175656+nabeelsaabna@users.noreply.github.com>
  • Loading branch information
oscrx and nabeelsaabna authored Jul 11, 2024
1 parent 085526a commit d883adf
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helm-charts/mend-renovate-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mend-renovate-ce
version: 7.4.0
version: 7.5.0
appVersion: 7.4.0
description: Mend Renovate Community Edition
home: https://github.com/mend/renovate-ce-ee
Expand Down
5 changes: 4 additions & 1 deletion helm-charts/mend-renovate-ce/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ spec:
{{- if .Values.cachePersistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.cachePersistence.existingClaim | default (printf "%s-cache" (include "mend-renovate.fullname" .)) }}
{{- else if .Values.cacheInMemory.enabled }}
emptyDir:
medium: Memory
{{- else }}
emptyDir: { }
emptyDir: {}
{{- end }}
{{- if ne (len .Values.extraVolumes) 0 }}
{{ toYaml .Values.extraVolumes | nindent 8 | trim }}
Expand Down
8 changes: 8 additions & 0 deletions helm-charts/mend-renovate-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ cachePersistence:
## The name of an existing PVC to use for persistence
existingClaim: ""

## Cache in Memory
## ref: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
## cachePersistence.enabled takes precedence, make sure its disabled
##
cacheInMemory:
## Place the cache in memory (tmpfs)
enabled: false

service:
type: ClusterIP
port: 80
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/mend-renovate-ee/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mend-renovate-enterprise-edition
version: 1.4.0
version: 1.5.0
appVersion: 7.4.0
description: Mend Renovate Enterprise Edition
home: https://github.com/mend/renovate-ce-ee
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/mend-renovate-ee/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ spec:
{{- if .Values.dataPersistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.dataPersistence.existingClaim | default (printf "%s-data" (include "mend-renovate.fullname" .)) }}
{{- else if .Values.dataInMemory.enabled }}
emptyDir:
medium: Memory
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ spec:
{{- if .Values.dataPersistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.dataPersistence.existingClaim | default (printf "%s-data" (include "mend-renovate.fullname" .)) }}
{{- else if .Values.dataInMemory.enabled }}
emptyDir:
medium: Memory
{{- else }}
emptyDir: { }
emptyDir: {}
{{- end }}
{{- if ne (len .Values.renovateWorker.extraVolumes) 0 }}
{{ toYaml .Values.renovateWorker.extraVolumes | nindent 8 | trim }}
Expand Down
8 changes: 8 additions & 0 deletions helm-charts/mend-renovate-ee/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ dataPersistence:
## The name of an existing PVC to use for persistence
existingClaim: ""

## Cache in Memory
## ref: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
## cachePersistence.enabled takes precedence, make sure its disabled
##
dataInMemory:
## Place the cache/data in memory (tmpfs)
enabled: false

service:
type: ClusterIP
port: 80
Expand Down

0 comments on commit d883adf

Please sign in to comment.