|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "runboat.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "runboat.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + selector: |
| 9 | + matchLabels: |
| 10 | + {{- include "runboat.selectorLabels" . | nindent 6 }} |
| 11 | + template: |
| 12 | + metadata: |
| 13 | + {{- with .Values.podAnnotations }} |
| 14 | + annotations: |
| 15 | + {{- toYaml . | nindent 8 }} |
| 16 | + {{- end }} |
| 17 | + labels: |
| 18 | + {{- include "runboat.labels" . | nindent 8 }} |
| 19 | + {{- with .Values.podLabels }} |
| 20 | + {{- toYaml . | nindent 8 }} |
| 21 | + {{- end }} |
| 22 | + spec: |
| 23 | + {{- with .Values.imagePullSecrets }} |
| 24 | + imagePullSecrets: |
| 25 | + {{- toYaml . | nindent 8 }} |
| 26 | + {{- end }} |
| 27 | + serviceAccountName: {{ include "runboat.serviceAccountName" . }} |
| 28 | + {{- with .Values.podSecurityContext }} |
| 29 | + securityContext: |
| 30 | + {{- toYaml . | nindent 8 }} |
| 31 | + {{- end }} |
| 32 | + containers: |
| 33 | + - name: {{ .Chart.Name }} |
| 34 | + {{- with .Values.securityContext }} |
| 35 | + securityContext: |
| 36 | + {{- toYaml . | nindent 12 }} |
| 37 | + {{- end }} |
| 38 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 39 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 40 | + ports: |
| 41 | + - name: http |
| 42 | + containerPort: 8000 |
| 43 | + protocol: TCP |
| 44 | + {{- with .Values.livenessProbe }} |
| 45 | + livenessProbe: |
| 46 | + {{- toYaml . | nindent 12 }} |
| 47 | + {{- end }} |
| 48 | + {{- with .Values.readinessProbe }} |
| 49 | + readinessProbe: |
| 50 | + {{- toYaml . | nindent 12 }} |
| 51 | + {{- end }} |
| 52 | + {{- with .Values.resources }} |
| 53 | + resources: |
| 54 | + {{- toYaml . | nindent 12 }} |
| 55 | + {{- end }} |
| 56 | + {{- with .Values.volumeMounts }} |
| 57 | + volumeMounts: |
| 58 | + {{- toYaml . | nindent 12 }} |
| 59 | + {{- end }} |
| 60 | + env: |
| 61 | + - name: RUNBOAT_BUILD_NAMESPACE |
| 62 | + value: {{ .Values.runboat.buildNamespace | quote }} |
| 63 | + - name: RUNBOAT_API_ADMIN_USER |
| 64 | + value: {{ .Values.runboat.adminUser | quote }} |
| 65 | + - name: RUNBOAT_API_ADMIN_PASSWD |
| 66 | + valueFrom: |
| 67 | + secretKeyRef: |
| 68 | + name: {{ .Values.runboat.secret.name | default include "runboat.fullname" . | quote }} |
| 69 | + key: {{ .Values.runboat.secret.adminPasswordKey | default "password" | quote }} |
| 70 | + - name: RUNBOAT_MAX_INITIALIZING |
| 71 | + value: {{ .Values.runboat.maxInitializing | quote }} |
| 72 | + - name: RUNBOAT_MAX_STARTED |
| 73 | + value: {{ .Values.runboat.maxStarted | quote }} |
| 74 | + - name: RUNBOAT_MAX_DEPLOYED |
| 75 | + value: {{ .Values.runboat.maxDeployed | quote }} |
| 76 | + - name: RUNBOAT_BUILD_ENV |
| 77 | + value: {{ .Values.runboat.buildEnv | toJson }} |
| 78 | + {{- with .Values.runboat.secret }} |
| 79 | + {{- if .buildSecretEnvKey }} |
| 80 | + - name: RUNBOAT_BUILD_SECRET_ENV |
| 81 | + valueFrom: |
| 82 | + secretKeyRef: |
| 83 | + name: {{ .Values.runboat.secret.name | default include "runboat.fullname" . | quote }} |
| 84 | + key: {{ .Values.runboat.secret.buildSecretEnvKey | quote }} |
| 85 | + {{- end }} |
| 86 | + {{- end }} |
| 87 | + - name: RUNBOAT_BUILD_TEMPLATE_VARS |
| 88 | + value: {{ .Values.runboat.buildTemplateVars | toJson }} |
| 89 | + - name: RUNBOAT_BASE_URL |
| 90 | + value: http{{- if .Values.ingress.tls -}}s{{- end -}}://{{ .Values.ingress.host }} |
| 91 | + - name: RUNBOAT_BUILD_DOMAIN |
| 92 | + value: {{ .Values.runboat.buildDomain | quote }} |
| 93 | + - name: RUNBOAT_GITHUB_TOKEN |
| 94 | + valueFrom: |
| 95 | + secretKeyRef: |
| 96 | + name: {{ .Values.runboat.secret.name | default include "runboat.fullname" . | quote }} |
| 97 | + key: {{ .Values.runboat.secret.githubTokenKey default "githubToken" | quote }} |
| 98 | + - name: RUNBOAT_REPOS |
| 99 | + value: {{ .Values.runboat.repos | toJson }} |
| 100 | + {{- with .Values.volumes }} |
| 101 | + volumes: |
| 102 | + {{- toYaml . | nindent 8 }} |
| 103 | + {{- end }} |
| 104 | + {{- with .Values.nodeSelector }} |
| 105 | + nodeSelector: |
| 106 | + {{- toYaml . | nindent 8 }} |
| 107 | + {{- end }} |
| 108 | + {{- with .Values.affinity }} |
| 109 | + affinity: |
| 110 | + {{- toYaml . | nindent 8 }} |
| 111 | + {{- end }} |
| 112 | + {{- with .Values.tolerations }} |
| 113 | + tolerations: |
| 114 | + {{- toYaml . | nindent 8 }} |
| 115 | + {{- end }} |
0 commit comments