apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: app: gitlab-runner-gitlab-runner chart: gitlab-runner-0.7.0 release: gitlab-runner name: gitlab-runner-gitlab-runner spec: replicas: 1 selector: matchLabels: app: gitlab-runner-gitlab-runner strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: annotations: prometheus.io/port: "9252" prometheus.io/scrape: "true" labels: app: gitlab-runner-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 value: 200m - name: KUBERNETES_SERVICE_MEMORY_LIMIT value: 256Mi - name: KUBERNETES_SERVICE_CPU_REQUEST value: 100m - name: KUBERNETES_SERVICE_MEMORY_REQUEST value: 128Mi - 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: 10.120.116.178/package-images/gitlab-runner:alpine-v12.1.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: gitlab-runner-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: {} 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 - mountPath: /builds name: builds 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 value: 200m - name: KUBERNETES_SERVICE_MEMORY_LIMIT value: 256Mi - name: KUBERNETES_SERVICE_CPU_REQUEST value: 100m - name: KUBERNETES_SERVICE_MEMORY_REQUEST value: 128Mi - 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: 10.120.116.178/package-images/gitlab-runner:alpine-v12.1.0 imagePullPolicy: IfNotPresent name: configure resources: {} 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: - name: builds persistentVolumeClaim: claimName: gitrunner-workspace - 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: gitlab-runner-gitlab-runner - configMap: defaultMode: 420 name: gitlab-runner-gitlab-runner name: scripts