|
| 1 | +{{- if .Values.perfanaScheduler.enabled -}} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: perfana-scheduler |
| 6 | + labels: |
| 7 | + app: perfana-scheduler |
| 8 | + chart: {{ include "perfana.chart" . }} |
| 9 | + release: {{ .Release.Name }} |
| 10 | + heritage: {{ .Release.Service }} |
| 11 | +spec: |
| 12 | + replicas: {{ .Values.perfanaScheduler.replicaCount }} |
| 13 | + selector: |
| 14 | + matchLabels: |
| 15 | + app: perfana-scheduler |
| 16 | + release: {{ .Release.Name }} |
| 17 | + template: |
| 18 | + metadata: |
| 19 | + labels: |
| 20 | + app: perfana-scheduler |
| 21 | + release: {{ .Release.Name }} |
| 22 | + {{- with .Values.perfanaScheduler.labels }} |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + {{- if .Values.perfanaScheduler.annotations }} |
| 26 | + annotations: {{ toYaml .Values.perfanaScheduler.annotations | nindent 8 }} |
| 27 | + {{- end }} |
| 28 | + spec: |
| 29 | + {{- if .Values.perfanaScheduler.serviceAccount.enabled }} |
| 30 | + serviceAccountName: {{ .Values.perfanaScheduler.serviceAccount.name }} |
| 31 | + {{- end}} |
| 32 | + {{- with .Values.imagePullSecrets }} |
| 33 | + imagePullSecrets: |
| 34 | + {{- toYaml . | nindent 8 }} |
| 35 | + {{- end }} |
| 36 | + {{- with .Values.securityContext }} |
| 37 | + securityContext: |
| 38 | + {{- toYaml . | nindent 8 }} |
| 39 | + {{- end }} |
| 40 | + containers: |
| 41 | + - name: perfana-scheduler |
| 42 | + image: "{{ .Values.perfanaScheduler.image.repository }}:{{ .Values.perfanaScheduler.image.tag }}" |
| 43 | + imagePullPolicy: {{ .Values.perfanaScheduler.image.pullPolicy }} |
| 44 | + {{- with .Values.perfanaScheduler.command }} |
| 45 | + command: |
| 46 | + {{ toYaml . | nindent 10 }} |
| 47 | + {{- end}} |
| 48 | + {{- with .Values.containerSecurityContext }} |
| 49 | + securityContext: |
| 50 | + {{- toYaml . | nindent 12 }} |
| 51 | + {{- end }} |
| 52 | + # livenessProbe: |
| 53 | + # httpGet: |
| 54 | + # path: / |
| 55 | + # port: http |
| 56 | + # readinessProbe: |
| 57 | + # httpGet: |
| 58 | + # path: / |
| 59 | + # port: http |
| 60 | + env: # ENV variables for your project |
| 61 | + {{- if .Values.mongoUrl.secretName }} |
| 62 | + - name: SPRING_DATA_MONGODB_URI |
| 63 | + valueFrom: |
| 64 | + secretKeyRef: |
| 65 | + key: MONGO_URL |
| 66 | + name: {{ .Values.mongoUrl.secretName }} |
| 67 | + {{- end }} |
| 68 | + {{- range $key, $value := .Values.perfanaScheduler.env }} |
| 69 | + - name: {{ $key }} |
| 70 | + value: '{{ $value }}' |
| 71 | + {{- end }} |
| 72 | + resources: |
| 73 | +{{ toYaml .Values.perfanaScheduler.resources | indent 12 }} |
| 74 | + volumeMounts: |
| 75 | + {{- if .Values.perfanaScheduler.volumeMounts }} |
| 76 | + {{- toYaml .Values.perfanaScheduler.volumeMounts | nindent 10 }} |
| 77 | + {{- end }} |
| 78 | + {{- if .Values.existingSecret }} |
| 79 | + - name: perfana-scheduler-secrets |
| 80 | + mountPath: /secrets/mongodb.properties |
| 81 | + subPath: perfana-scheduler-mongodb.properties |
| 82 | + {{- end }} |
| 83 | + volumes: |
| 84 | + {{- if .Values.perfanaScheduler.volumes }} |
| 85 | + {{- toYaml .Values.perfanaScheduler.volumes | nindent 6 }} |
| 86 | + {{- end }} |
| 87 | + {{- if .Values.existingSecret }} |
| 88 | + - name: perfana-scheduler-secrets |
| 89 | + projected: |
| 90 | + sources: |
| 91 | + - secret: |
| 92 | + name: {{ .Values.existingSecret }} |
| 93 | + {{- end }} |
| 94 | + {{- with .Values.perfanaScheduler.nodeSelector }} |
| 95 | + nodeSelector: |
| 96 | +{{ toYaml . | indent 8 }} |
| 97 | + {{- end }} |
| 98 | + {{- with .Values.perfanaScheduler.affinity }} |
| 99 | + affinity: |
| 100 | +{{ toYaml . | indent 8 }} |
| 101 | + {{- end }} |
| 102 | + {{- with .Values.perfanaScheduler.tolerations }} |
| 103 | + tolerations: |
| 104 | +{{ toYaml . | indent 8 }} |
| 105 | + {{- end }} |
| 106 | +{{- end }} |
0 commit comments