Files
hrbox-helm-chart/.helm/templates/02-dragonfly.yaml
T
2026-09-05 19:07:31 +06:00

62 lines
1.5 KiB
YAML

{{- if .Values.dragonfly.enabled }}
{{- $name := include "hrbox.component" (dict "ctx" . "name" "dragonfly") -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "dragonfly") | nindent 4 }}
spec:
revisionHistoryLimit: 3
strategy:
type: Recreate
selector:
matchLabels:
component: {{ $name }}
template:
metadata:
labels:
component: {{ $name }}
app: dragonfly
spec:
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
containers:
- name: dragonfly
image: {{ .Values.image.dragonfly | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.dragonfly.maxmemory }}
args:
- --maxmemory={{ . }}
{{- end }}
ports:
- name: dragonfly
containerPort: 6379
{{- include "hrbox.resources" (dict "ctx" . "component" "dragonfly") | indent 10 }}
readinessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 30
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "dragonfly") | nindent 4 }}
spec:
clusterIP: None
selector:
component: {{ $name }}
ports:
- name: dragonfly
port: 6379
{{- end }}