Matthias Andreas Benkard | 887523f | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 1 | --- |
| 2 | apiVersion: apps/v1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: git |
| 6 | namespace: mulk |
| 7 | labels: |
| 8 | name: git |
| 9 | k8s-app: git |
| 10 | spec: |
| 11 | replicas: 1 |
| 12 | selector: |
| 13 | matchLabels: |
| 14 | k8s-app: git |
| 15 | name: git |
| 16 | template: |
| 17 | metadata: |
| 18 | labels: |
| 19 | name: git |
| 20 | k8s-app: git |
| 21 | spec: |
| 22 | imagePullSecrets: |
| 23 | - name: kube-registry-token |
| 24 | containers: |
| 25 | - name: master |
| 26 | image: woahbase/alpine-cgit:latest |
| 27 | imagePullPolicy: Always |
| 28 | env: [] |
| 29 | resources: |
| 30 | limits: |
| 31 | cpu: 2000m |
| 32 | memory: 100Mi |
| 33 | requests: |
| 34 | cpu: 10m |
| 35 | memory: 50Mi |
| 36 | ports: |
| 37 | - containerPort: 80 |
| 38 | name: cgit-http |
| 39 | protocol: TCP |
| 40 | volumeMounts: |
| 41 | - name: data |
| 42 | mountPath: /home/git |
| 43 | - name: config |
| 44 | mountPath: /etc/cgitrc |
| 45 | subPath: cgitrc |
| 46 | readOnly: true |
| 47 | volumes: |
| 48 | - name: data |
| 49 | persistentVolumeClaim: |
| 50 | claimName: git-data |
| 51 | - name: config |
| 52 | configMap: |
| 53 | name: git-config |
| 54 | --- |
| 55 | apiVersion: v1 |
| 56 | kind: Service |
| 57 | metadata: |
| 58 | name: git-cgit |
| 59 | namespace: mulk |
| 60 | labels: |
| 61 | k8s-app: git |
| 62 | name: git-cgit |
| 63 | spec: |
| 64 | selector: |
| 65 | k8s-app: git |
| 66 | type: ClusterIP |
| 67 | ports: |
| 68 | - name: http |
| 69 | port: 80 |
| 70 | targetPort: cgit-http |
| 71 | protocol: TCP |
| 72 | --- |
| 73 | apiVersion: v1 |
| 74 | kind: Service |
| 75 | metadata: |
| 76 | name: git-gitolite |
| 77 | namespace: mulk |
| 78 | labels: |
| 79 | k8s-app: git |
| 80 | name: git-gitolite |
| 81 | spec: |
| 82 | selector: |
| 83 | k8s-app: git |
| 84 | type: ClusterIP |
| 85 | ports: |
| 86 | - name: ssh |
| 87 | port: 22 |
| 88 | targetPort: gitolite-ssh |
| 89 | protocol: TCP |
| 90 | --- |
| 91 | apiVersion: v1 |
| 92 | kind: PersistentVolumeClaim |
| 93 | metadata: |
| 94 | name: git-data |
| 95 | namespace: mulk |
| 96 | labels: |
| 97 | name: git-data |
| 98 | k8s-app: git |
| 99 | spec: |
| 100 | accessModes: |
| 101 | - ReadWriteOnce |
| 102 | resources: |
| 103 | requests: |
| 104 | storage: 200Gi |
| 105 | storageClassName: local-path |
| 106 | --- |
| 107 | apiVersion: networking.k8s.io/v1 |
| 108 | kind: Ingress |
| 109 | metadata: |
| 110 | name: git-cgit-cgi |
| 111 | namespace: mulk |
| 112 | annotations: |
| 113 | cert-manager.io/cluster-issuer: letsencrypt-prod |
| 114 | kubernetes.io/ingress.class: nginx |
| 115 | nginx.ingress.kubernetes.io/rewrite-target: /cgit/cgit.cgi/$1$2 |
| 116 | spec: |
| 117 | rules: |
| 118 | - host: git.benkard.de |
| 119 | http: |
| 120 | paths: |
| 121 | - backend: |
| 122 | service: |
| 123 | name: git-cgit |
| 124 | port: |
| 125 | number: 80 |
| 126 | path: /(.*)[.]git(/.*)?$ |
| 127 | pathType: ImplementationSpecific |
| 128 | - backend: |
| 129 | service: |
| 130 | name: git-cgit |
| 131 | port: |
| 132 | number: 80 |
| 133 | path: /(.*)(.*)?$ |
| 134 | pathType: ImplementationSpecific |
| 135 | tls: |
| 136 | - hosts: |
| 137 | - git.benkard.de |
| 138 | secretName: git-cgit-cgi-tls |
| 139 | --- |
| 140 | apiVersion: networking.k8s.io/v1 |
| 141 | kind: Ingress |
| 142 | metadata: |
| 143 | name: git-cgit-assets |
| 144 | namespace: mulk |
| 145 | annotations: |
| 146 | cert-manager.io/cluster-issuer: letsencrypt-prod |
| 147 | kubernetes.io/ingress.class: nginx |
| 148 | nginx.ingress.kubernetes.io/rewrite-target: /cgit/$1 |
| 149 | spec: |
| 150 | rules: |
| 151 | - host: static.git.benkard.de |
| 152 | http: |
| 153 | paths: |
| 154 | - backend: |
| 155 | service: |
| 156 | name: git-cgit |
| 157 | port: |
| 158 | number: 80 |
| 159 | path: /(.*) |
| 160 | pathType: ImplementationSpecific |
| 161 | tls: |
| 162 | - hosts: |
| 163 | - static.git.benkard.de |
| 164 | secretName: git-cgit-assets-tls |
| 165 | --- |
| 166 | apiVersion: v1 |
| 167 | kind: ConfigMap |
| 168 | metadata: |
| 169 | name: git-config |
| 170 | namespace: mulk |
| 171 | data: |
| 172 | cgitrc: |- |
| 173 | css=https://static.git.benkard.de/cgit.css |
| 174 | logo=https://static.git.benkard.de/cgit.png |
| 175 | |
| 176 | remove-suffix=1 |
| 177 | enable-commit-graph=1 |
| 178 | enable-index-links=1 |
| 179 | enable-log-filecount=1 |
| 180 | enable-log-linecount=1 |
| 181 | enable-git-config=1 |
| 182 | case-sensitive-sort=0 |
| 183 | |
| 184 | virtual-root=https://git.benkard.de/ |
| 185 | |
| 186 | #cache-size=10000 |
| 187 | #cache-root=/var/cache/cgit |
| 188 | |
| 189 | # needs Pygments |
| 190 | #source-filter=/usr/lib/cgit/filters/syntax-highlighting.py |
| 191 | |
| 192 | about-filter=/usr/lib/cgit/filters/about-formatting.sh |
| 193 | |
| 194 | clone-url=https://git.benkard.de/$CGIT_REPO_URL |
| 195 | |
| 196 | readme=:README.md |
| 197 | readme=:README.markdown |
| 198 | readme=:README.html |
| 199 | readme=:README.txt |
| 200 | readme=:README |
| 201 | |
| 202 | project-list=/home/git/projects.list |
| 203 | scan-path=/home/git/repositories/ |
| 204 | |
| 205 | # |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 206 | |
| 207 | --- |
| 208 | |
| 209 | apiVersion: batch/v1 |
| 210 | kind: CronJob |
| 211 | |
| 212 | metadata: |
| 213 | name: git-github-replication |
| 214 | namespace: mulk |
| 215 | labels: &labels |
| 216 | k8s-app: git |
| 217 | |
| 218 | spec: |
| 219 | schedule: "*/120 * * * *" |
Matthias Andreas Benkard | d2755e9 | 2022-12-27 15:31:15 +0100 | [diff] [blame] | 220 | concurrencyPolicy: Forbid |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 221 | |
| 222 | jobTemplate: |
| 223 | |
| 224 | spec: |
| 225 | ttlSecondsAfterFinished: 3600 |
| 226 | |
| 227 | template: |
| 228 | metadata: |
| 229 | name: git-github-replication |
| 230 | labels: *labels |
| 231 | |
| 232 | spec: |
| 233 | restartPolicy: OnFailure |
| 234 | |
| 235 | volumes: |
| 236 | - name: github-secrets |
| 237 | secret: |
| 238 | secretName: github-secrets |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 239 | defaultMode: 0444 |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 240 | - name: data |
| 241 | persistentVolumeClaim: |
| 242 | claimName: git-data |
| 243 | |
| 244 | containers: |
| 245 | - name: master |
| 246 | image: buildpack-deps:scm |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 247 | securityContext: |
| 248 | runAsUser: 100 |
| 249 | runAsGroup: 101 |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 250 | command: |
| 251 | - bash |
| 252 | - -c |
| 253 | - | |
| 254 | for x in \ |
| 255 | aquifer \ |
| 256 | benki \ |
| 257 | cellspp \ |
| 258 | cl-json-template \ |
| 259 | cl-mulkutils \ |
| 260 | cl-protocols \ |
| 261 | cljssss-g \ |
| 262 | fibers \ |
| 263 | hellonet \ |
| 264 | instadump \ |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 265 | jgvariant \ |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 266 | json-template-r6rs \ |
| 267 | json-template-racket \ |
| 268 | json-template-typed-racket \ |
| 269 | logikorr \ |
| 270 | mulkcms \ |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 271 | mulkcms2 \ |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 272 | mulkjournal \ |
| 273 | mulklib \ |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 274 | mulkontainers \ |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 275 | mulkrypt-for-racket \ |
| 276 | mulkyid \ |
| 277 | objective-cl \ |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 278 | quarkus-googlecloud-jsonlogging \ |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 279 | toilet |
| 280 | do |
| 281 | cd "/git/repositories/mulk/$x.git" |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 282 | git fetch "https://gitlab.benkard.de/mulk/${x}.git" master:master |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 283 | git push "git@github.com:benkard/${x}.git" master |
| 284 | done |
| 285 | true |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 286 | env: |
| 287 | - name: HOME |
| 288 | value: /nonexistent |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 289 | resources: |
| 290 | limits: |
| 291 | memory: 100Mi |
| 292 | requests: |
| 293 | cpu: 20m |
| 294 | memory: 100Mi |
| 295 | volumeMounts: |
| 296 | - name: github-secrets |
Matthias Andreas Benkard | 2f9c4fa | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 297 | mountPath: /nonexistent/.ssh |
Matthias Andreas Benkard | 53457f7 | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 298 | readOnly: true |
| 299 | - name: data |
| 300 | mountPath: /git |