|
| 1 | +{{- define "builder.envs" -}} |
| 2 | +env: |
| 3 | +# NOTE(bacongobbler): use drycc/registry_proxy to work around Docker --insecure-registry requirements |
| 4 | +- name: "DRYCC_REGISTRY_PROXY_HOST" |
| 5 | + value: "127.0.0.1" |
| 6 | +- name: "DRYCC_REGISTRY_PROXY_PORT" |
| 7 | + value: "{{ .Values.global.registryProxyPort }}" |
| 8 | +- name: "HEALTH_SERVER_PORT" |
| 9 | + value: "8092" |
| 10 | +- name: "EXTERNAL_PORT" |
| 11 | + value: "2223" |
| 12 | +- name: BUILDER_STORAGE |
| 13 | + value: "{{ .Values.global.storage }}" |
| 14 | +- name: "DRYCC_REGISTRY_LOCATION" |
| 15 | + value: "{{ .Values.global.registryLocation }}" |
| 16 | +- name: "TTL_SECONDS_AFTER_FINISHED" |
| 17 | + value: "{{ .Values.global.ttlSecondsAfterFinished }}" |
| 18 | +# Set GIT_LOCK_TIMEOUT to number of minutes you want to wait to git push again to the same repository |
| 19 | +- name: "GIT_LOCK_TIMEOUT" |
| 20 | + value: "30" |
| 21 | +- name: IMAGEBUILDER_IMAGE_PULL_POLICY |
| 22 | + valueFrom: |
| 23 | + configMapKeyRef: |
| 24 | + name: imagebuilder-config |
| 25 | + key: imagePullPolicy |
| 26 | +- name: "DRYCC_DEBUG" |
| 27 | + value: "false" |
| 28 | +- name: "POD_NAMESPACE" |
| 29 | + valueFrom: |
| 30 | + fieldRef: |
| 31 | + fieldPath: metadata.namespace |
| 32 | +- name: DRYCC_BUILDER_KEY |
| 33 | + valueFrom: |
| 34 | + secretKeyRef: |
| 35 | + name: builder-key-auth |
| 36 | + key: builder-key |
| 37 | +{{- if (.Values.builder_pod_node_selector) }} |
| 38 | +- name: BUILDER_POD_NODE_SELECTOR |
| 39 | + value: {{.Values.builder_pod_node_selector}} |
| 40 | +{{- if eq .Values.global.minioLocation "on-cluster" }} |
| 41 | +- name: "DRYCC_MINIO_ENDPOINT" |
| 42 | + value: ${DRYCC_MINIO_SERVICE_HOST}:${DRYCC_MINIO_SERVICE_PORT} |
| 43 | +{{- else }} |
| 44 | +- name: "DRYCC_MINIO_ENDPOINT" |
| 45 | + value: "{{ .Values.minio.endpoint }}" |
| 46 | +{{- end }} |
| 47 | +{{- end }} |
| 48 | + |
| 49 | +{{/* Generate builder deployment limits */}} |
| 50 | +{{- define "builder.limits" -}} |
| 51 | +{{- if or (.Values.limitsCpu) (.Values.limitsMemory) }} |
| 52 | +resources: |
| 53 | + limits: |
| 54 | + {{- if (.Values.limitsCpu) }} |
| 55 | + cpu: {{.Values.limitsCpu}} |
| 56 | + {{- end }} |
| 57 | + {{- if (.Values.limitsMemory) }} |
| 58 | + memory: {{.Values.limitsMemory}} |
| 59 | + {{- end }} |
| 60 | +{{- end }} |
| 61 | +{{- end }} |
0 commit comments