Matthias Andreas Benkard | c058c56 | 2023-01-08 19:04:34 +0100 | [diff] [blame] | 1 | --- |
| 2 | apiVersion: apps/v1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: gitlab-runner |
| 6 | namespace: mulk |
| 7 | labels: |
| 8 | name: gitlab-runner |
| 9 | k8s-app: gitlab-runner |
| 10 | |
| 11 | spec: |
| 12 | replicas: 1 |
| 13 | |
| 14 | strategy: |
| 15 | rollingUpdate: |
| 16 | maxSurge: 1 |
| 17 | maxUnavailable: 1 |
| 18 | |
| 19 | selector: |
| 20 | matchLabels: |
| 21 | k8s-app: gitlab-runner |
| 22 | name: gitlab-runner |
| 23 | |
| 24 | template: |
| 25 | metadata: |
| 26 | labels: |
| 27 | name: gitlab-runner |
| 28 | k8s-app: gitlab-runner |
| 29 | |
| 30 | spec: |
| 31 | imagePullSecrets: |
| 32 | - name: portus-token |
| 33 | |
| 34 | runtimeClassName: kata |
| 35 | |
| 36 | containers: |
| 37 | - name: master |
| 38 | image: docker.benkard.de/mulk/gitlab-runner:miyj7qdmgdbbqk7zkj3wdq0ld9zxdk2z |
| 39 | |
| 40 | securityContext: |
| 41 | # In a Kata container, this only gives the container full |
| 42 | # access to the guest VM rather than the host. (To ensure |
| 43 | # this, it is important to set privileged_without_host_devices |
| 44 | # = true in the [plugins.cri.containerd.runtimes.kata] section |
| 45 | # of containerd's config.toml.) |
| 46 | privileged: true |
| 47 | |
| 48 | volumeMounts: |
| 49 | # Configuration data. |
| 50 | - name: config |
| 51 | mountPath: /etc/gitlab-runner |
| 52 | |
| 53 | # State. |
| 54 | - name: docker-data |
| 55 | mountPath: /vol/docker-data |
| 56 | - name: tmp |
| 57 | mountPath: /tmp |
| 58 | |
| 59 | resources: |
| 60 | limits: |
| 61 | memory: 4G |
| 62 | |
| 63 | volumes: |
| 64 | - name: config |
| 65 | secret: |
| 66 | secretName: gitlab-runner-config |
| 67 | - name: docker-data |
| 68 | persistentVolumeClaim: |
| 69 | claimName: gitlab-runner-docker |
| 70 | - name: tmp |
| 71 | emptyDir: {} |
| 72 | |
| 73 | --- |
| 74 | apiVersion: v1 |
| 75 | kind: PersistentVolumeClaim |
| 76 | metadata: |
| 77 | name: gitlab-runner-docker |
| 78 | namespace: mulk |
| 79 | annotations: |
| 80 | volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| 81 | volume.kubernetes.io/selected-node: ifirn |
| 82 | spec: |
| 83 | storageClassName: local-path |
| 84 | accessModes: |
| 85 | - ReadWriteOnce |
| 86 | resources: |
| 87 | requests: |
| 88 | storage: 1Gi |