commit 0fd84b8d59b24f391776687ed201dabdfd8fdd14 Author: pashko Date: Fri Sep 11 15:22:52 2026 +0800 Add gitlab-runner/deployment.yml diff --git a/gitlab-runner/deployment.yml b/gitlab-runner/deployment.yml new file mode 100644 index 0000000..e17efef --- /dev/null +++ b/gitlab-runner/deployment.yml @@ -0,0 +1,84 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitlab-runner + namespace: mmedo-sorsed-prod + labels: + app: gitlab-runner +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: gitlab-runner + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + prometheus.io/scrape: 'true' + prometheus.io/path: '/actuator/prometheus' + prometheus.io/port: '8080' + labels: + app: gitlab-runner + spec: + serviceAccountName: mmedo-sorsed-prod-runner-sa + terminationGracePeriodSeconds: 360 + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 + + containers: + - name: gitlab-runner + image: base-docker.rtyru/gitlab/gitlab-runner:alpine3.21-v18.11.3-checked + imagePullPolicy: IfNotPresent + command: + - /usr/bin/env + - sh + - -c + - "gitlab-runner run --user=gitlab-runner --working-directory=/home/gitlab-runner" + + livenessProbe: + exec: + command: ["gitlab-runner", "status"] + initialDelaySeconds: 10 + periodSeconds: 15 + readinessProbe: + exec: + command: ["gitlab-runner", "status"] + initialDelaySeconds: 10 + periodSeconds: 15 + + volumeMounts: + - name: config + mountPath: /etc/gitlab-runner + - name: tmp-dir + mountPath: /tmp + - name: ca-certs-vol + mountPath: /etc/gitlab-runner/certs/ca-bundle.crt + subPath: ca-bundle.crt + read_only: true + + resources: + requests: + cpu: 1 + memory: 512Mi + limits: + cpu: 2 + memory: 2048Mi + volumes: + - name: config + configMap: + name: gitlab-runner-config + - name: tmp-dir + emptyDir: {} + - name: ca-certs-vol + secret: + secretName: prod-ca-certs + dnsPolicy: ClusterFirst + restartPolicy: Always + imagePullSecrets: + - name: nexus-registry + - name: nexus-regestry-base + \ No newline at end of file