all repos — infra @ 2c2f4a9c4ea30de96f40d8cd804201ede5015088

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      nodeSelector:
17        kubernetes.io/hostname: sini
18      containers:
19        - name: fsrv
20          image: sini:5000/fsrv:latest
21          imagePullPolicy: Always
22          env:
23            - name: FSRV_KEY
24              valueFrom:
25                secretKeyRef:
26                  name: fsrv-key
27                  key: key
28          volumeMounts:
29            - name: uploads
30              mountPath: /uploads
31              readOnly: false
32          ports:
33            - name: http
34              containerPort: 9393
35          args:
36            - -url
37            - https://x.icyphox.sh
38            - -key 
39            - $FSRV_KEY
40            - -index
41            - /index.html 
42            - -storepath 
43            - /uploads
44      volumes:
45        - name: uploads
46          hostPath:
47            path: /var/lib/uploads
48---
49apiVersion: v1
50kind: Service
51metadata:
52  name: fsrv
53spec:
54  selector:
55    app: fsrv
56  ports:
57    - name: fsrv-http
58      port: 9393
59      targetPort: 9393
60---
61apiVersion: networking.k8s.io/v1
62kind: Ingress
63metadata:
64  name: x.icyphox.sh
65  namespace: default
66spec:
67  ingressClassName: caddy
68  rules:
69  - host: x.icyphox.sh
70    http:
71      paths:
72      - path: /
73        pathType: Prefix
74        backend:
75          service:
76            name: fsrv
77            port:
78              number: 9393
79