|
| 1 | +apiVersion: extensions/v1beta1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: deis-builder |
| 5 | + labels: |
| 6 | + heritage: deis |
| 7 | + annotations: |
| 8 | + component.deis.io/version: {{ .Values.docker_tag }} |
| 9 | +spec: |
| 10 | + replicas: 1 |
| 11 | + strategy: |
| 12 | + rollingUpdate: |
| 13 | + maxSurge: 1 |
| 14 | + maxUnavailable: 0 |
| 15 | + type: RollingUpdate |
| 16 | + selector: |
| 17 | + matchLabels: |
| 18 | + app: deis-builder |
| 19 | + template: |
| 20 | + metadata: |
| 21 | + labels: |
| 22 | + app: deis-builder |
| 23 | + spec: |
| 24 | + serviceAccount: deis-builder |
| 25 | + containers: |
| 26 | + - name: deis-builder |
| 27 | + image: quay.io/{{.Values.org}}/builder:{{.Values.docker_tag}} |
| 28 | + imagePullPolicy: {{.Values.pull_policy}} |
| 29 | + ports: |
| 30 | + - containerPort: 2223 |
| 31 | + name: ssh |
| 32 | + - containerPort: 8092 |
| 33 | + name: healthsrv |
| 34 | +{{- if or (.Values.limits_cpu) (.Values.limits_memory)}} |
| 35 | + resources: |
| 36 | + limits: |
| 37 | +{{- if (.Values.limits_cpu) }} |
| 38 | + cpu: {{.Values.limits_cpu}} |
| 39 | +{{- end}} |
| 40 | +{{- if (.Values.limits_memory) }} |
| 41 | + memory: {{.Values.limits_memory}} |
| 42 | +{{- end}} |
| 43 | +{{- end}} |
| 44 | + env: |
| 45 | + # NOTE(bacongobbler): use deis/registry_proxy to work around Docker --insecure-registry requirements |
| 46 | + - name: "DEIS_REGISTRY_SERVICE_HOST" |
| 47 | + value: "localhost" |
| 48 | + - name: "DEIS_REGISTRY_SERVICE_PORT" |
| 49 | + value: "{{ .Values.global.host_port }}" |
| 50 | + - name: "HEALTH_SERVER_PORT" |
| 51 | + value: "8092" |
| 52 | + - name: "EXTERNAL_PORT" |
| 53 | + value: "2223" |
| 54 | + - name: BUILDER_STORAGE |
| 55 | + value: "{{ .Values.global.storage }}" |
| 56 | + - name: "DEIS_REGISTRY_LOCATION" |
| 57 | + value: "{{ .Values.global.registry_location }}" |
| 58 | + - name: "DEIS_REGISTRY_SECRET_PREFIX" |
| 59 | + value: "{{ .Values.global.secret_prefix }}" |
| 60 | + # Set GIT_LOCK_TIMEOUT to number of minutes you want to wait to git push again to the same repository |
| 61 | + - name: "GIT_LOCK_TIMEOUT" |
| 62 | + value: "10" |
| 63 | + - name: "SLUGBUILDER_IMAGE_NAME" |
| 64 | + valueFrom: |
| 65 | + configMapKeyRef: |
| 66 | + name: slugbuilder-config |
| 67 | + key: image |
| 68 | + - name: SLUG_BUILDER_IMAGE_PULL_POLICY |
| 69 | + valueFrom: |
| 70 | + configMapKeyRef: |
| 71 | + name: slugbuilder-config |
| 72 | + key: pullPolicy |
| 73 | + - name: "DOCKERBUILDER_IMAGE_NAME" |
| 74 | + valueFrom: |
| 75 | + configMapKeyRef: |
| 76 | + name: dockerbuilder-config |
| 77 | + key: image |
| 78 | + - name: DOCKER_BUILDER_IMAGE_PULL_POLICY |
| 79 | + valueFrom: |
| 80 | + configMapKeyRef: |
| 81 | + name: dockerbuilder-config |
| 82 | + key: pullPolicy |
| 83 | + # This var needs to be passed so that the minio client (https://github.com/minio/mc) will work in Alpine linux |
| 84 | + - name: "DOCKERIMAGE" |
| 85 | + value: "1" |
| 86 | + - name: "DEIS_DEBUG" |
| 87 | + value: "false" |
| 88 | + - name: "POD_NAMESPACE" |
| 89 | + valueFrom: |
| 90 | + fieldRef: |
| 91 | + fieldPath: metadata.namespace |
| 92 | + - name: DEIS_BUILDER_KEY |
| 93 | + valueFrom: |
| 94 | + secretKeyRef: |
| 95 | + name: builder-key-auth |
| 96 | + key: builder-key |
| 97 | + livenessProbe: |
| 98 | + httpGet: |
| 99 | + path: /healthz |
| 100 | + port: 8092 |
| 101 | + initialDelaySeconds: 30 |
| 102 | + timeoutSeconds: 1 |
| 103 | + readinessProbe: |
| 104 | + httpGet: |
| 105 | + path: /readiness |
| 106 | + port: 8092 |
| 107 | + initialDelaySeconds: 30 |
| 108 | + timeoutSeconds: 1 |
| 109 | + volumeMounts: |
| 110 | + - name: builder-key-auth |
| 111 | + mountPath: /var/run/secrets/api/auth |
| 112 | + readOnly: true |
| 113 | + - name: builder-ssh-private-keys |
| 114 | + mountPath: /var/run/secrets/deis/builder/ssh |
| 115 | + readOnly: true |
| 116 | + - name: objectstore-creds |
| 117 | + mountPath: /var/run/secrets/deis/objectstore/creds |
| 118 | + readOnly: true |
| 119 | + volumes: |
| 120 | + - name: builder-key-auth |
| 121 | + secret: |
| 122 | + secretName: builder-key-auth |
| 123 | + - name: builder-ssh-private-keys |
| 124 | + secret: |
| 125 | + secretName: builder-ssh-private-keys |
| 126 | + - name: objectstore-creds |
| 127 | + secret: |
| 128 | + secretName: objectstorage-keyfile |
0 commit comments