fix: Add redis to Plume as Dapr Statestore
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
{{- if .Values.redis.enabled -}}
|
||||||
|
apiVersion: dragonflydb.io/v1alpha1
|
||||||
|
kind: Dragonfly
|
||||||
|
metadata:
|
||||||
|
name: {{ include "Plume.fullname" . }}-redis
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: disabled
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/created-by: dragonfly-operator
|
||||||
|
app.kubernetes.io/instance: dragonfly
|
||||||
|
{{- include "Plume.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
args:
|
||||||
|
- --maxmemory=$(MAX_MEMORY)Mi # Graceful memory management (90% of limit)
|
||||||
|
- --proactor_threads=1 # Auto-detect CPU cores (optimal threading)
|
||||||
|
- --cluster_mode=emulated
|
||||||
|
env:
|
||||||
|
- name: MAX_MEMORY
|
||||||
|
valueFrom:
|
||||||
|
resourceFieldRef:
|
||||||
|
resource: limits.memory
|
||||||
|
divisor: 1Mi
|
||||||
|
replicas: {{ .Values.redis.replicas | default "1" }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 150m
|
||||||
|
limits:
|
||||||
|
memory: 256Mi
|
||||||
|
authentication:
|
||||||
|
passwordFromSecret:
|
||||||
|
name: {{ .Values.redis.secret.name | quote }}
|
||||||
|
key: {{ .Values.redis.secret.key | quote }}
|
||||||
|
metrics:
|
||||||
|
enabled: {{ .Values.redis.metrics.enabled | default false }}
|
||||||
|
port: 6379
|
||||||
|
storage:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.redis.size | default "1Gi" }}
|
||||||
|
{{- if .Values.redis.backup.enabled }}
|
||||||
|
snapshot:
|
||||||
|
dir: /data # Change to s3://redis/prod-atlantis-redis
|
||||||
|
cron: "0 3 * * *" # Default: every day at 03:00
|
||||||
|
enableOnMasterOnly: false
|
||||||
|
persistentVolumeClaimSpec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.redis.size | default "1Gi" }}
|
||||||
|
{{- end }}
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
{{- end}}
|
||||||
@@ -59,6 +59,14 @@ cluster:
|
|||||||
backupEnabled: true
|
backupEnabled: true
|
||||||
backupRetention: 60d
|
backupRetention: 60d
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
|
redis:
|
||||||
|
enabled: false
|
||||||
|
instances: 1
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
backup:
|
||||||
|
enabled: false
|
||||||
|
size: 1Gi
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
|||||||
Reference in New Issue
Block a user