aboutsummaryrefslogtreecommitdiff
path: root/kube/alrest/x/mi/deployment.yaml
blob: 2cf2866510be1b8758209ce3645527d108f8819c (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
82
83
84
85
86
87
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mi
  annotations:
    operator.1password.io/auto-restart: "true"
spec:
  replicas: 1
  template:
    spec:
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: mi
        - name: backup
          persistentVolumeClaim:
            claimName: mi-backup
        - name: bluesky
          secret:
            secretName: mi-bluesky
        - name: irc
          secret:
            secretName: mi-irc
        - name: twitch
          secret:
            secretName: mi-twitch
        - name: mastodon
          secret:
            secretName: mi-mastodon
      securityContext:
        fsGroup: 1000
      containers:
        - name: main
          image: ghcr.io/xe/x/mi:latest
          imagePullPolicy: "Always"
          resources:
            limits:
              cpu: "500m"
              memory: "1024Mi"
            requests:
              cpu: "100m"
              memory: "512Mi"
          securityContext:
            runAsUser: 1000
            runAsGroup: 1000
            runAsNonRoot: true
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            seccompProfile:
              type: RuntimeDefault
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
              httpHeaders:
                - name: X-Kubernetes
                  value: "is kinda okay"
            initialDelaySeconds: 3
            periodSeconds: 3
          env:
            - name: BIND
              value: ":8080"
            - name: DB_LOC
              value: "/data/mi.db"
            - name: BACKUP_DB_LOC
              value: "/srv/backup/mi.db"
            - name: INTERNAL_BIND
              value: ":9195"
          volumeMounts:
            - name: vol
              mountPath: "/data"
            - name: backup
              mountPath: "/srv/backup"
            - name: bluesky
              readOnly: true
              mountPath: "/run/secrets/bluesky"
            - name: irc
              readOnly: true
              mountPath: "/run/secrets/irc"
            - name: twitch
              readOnly: true
              mountPath: "/run/secrets/twitch"
            - name: mastodon
              readOnly: true
              mountPath: "/run/secrets/mastodon"