123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- apiVersion: extensions/v1beta1
- kind: Deployment
- metadata:
- annotations:
- deployment.kubernetes.io/revision: "1"
- generation: 1
- labels:
- app: gitrunner-gitlab-runner
- chart: gitlab-runner-0.8.0-beta
- release: gitrunner
- name: gitrunner-gitlab-runner
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: gitrunner-gitlab-runner
- strategy:
- rollingUpdate:
- maxSurge: 1
- maxUnavailable: 1
- type: RollingUpdate
- template:
- metadata:
- annotations:
- prometheus.io/port: "9252"
- prometheus.io/scrape: "true"
- labels:
- app: gitrunner-gitlab-runner
- spec:
- containers:
- - command:
- - /bin/bash
- - /scripts/entrypoint
- env:
- - name: CI_SERVER_URL
- value: http://g.xxx.com.cn/ci/
- - name: CLONE_URL
- - name: RUNNER_REQUEST_CONCURRENCY
- value: "1"
- - name: RUNNER_EXECUTOR
- value: kubernetes
- - name: REGISTER_LOCKED
- value: "true"
- - name: RUNNER_TAG_LIST
- value: kubernetes-runner
- - name: KUBERNETES_IMAGE
- value: ubuntu:16.04
- - name: KUBERNETES_PRIVILEGED
- value: "true"
- - name: KUBERNETES_NAMESPACE
- value: default
- - name: KUBERNETES_CPU_LIMIT
- - name: KUBERNETES_MEMORY_LIMIT
- - name: KUBERNETES_CPU_REQUEST
- - name: KUBERNETES_MEMORY_REQUEST
- - name: KUBERNETES_SERVICE_ACCOUNT
- - name: KUBERNETES_SERVICE_CPU_LIMIT
- - name: KUBERNETES_SERVICE_MEMORY_LIMIT
- - name: KUBERNETES_SERVICE_CPU_REQUEST
- - name: KUBERNETES_SERVICE_MEMORY_REQUEST
- - name: KUBERNETES_HELPER_CPU_LIMIT
- - name: KUBERNETES_HELPER_MEMORY_LIMIT
- - name: KUBERNETES_HELPER_CPU_REQUEST
- - name: KUBERNETES_HELPER_MEMORY_REQUEST
- - name: KUBERNETES_HELPER_IMAGE
- - name: KUBERNETES_PULL_POLICY
- image: gitlab/gitlab-runner:alpine-v11.6.0
- imagePullPolicy: IfNotPresent
- lifecycle:
- preStop:
- exec:
- command:
- - gitlab-runner
- - unregister
- - --all-runners
- livenessProbe:
- exec:
- command:
- - /bin/bash
- - /scripts/check-live
- failureThreshold: 3
- initialDelaySeconds: 60
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 1
- name: gitrunner-gitlab-runner
- ports:
- - containerPort: 9252
- name: metrics
- protocol: TCP
- readinessProbe:
- exec:
- command:
- - /usr/bin/pgrep
- - gitlab.*runner
- failureThreshold: 3
- initialDelaySeconds: 10
- periodSeconds: 10
- successThreshold: 1
- timeoutSeconds: 1
- resources:
- limits:
- cpu: 200m
- memory: 256Mi
- requests:
- cpu: 10m
- memory: 128Mi
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: /secrets
- name: runner-secrets
- - mountPath: /home/gitlab-runner/.gitlab-runner
- name: etc-gitlab-runner
- - mountPath: /scripts
- name: scripts
- dnsPolicy: ClusterFirst
- initContainers:
- - command:
- - sh
- - /config/configure
- env:
- - name: CI_SERVER_URL
- value: http://g.xxx.com.cn/ci/
- - name: CLONE_URL
- - name: RUNNER_REQUEST_CONCURRENCY
- value: "1"
- - name: RUNNER_EXECUTOR
- value: kubernetes
- - name: REGISTER_LOCKED
- value: "true"
- - name: RUNNER_TAG_LIST
- value: kubernetes-runner
- - name: KUBERNETES_IMAGE
- value: ubuntu:16.04
- - name: KUBERNETES_PRIVILEGED
- value: "true"
- - name: KUBERNETES_NAMESPACE
- value: default
- - name: KUBERNETES_CPU_LIMIT
- - name: KUBERNETES_MEMORY_LIMIT
- - name: KUBERNETES_CPU_REQUEST
- - name: KUBERNETES_MEMORY_REQUEST
- - name: KUBERNETES_SERVICE_ACCOUNT
- - name: KUBERNETES_SERVICE_CPU_LIMIT
- - name: KUBERNETES_SERVICE_MEMORY_LIMIT
- - name: KUBERNETES_SERVICE_CPU_REQUEST
- - name: KUBERNETES_SERVICE_MEMORY_REQUEST
- - name: KUBERNETES_HELPER_CPU_LIMIT
- - name: KUBERNETES_HELPER_MEMORY_LIMIT
- - name: KUBERNETES_HELPER_CPU_REQUEST
- - name: KUBERNETES_HELPER_MEMORY_REQUEST
- - name: KUBERNETES_HELPER_IMAGE
- - name: KUBERNETES_PULL_POLICY
- image: gitlab/gitlab-runner:alpine-v11.6.0
- imagePullPolicy: IfNotPresent
- name: configure
- resources:
- limits:
- cpu: 200m
- memory: 256Mi
- requests:
- cpu: 10m
- memory: 128Mi
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: /secrets
- name: runner-secrets
- - mountPath: /config
- name: scripts
- readOnly: true
- - mountPath: /init-secrets
- name: init-runner-secrets
- readOnly: true
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext:
- fsGroup: 65533
- runAsUser: 100
- serviceAccount: gitlab
- serviceAccountName: gitlab
- terminationGracePeriodSeconds: 30
- volumes:
- - emptyDir:
- medium: Memory
- name: runner-secrets
- - emptyDir:
- medium: Memory
- name: etc-gitlab-runner
- - name: init-runner-secrets
- projected:
- defaultMode: 420
- sources:
- - secret:
- items:
- - key: runner-registration-token
- path: runner-registration-token
- - key: runner-token
- path: runner-token
- name: gitrunner-gitlab-runner
- - configMap:
- defaultMode: 420
- name: gitrunner-gitlab-runner
- name: scripts
|