|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "cf-venona.fullname" . }} |
| 5 | + labels: {{- include "cf-venona.labels" . | nindent 4 }} |
| 6 | +spec: |
| 7 | + selector: |
| 8 | + matchLabels: {{- include "cf-venona.selectorLabels" . | nindent 6 }} |
| 9 | + replicas: 1 |
| 10 | + revisionHistoryLimit: 5 |
| 11 | + strategy: |
| 12 | + rollingUpdate: |
| 13 | + maxSurge: 50% |
| 14 | + maxUnavailable: 50% |
| 15 | + type: RollingUpdate |
| 16 | + template: |
| 17 | + metadata: |
| 18 | + labels: {{- include "cf-venona.labels" . | nindent 8 }} |
| 19 | + spec: |
| 20 | + serviceAccountName: {{ include "cf-venona.fullname" . }} |
| 21 | + {{/* {{ if ne .Values.nodeSelector "" }}*/}} |
| 22 | + {{/* nodeSelector:*/}} |
| 23 | + {{/* {{ .Values.NodeSelector | nodeSelectorParamToYaml | indent 8 | unescape }}*/}} |
| 24 | + {{/* {{ end }}*/}} |
| 25 | + {{/* tolerations:*/}} |
| 26 | + {{/* {{ toYaml .Values.Tolerations | indent 8 | unescape }}*/}} |
| 27 | + containers: |
| 28 | + - name: venona |
| 29 | + env: |
| 30 | + {{/* {{- if .Values.EnvVars }}*/}} |
| 31 | + {{/* {{- range $key, $value := .Values.EnvVars }}*/}} |
| 32 | + {{/* - name: {{ $key }}*/}} |
| 33 | + {{/* value: "{{ $value}}"*/}} |
| 34 | + {{/* {{- end}}*/}} |
| 35 | + {{/* {{- end}}*/}} |
| 36 | + {{/* {{- if .Values.AdditionalEnvVars }}*/}} |
| 37 | + {{/* {{- range $key, $value := .Values.AdditionalEnvVars }}*/}} |
| 38 | + {{/* - name: {{ $key }}*/}} |
| 39 | + {{/* value: "{{ $value}}"*/}} |
| 40 | + {{/* {{- end}}*/}} |
| 41 | + {{/* {{- end}}*/}} |
| 42 | + - name: SELF_DEPLOYMENT_NAME |
| 43 | + valueFrom: |
| 44 | + fieldRef: |
| 45 | + fieldPath: metadata.name |
| 46 | + - name: CODEFRESH_TOKEN |
| 47 | + valueFrom: |
| 48 | + secretKeyRef: |
| 49 | + name: {{ include "cf-venona.fullname" . }} |
| 50 | + key: codefresh.token |
| 51 | + - name: CODEFRESH_IN_CLUSTER_RUNTIME |
| 52 | + value: {{ .Values.global.runtimeName }} |
| 53 | + - name: CODEFRESH_HOST |
| 54 | + value: {{ .Values.global.codefreshHost }} |
| 55 | + - name: AGENT_MODE |
| 56 | + value: InCluster |
| 57 | + - name: "AGENT_ID" {{/* agent name */}} |
| 58 | + value: {{ .Values.global.agentName }} |
| 59 | + {{- if ne .Values.dockerRegistry "" }} |
| 60 | + - name: DOCKER_REGISTRY |
| 61 | + value: {{ .Values.dockerRegistry }} |
| 62 | + {{- end }} |
| 63 | + {{- if .Values.newRelicLicense }} |
| 64 | + - name: NEWRELIC_LICENSE_KEY |
| 65 | + value: {{ .Values.newRelicLicense }} |
| 66 | + {{- end }} |
| 67 | + image: {{ include "cf-venona.docker-image" . }} |
| 68 | + ports: |
| 69 | + - containerPort: 8080 |
| 70 | + protocol: TCP |
| 71 | + readinessProbe: |
| 72 | + httpGet: |
| 73 | + path: /health |
| 74 | + port: 8080 |
| 75 | + periodSeconds: 5 |
| 76 | + timeoutSeconds: 5 |
| 77 | + successThreshold: 1 |
| 78 | + failureThreshold: 5 |
| 79 | + {{/* volumeMounts:*/}} |
| 80 | + {{/* - name: runnerconf*/}} |
| 81 | + {{/* mountPath: "/etc/secrets"*/}} |
| 82 | + {{/* readOnly: true*/}} |
| 83 | + imagePullPolicy: Always |
| 84 | + {{/* resources: {{ toYaml .Values.Runner.resources | nindent 10 /* todo capital change }}*/}} |
| 85 | + securityContext: |
| 86 | + runAsUser: 10001 |
| 87 | + runAsGroup: 10001 |
| 88 | + fsGroup: 10001 |
| 89 | + restartPolicy: Always |
0 commit comments