163 lines
3.3 KiB
YAML
163 lines
3.3 KiB
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: immich-sync-stats
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
storageClassName: rook-cephfs
|
|
resources:
|
|
requests:
|
|
storage: 64Mi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: immich-sync
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 0
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app: immich-sync
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: immich-sync
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
fsGroup: 65532
|
|
fsGroupChangePolicy: OnRootMismatch
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app: immich-sync
|
|
topologyKey: kubernetes.io/hostname
|
|
containers:
|
|
- name: immich-sync
|
|
image: registry.brunner.ninja/feedc0de/immich-sync
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: PORT
|
|
value: "8090"
|
|
- name: STATS_FILE
|
|
value: /data/stats.json
|
|
ports:
|
|
- name: http
|
|
containerPort: 8090
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 15
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 32Mi
|
|
ephemeral-storage: 64Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 128Mi
|
|
ephemeral-storage: 20Gi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
runAsUser: 65532
|
|
runAsGroup: 65532
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: stats
|
|
mountPath: /data
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir:
|
|
sizeLimit: 20Gi
|
|
- name: stats
|
|
persistentVolumeClaim:
|
|
claimName: immich-sync-stats
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: immich-sync
|
|
labels:
|
|
app: immich-sync
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
protocol: TCP
|
|
targetPort: http
|
|
selector:
|
|
app: immich-sync
|
|
---
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: immich-sync
|
|
spec:
|
|
minAvailable: 1
|
|
selector:
|
|
matchLabels:
|
|
app: immich-sync
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: immich-sync
|
|
labels:
|
|
release: prometheus
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: immich-sync
|
|
namespaceSelector:
|
|
matchNames:
|
|
- default
|
|
endpoints:
|
|
- port: http
|
|
path: /metrics
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: immich-sync
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
spec:
|
|
ingressClassName: traefik
|
|
rules:
|
|
- host: immich-sync.brunner.ninja
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: immich-sync
|
|
port:
|
|
name: http
|