Add gitlab-runner/deployment.yml
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user