all repos — infra @ 13d143bca8aeaec2447be2ee2089fdbb3bb01f27

infrastructure manifests and setup notes

apps/fsrv/fsrv.yaml (view raw)

 1apiVersion: apps/v1
 2kind: Deployment
 3metadata:
 4  name: fsrv
 5  labels:
 6    app: fsrv
 7spec:
 8  selector:
 9    matchLabels:
10      app: fsrv
11  template:
12    metadata:
13      labels:
14        app: fsrv
15    spec:
16      imagePullSecrets:
17        - name: registry-creds
18      nodeSelector:
19        arch: "amd64"
20      containers:
21        - name: fsrv
22          image: reg.icyphox.sh/fsrv
23          imagePullPolicy: IfNotPresent
24          env:
25            - name: FSRV_KEY
26              valueFrom:
27                secretKeyRef:
28                  name: fsrv-key
29                  key: key
30          volumeMounts:
31            - name: uploads
32              mountPath: "/uploads"
33              readOnly: false
34          ports:
35            - name: http
36              containerPort: 9393
37          command: ["/bin/sh"]
38          args:
39            - -c
40            - /fsrv/fsrv -url https://x.icyphox.sh -key $FSRV_KEY -index /fsrv/index.html -storepath /uploads
41        - name: nginx
42          image: nginx
43          volumeMounts:
44            - name: uploads
45              mountPath: "/uploads"
46              readOnly: true
47            - name: nginx-config
48              mountPath: "/etc/nginx/conf.d/"
49              readOnly: true
50          ports:
51            - name: http
52              containerPort: 80
53      volumes:
54        - name: uploads
55          persistentVolumeClaim:
56            claimName: fsrv-uploads
57        - name: nginx-config
58          configMap:
59            name: fsrv-nginx
60            items:
61              - key: "default.conf"
62                path: "default.conf"
63---
64apiVersion: v1
65kind: Service
66metadata:
67  name: fsrv
68spec:
69  selector:
70    app: fsrv
71  ports:
72    - name: fsrv-http
73      port: 9393
74      targetPort: 9393
75    - name: nginx-http
76      port: 80
77      targetPort: 80