22359be40e
Close billing, tenancy, migration, build, and CI/CD gaps identified in the audit: wallet/gateway guards, full-UUID namespaces, idempotent migrations with base schema, stateful service stability, safer Dockerfiles/git builds, and platform chart hardening (Redis auth, RollingUpdate, backups, Swagger off). Co-authored-by: Cursor <cursoragent@cursor.com>
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
{{- if .Values.redis.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "cloudhost-platform.redis.fullname" . }}
|
|
namespace: {{ include "cloudhost-platform.namespace" . }}
|
|
labels:
|
|
app: {{ include "cloudhost-platform.redis.fullname" . }}
|
|
{{- include "cloudhost-platform.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "cloudhost-platform.redis.fullname" . }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "cloudhost-platform.redis.fullname" . }}
|
|
spec:
|
|
{{- with .Values.redis.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: redis
|
|
image: {{ .Values.images.redis | quote }}
|
|
args: ["--requirepass", "$(REDIS_PASSWORD)"]
|
|
env:
|
|
- name: REDIS_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "cloudhost-platform.secretName" . }}
|
|
key: redis-password
|
|
# redis-cli reads REDISCLI_AUTH so authenticated probes need no -a flag
|
|
- name: REDISCLI_AUTH
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "cloudhost-platform.secretName" . }}
|
|
key: redis-password
|
|
ports:
|
|
- containerPort: 6379
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- redis-cli
|
|
- ping
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- redis-cli
|
|
- ping
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
{{- with .Values.redis.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "cloudhost-platform.redis.fullname" . }}-data
|
|
{{- end }}
|