k8s_notes-wiki/notes-wiki_deployment.yml

56 lines
1.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: notes-wiki
spec:
selector:
matchLabels:
app: notes-wiki
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: notes-wiki
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
containers:
- name: notes-wiki
image: nicolaw/tiddlywiki
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "America/Toronto"
- name: TW_USERNAME
value: "rmorrow"
- name: TW_PASSWORD
valueFrom:
secretKeyRef:
name: notes-wiki-pass
key: WIKI_PASSWD
ports:
- containerPort: 8080
name: "notes-wiki"
volumeMounts:
- name: notes-wiki
mountPath: "/var/lib/tiddlywiki"
volumes:
- name: notes-wiki
persistentVolumeClaim:
claimName: notes-wiki-pvc
# EOF