EOX GitLab Instance

deployment.yaml 2.23 KB
Newer Older
Nikola Jankovic's avatar
Nikola Jankovic committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "vs-harvester.fullname" . }}
  labels:
    {{- include "vs-harvester.labels" . | nindent 4 }}
    app.kubernetes.io/service: harvester
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "vs-harvester.selectorLabels" . | nindent 6 }}
      app.kubernetes.io/service: harvester
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "false"
22
        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
Nikola Jankovic's avatar
Nikola Jankovic committed
23
24
25
26
27
28
29
30
31
      labels:
        {{- include "vs-harvester.selectorLabels" . | nindent 8 }}
        app.kubernetes.io/service: harvester
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      containers:
Nikola Jankovic's avatar
Nikola Jankovic committed
32
        - name: {{ .Chart.Name }}
Nikola Jankovic's avatar
Nikola Jankovic committed
33
34
35
36
37
38
39
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default ( print "release-" .Chart.AppVersion ) }}"
          imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
          args:
            - /opt/harvester/run-harvester.sh
          env:
40
41
            - name: REDIS_HOST
              value: {{ .Release.Name }}-redis-master
Nikola Jankovic's avatar
Nikola Jankovic committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
            {{- range $key, $value := .Values.global.env }}
            - name: {{ $key }}
              value: {{ $value | quote }}
            {{- end }}
          volumeMounts:
            - mountPath: /config.yaml
              name: harvester-config
              subPath: harvester-config.yaml
            {{- range $volumes := .Values.volumeMounts }}
            - {{- toYaml $volumes | nindent 16 }}
            {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      volumes:
        - configMap:
            items:
              - key: harvester-config.yaml
                path: harvester-config.yaml
            name: {{ include "vs-harvester.fullname" . }}-config
          name: harvester-config
        {{- range $volumes := .Values.volumes }}
        - {{- toYaml $volumes | nindent 12 }}
        {{- end }}