feat(helm): add Redis Deployment and ClusterIP Service
Ephemeral cache with no PVC. Includes redis-cli ping probes for liveness and readiness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
42
infrastructure/helm/templates/redis-deployment.yaml
Normal file
42
infrastructure/helm/templates/redis-deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{{- if .Values.redis.enabled }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "tod.fullname" . }}-redis
|
||||||
|
labels:
|
||||||
|
{{- include "tod.componentLabels" (dict "context" . "component" "redis") | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "tod.componentSelectorLabels" (dict "context" . "component" "redis") | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "tod.componentSelectorLabels" (dict "context" . "component" "redis") | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: "{{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.redis.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- redis-cli
|
||||||
|
- ping
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- redis-cli
|
||||||
|
- ping
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 3
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.redis.resources | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
17
infrastructure/helm/templates/redis-service.yaml
Normal file
17
infrastructure/helm/templates/redis-service.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{{- if .Values.redis.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "tod.fullname" . }}-redis
|
||||||
|
labels:
|
||||||
|
{{- include "tod.componentLabels" (dict "context" . "component" "redis") | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
port: {{ .Values.redis.service.port }}
|
||||||
|
targetPort: redis
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "tod.componentSelectorLabels" (dict "context" . "component" "redis") | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
Reference in New Issue
Block a user