mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
81 lines
2.9 KiB
YAML
81 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ .Release.Name }}"
|
|
spec:
|
|
strategy:
|
|
type: Recreate
|
|
replicas: 1
|
|
revisionHistoryLimit: 0
|
|
selector:
|
|
matchLabels:
|
|
app: "{{ .Release.Name }}"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "{{ .Release.Name }}"
|
|
spec:
|
|
containers:
|
|
- name: "{{ .Release.Name }}"
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
- name: tcp-tunnel-min
|
|
containerPort: {{ .Values.service.tcpPortMin }}
|
|
protocol: TCP
|
|
- name: tcp-tunnel-max
|
|
containerPort: {{ .Values.service.tcpPortMax }}
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
- mountPath: /app/data
|
|
name: data
|
|
env:
|
|
- name: TZ
|
|
value: UTC
|
|
- name: AUTH_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-secrets"
|
|
key: authtoken
|
|
- name: DOMAIN
|
|
value: "{{ .Values.subdomain }}.{{ .Values.globals.environment }}"
|
|
command:
|
|
- drip-server
|
|
- --domain
|
|
- "{{ .Values.subdomain }}.{{ .Values.globals.environment }}"
|
|
- --port
|
|
- "{{ .Values.service.port }}"
|
|
- --token
|
|
- "$(AUTH_TOKEN)"
|
|
- --tcp-port-min
|
|
- "{{ .Values.service.tcpPortMin }}"
|
|
- --tcp-port-max
|
|
- "{{ .Values.service.tcpPortMax }}"
|
|
livenessProbe:
|
|
exec:
|
|
command: {{ .Values.healthcheck.test }}
|
|
initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }}
|
|
periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }}
|
|
timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }}
|
|
failureThreshold: {{ .Values.healthcheck.retries | default 3 }}
|
|
readinessProbe:
|
|
exec:
|
|
command: {{ .Values.healthcheck.test }}
|
|
initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }}
|
|
periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }}
|
|
timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }}
|
|
failureThreshold: {{ .Values.healthcheck.retries | default 3 }}
|
|
|
|
resources:
|
|
limits:
|
|
cpu: "{{ .Values.resources.limits.cpu }}"
|
|
memory: "{{ .Values.resources.limits.memory }}"
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: "{{ .Release.Name }}-data"
|