61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
strategy:
|
|
type: Recreate # RWO volumes, single instance — never run 2 pods at once
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: ignis
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: {{ .Values.service.port }}
|
|
env:
|
|
{{- range $k, $v := .Values.env }}
|
|
- name: {{ $k }}
|
|
value: {{ $v | quote }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: vaults
|
|
mountPath: /vaults
|
|
- name: data
|
|
mountPath: /app/data
|
|
- name: obsidian-app
|
|
mountPath: /app/obsidian-app
|
|
# No dedicated health endpoint documented upstream; /api/version
|
|
# is the only stable route that responds once the server is up.
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/version
|
|
port: {{ .Values.service.port }}
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/version
|
|
port: {{ .Values.service.port }}
|
|
initialDelaySeconds: 90 # first boot downloads Obsidian, can take 1-2min
|
|
periodSeconds: 20
|
|
volumes:
|
|
- name: vaults
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-vaults
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-data
|
|
- name: obsidian-app
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-obsidian-app
|