Files
docker-images/apps/piwigo/deployment.yaml
2020-10-13 21:32:14 +02:00

123 lines
2.5 KiB
YAML

---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: piwigo
spec:
selector:
matchLabels:
app: piwigo
strategy:
type: Recreate
template:
metadata:
labels:
app: piwigo
spec:
containers:
- image: linuxserver/piwigo
name: piwigo
imagePullPolicy: IfNotPresent
env:
# Use secret in real usage
- name: TZ
value: Europe/Berlin
livenessProbe:
failureThreshold: 10
httpGet:
path: /index.php
port: http
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
ports:
- containerPort: 80
name: http
- containerPort: 443
name: https
volumeMounts:
- name: piwigo-persistent-storage
mountPath: /config/www/gallery/galleries
- name: piwigo-config
mountPath: /config
volumes:
- name: piwigo-persistent-storage
persistentVolumeClaim:
claimName: piwigo-pv-claim
- name: piwigo-config
persistentVolumeClaim:
claimName: piwigo-config
---
apiVersion: v1
kind: Service
metadata:
name: piwigo
spec:
ports:
- name: http
port: 80
- name: https
port: 443
selector:
app: piwigo
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: piwigo
spec:
rules:
- host: foto.lan
http:
paths:
- backend:
serviceName: piwigo
servicePort: http
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: piwigo-quicksync
spec:
schedule: '*/30 */1 * * *'
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: Never
containers:
- name: piwigo-quicksync
image: docker-registry.lan/piwigo-sync:arm64
imagePullPolicy: Always
args:
- /remote_sync.pl
- --base_url=http://piwigo.default.svc.cluster.local/
- --username=api
- --password=D8Gt4P36q3457Yt
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: piwigo-pv-claim
spec:
storageClassName: nfs-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 60Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: piwigo-config
spec:
storageClassName: nfs-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi