69 lines
2.3 KiB
YAML
69 lines
2.3 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:
|
|
# Default ndots:5 forces every external FQDN lookup (npm registry, GitHub
|
|
# releases) through 4 failed cluster-search-domain attempts before the
|
|
# bare name resolves — observed 6-12s DNS delays that broke the
|
|
# obsidian-headless install (its own request timeout is shorter than that).
|
|
dnsConfig:
|
|
options:
|
|
- name: ndots
|
|
value: "1"
|
|
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
|