summaryrefslogtreecommitdiff
path: root/f3s/player/helm-chart/templates/deployment.yaml
blob: 74d03bb18358d9494aacb02b911c8f4e19772f8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: apps/v1
kind: Deployment
metadata:
  name: player
  namespace: services
spec:
  replicas: 1
  # Recreate so the old pod fully terminates before the new one starts —
  # avoids NFS-lock races on the hostPath-backed PVC during rolling updates.
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: player
  template:
    metadata:
      labels:
        app: player
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
        runAsGroup: 65534
        fsGroup: 65534
      containers:
        - name: player
          image: registry.lan.buetow.org:30001/player:df224ef
          imagePullPolicy: IfNotPresent
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 65534
            runAsGroup: 65534
          ports:
            - containerPort: 8080
              name: http
          env:
            - name: PORT
              value: "8080"
            - name: DB_PATH
              value: "/data/media.db"
            - name: MEDIA_ROOT
              value: "/media"
            - name: SECURE_COOKIES
              value: "true"
          livenessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 5
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /readyz
              port: http
            initialDelaySeconds: 3
            periodSeconds: 5
          resources:
            requests:
              memory: 128Mi
              cpu: 100m
            limits:
              memory: 512Mi
              cpu: "1"
          volumeMounts:
            - name: player-data
              mountPath: /data
            - name: player-media
              mountPath: /media
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: player-data
          persistentVolumeClaim:
            claimName: player-data-pvc
        - name: player-media
          persistentVolumeClaim:
            claimName: player-media-pvc
        - name: tmp
          emptyDir: {}