Files
docker-images/apps/piwigo/deployment.yaml
Udo Waechter c6a8464bb2
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
why _?111git statuskubectl apply -n kube-system -f descheduler-cronjob.yaml
2024-09-13 20:09:41 +02:00

154 lines
3.1 KiB
YAML

---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: piwigo
labels:
app: piwigo
spec:
selector:
matchLabels:
app: piwigo
strategy:
type: Recreate
template:
metadata:
labels:
app: piwigo
spec:
containers:
- image: linuxserver/piwigo:latest
name: piwigo
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
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "1500Mi"
cpu: "2000m"
volumes:
- name: piwigo-persistent-storage
persistentVolumeClaim:
claimName: piwigo-pv-claim
- name: piwigo-config
persistentVolumeClaim:
claimName: piwigo-config
---
apiVersion: v1
kind: Service
metadata:
name: piwigo
labels:
app: piwigo
spec:
ports:
- name: http
port: 80
- name: https
port: 443
selector:
app: piwigo
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: piwigo
labels:
app: piwigo
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: foto.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: piwigo
port:
name: http
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: piwigo-quicksync
labels:
app: piwigo
spec:
schedule: '23 */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
resources:
requests:
memory: "24Mi"
cpu: "20m"
limits:
memory: "100Mi"
cpu: "500m"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: piwigo-pv-claim
labels:
app: piwigo
spec:
storageClassName: nfs-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 60Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: piwigo-config
labels:
app: piwigo
spec:
storageClassName: nfs-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi