EOX GitLab Instance

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