all repos — infra @ 3a8e0e7ceeefcb35e01956b86ccb2dbe6ef84bfa

infrastructure manifests and setup notes

apps/cgit/cgit.yaml (view raw)

 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
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cgit
  labels:
    app: cgit
spec:
  selector:
    matchLabels:
      app: cgit
  template:
    metadata:
      labels:
        app: cgit
    spec:
      nodeSelector:
        kubernetes.io/hostname: "jade"
      imagePullSecrets:
        - name: registry-creds
      securityContext:
        fsGroup: 1002
      containers:
        - name: cgit
          image: reg.icyphox.sh/cgit
          imagePullPolicy: Always
          volumeMounts:
            - name: git
              mountPath: "/home/git"
              readOnly: false
            - name: config
              mountPath: "/etc/cgitrc"
              subPath: "cgitrc"
              readOnly: true
            - name: nginx-config
              mountPath: "/etc/nginx/conf.d/default.conf"
              subPath: "default.conf"
              readOnly: true
            - name: cgit-ui
              mountPath: "/usr/share/webapps/cgit/static"
              readOnly: false
          command: ["/bin/sh"]
          args:
            - -c
              #- sed -i '/^#.*conf.d/s/^#//' /etc/nginx/nginx.conf &&
            - /usr/bin/spawn-fcgi -M 666 -s /run/fcgiwrap.socket /usr/bin/fcgiwrap &&
              /usr/sbin/nginx -g "daemon off;"
          ports:
            - name: http
              containerPort: 80
      volumes:
        - name: git
          hostPath:
            path: /home/git
        - name: config
          configMap:
            name: cgit-config
        - name: nginx-config
          configMap:
            name: cgit-nginx
        - name: cgit-ui
          persistentVolumeClaim:
            claimName: cgit-ui
---
apiVersion: v1
kind: Service
metadata:
  name: cgit
spec:
  selector:
    app: cgit
  ports:
    - name: http
      port: 80
      targetPort: 80