replace bitnami valkey with official image

This commit is contained in:
Jonas Leder 2025-11-29 11:19:30 +01:00
commit 541551ca59
8 changed files with 1256 additions and 28 deletions

View file

@ -1,9 +0,0 @@
dependencies:
- name: valkey
repository: oci://registry-1.docker.io/bitnamicharts
version: 5.0.8
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 18.1.13
digest: sha256:367b3bcac2d96dca8daa0f767f219dd86ae5c04a3336b970137d10e955eca5ac
generated: "2025-11-25T19:01:32.991635633Z"

View file

@ -22,13 +22,3 @@ version: 1.0.0
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 32.0.2
dependencies:
- name: valkey
version: "5.0.8"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: valkey.enabled
- name: postgresql
version: "18.1.13"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: postgresql.enabled

View file

@ -44,7 +44,7 @@ spec:
env:
- name: REDIS_HOST
{{- if .Values.valkey.enabled }}
value: {{ printf "%s-primary" (include "common.names.fullname" .Subcharts.valkey) }}
value: {{ include "nextcloud.fullname" . }}-valkey
{{- else }}
value: {{ .Values.valkey.externalHostname }}
{{- end }}

View file

@ -0,0 +1,69 @@
{{ if .Values.valkey.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nextcloud.fullname" . }}-valkey
namespace: {{ .Release.Namespace }}
labels:
{{- include "nextcloud.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "nextcloud.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "nextcloud.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "nextcloud.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: valkey
securityContext:
{{- toYaml .Values.valkey.securityContext | nindent 12 }}
image: "{{ .Values.valkey.image.repository }}:{{ .Values.valkey.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.valkey.image.pullPolicy }}
ports:
- name: valkey
containerPort: 6379
protocol: TCP
resources:
{{- toYaml .Values.valkey.resources | nindent 12 }}
volumeMounts:
- name: valkey-data
mountPath: /data
volumes:
- name: valkey-data
persistentVolumeClaim:
{{ if .Values.valkey.persistence.useExistingPvc }}
claimName: {{ .Values.valkey.persistence.existingPvcName }}
{{ else }}
claimName: {{ include "nextcloud.fullname" . }}-valkey
{{ end }}
{{- with .Values.valkey.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.valkey.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.valkey.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}

View file

@ -0,0 +1,16 @@
{{ if .Values.valkey.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "nextcloud.fullname" . }}-valkey
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
{{ if .Values.valkey.persistence.storageClass }}
storageClassName: {{ .Values.valkey.persistence.storageClass }}
{{ end }}
resources:
requests:
storage: {{ .Values.valkey.persistence.size }}
{{ end }}

View file

@ -0,0 +1,19 @@
{{ if .Values.valkey.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "nextcloud.fullname" . }}-valkey
namespace: {{ .Release.Namespace }}
labels:
{{- include "nextcloud.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 6379
targetPort: valkey
protocol: TCP
name: valkey
selector:
{{- include "nextcloud.selectorLabels" . | nindent 4 }}
{{ end }}

View file

@ -94,17 +94,40 @@ storage:
valkey:
enabled: true
architecture: standalone
externalHostname: ""
databasePhp: 0
databaseNextcloud: 1
auth:
enabled: false # cou should change this to true in production
master:
persistence:
size: 2Gi
metrics:
enabled: true
persistence:
storageClass: ""
size: 1Gi
useExistingPvc: false
existingPvcName: ""
image:
repository: valkey/valkey
tag: 9.0.0-alpine
pullPolicy: IfNotPresent
nodeSelector: {}
tolerations: []
affinity: {}
resources:
limits:
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
securityContext:
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10000
podSecurityContext: {}
postgresql:
enabled: true

1120
template Normal file

File diff suppressed because it is too large Load diff