all repos — infra @ 82be1cf6c554fe1566434b072658defc064ae5a0

infrastructure manifests and setup notes

apps/cgit/cgit.yaml (view raw)

 1apiVersion: apps/v1
 2kind: Deployment
 3metadata:
 4  name: cgit
 5  labels:
 6    app: cgit
 7spec:
 8  selector:
 9    matchLabels:
10      app: cgit
11  template:
12    metadata:
13      labels:
14        app: cgit
15    spec:
16      nodeSelector:
17        kubernetes.io/hostname: "jade"
18      imagePullSecrets:
19        - name: registry-creds
20      securityContext:
21        fsGroup: 1002
22      containers:
23        - name: cgit
24          image: reg.icyphox.sh/cgit
25          imagePullPolicy: Always
26          volumeMounts:
27            - name: git
28              mountPath: "/home/git"
29              readOnly: false
30            - name: config
31              mountPath: "/etc/cgitrc"
32              subPath: "cgitrc"
33              readOnly: true
34            - name: nginx-config
35              mountPath: "/etc/nginx/conf.d/default.conf"
36              subPath: "default.conf"
37              readOnly: true
38            - name: cgit-ui
39              mountPath: "/usr/share/webapps/cgit/static"
40              readOnly: false
41          command: ["/bin/sh"]
42          args:
43            - -c
44              #- sed -i '/^#.*conf.d/s/^#//' /etc/nginx/nginx.conf &&
45            - /usr/bin/spawn-fcgi -M 666 -s /run/fcgiwrap.socket /usr/bin/fcgiwrap &&
46              /usr/sbin/nginx -g "daemon off;"
47          ports:
48            - name: http
49              containerPort: 80
50      volumes:
51        - name: git
52          hostPath:
53            path: /home/git
54        - name: config
55          configMap:
56            name: cgit-config
57        - name: nginx-config
58          configMap:
59            name: cgit-nginx
60        - name: cgit-ui
61          persistentVolumeClaim:
62            claimName: cgit-ui
63---
64apiVersion: v1
65kind: Service
66metadata:
67  name: cgit
68spec:
69  selector:
70    app: cgit
71  ports:
72    - name: http
73      port: 80
74      targetPort: 80