aboutsummaryrefslogtreecommitdiff
path: root/cmd/mi/manifest.yaml
blob: 8b010ca916207f1edf63799aa5adddf00acae1c2 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
apiVersion: v1
kind: Namespace
metadata:
  name: mi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mi
  namespace: mi
  labels:
    app.kubernetes.io/name: mi
    recurring-job-group.longhorn.io/backup: enabled
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: longhorn
  resources:
    requests:
      storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mi
  namespace: mi
  labels:
    app.kubernetes.io/name: mi
  annotations:
    operator.1password.io/auto-restart: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: mi
  template:
    metadata:
      namespace: mi
      labels:
        app.kubernetes.io/name: mi
    spec:
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: mi
      securityContext:
        fsGroup: 1000
      containers:
        - name: main
          image: ghcr.io/xe/x/mi:latest
          imagePullPolicy: "Always"
          resources:
            limits:
              cpu: "500m"
              memory: "512Mi"
            requests:
              cpu: "100m"
              memory: "256Mi"
          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: INTERNAL_BIND
              value: ":9195"
          volumeMounts:
            - name: vol
              mountPath: "/data"
---
apiVersion: v1
kind: Service
metadata:
  name: mi
  namespace: mi
spec:
  selector:
    app.kubernetes.io/name: mi
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
      name: http
    - protocol: TCP
      port: 9195
      targetPort: 9195
      name: metrics
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mi-tango-sierra
  namespace: mi
  labels:
    app.kubernetes.io/name: mi
spec:
  defaultBackend:
    service:
      name: mi
      port:
        name: http
  ingressClassName: tailscale
  tls:
    - hosts:
        - mi