deployment.yaml (4093B)
1 apiVersion: v1 2 kind: PersistentVolumeClaim 3 metadata: 4 name: cgit 5 namespace: git 6 spec: 7 storageClassName: longhorn 8 accessModes: 9 - ReadWriteMany 10 resources: 11 requests: 12 storage: 2Gi 13 --- 14 apiVersion: apps/v1 15 kind: Deployment 16 metadata: 17 name: cgit 18 namespace: git 19 labels: 20 app.kubernetes.io/name: cgit 21 spec: 22 strategy: 23 rollingUpdate: 24 maxSurge: 25% 25 maxUnavailable: 25% 26 type: RollingUpdate 27 selector: 28 matchLabels: 29 app: cgit 30 template: 31 metadata: 32 labels: 33 app: cgit 34 app.kubernetes.io/name: cgit 35 spec: 36 containers: 37 - name: anubis 38 image: ghcr.io/techarohq/anubis:latest 39 imagePullPolicy: Always 40 env: 41 - name: "BIND" 42 value: ":8081" 43 - name: "DIFFICULTY" 44 value: "4" 45 - name: ED25519_PRIVATE_KEY_HEX 46 valueFrom: 47 secretKeyRef: 48 name: anubis-key 49 key: ED25519_PRIVATE_KEY_HEX 50 - name: "METRICS_BIND" 51 value: ":9090" 52 - name: "SERVE_ROBOTS_TXT" 53 value: "true" 54 - name: "TARGET" 55 value: "http://localhost:8080" 56 - name: "OG_PASSTHROUGH" 57 value: "false" 58 - name: "OG_EXPIRY_TIME" 59 value: "24h" 60 resources: 61 limits: 62 cpu: 750m 63 memory: 256Mi 64 requests: 65 cpu: 250m 66 memory: 256Mi 67 ports: 68 - containerPort: 8081 69 name: anubis 70 protocol: TCP 71 securityContext: 72 runAsUser: 1000 73 runAsGroup: 1000 74 runAsNonRoot: true 75 allowPrivilegeEscalation: false 76 capabilities: 77 drop: 78 - ALL 79 seccompProfile: 80 type: RuntimeDefault 81 - name: cgit 82 image: ghcr.io/mtrnord/cgit-docker:main 83 imagePullPolicy: Always 84 resources: 85 limits: {} 86 requests: 87 memory: "344Mi" 88 cpu: "252m" 89 ports: 90 - containerPort: 8080 91 name: http 92 protocol: TCP 93 - containerPort: 2222 94 name: ssh 95 protocol: TCP 96 volumeMounts: 97 - mountPath: /var/lib/gitolite3 98 name: storage 99 - mountPath: /tmp 100 name: tmp 101 - mountPath: /etc/ssh/ssh_host_rsa_key 102 name: ssh-keys 103 subPath: ssh_host_rsa_key 104 readOnly: true 105 - mountPath: /etc/ssh/ssh_host_rsa_key.pub 106 name: ssh-keys 107 subPath: ssh_host_rsa_key.pub 108 readOnly: true 109 - mountPath: /etc/ssh/ssh_host_ecdsa_key 110 name: ssh-keys 111 subPath: ssh_host_ecdsa_key 112 readOnly: true 113 - mountPath: /etc/ssh/ssh_host_ecdsa_key.pub 114 name: ssh-keys 115 subPath: ssh_host_ecdsa_key.pub 116 readOnly: true 117 - mountPath: /etc/ssh/ssh_host_ed25519_key 118 name: ssh-keys 119 subPath: ssh_host_ed25519_key 120 readOnly: true 121 - mountPath: /etc/ssh/ssh_host_ed25519_key.pub 122 name: ssh-keys 123 subPath: ssh_host_ed25519_key.pub 124 readOnly: true 125 livenessProbe: 126 httpGet: 127 path: /healthz 128 port: http 129 scheme: HTTP 130 initialDelaySeconds: 15 131 periodSeconds: 10 132 startupProbe: 133 httpGet: 134 path: /healthz 135 port: http 136 initialDelaySeconds: 15 137 failureThreshold: 30 138 periodSeconds: 10 139 volumes: 140 - name: storage 141 persistentVolumeClaim: 142 claimName: cgit 143 - name: tmp 144 emptyDir: 145 sizeLimit: 2048Mi 146 - name: ssh-keys 147 secret: 148 secretName: cgit-ssh-keys 149 defaultMode: 0600