summaryrefslogtreecommitdiffstats
path: root/kubernetes/helm/collabora-online/templates/deployment.yaml
blob: 20ef2b149dffc3ff8be2c8eede0cceb4a6a3908d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ default .Values.global.app.name .Values.deployment.name }}
  namespace: {{ .Values.namespace.collabora }}
  labels:
    app: {{ template "name" . }}
    chart: {{ template "chartname" . }}
    release: {{ .Release.Name }}
    version: "{{ .Values.global.app.version }}"
spec:
  minReadySeconds: {{ .Values.deployment.minReadySeconds }}
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ template "name" . }}
      release: {{ .Release.Name }}
  strategy:
    type: {{ .Values.deployment.type }}
    {{- if eq .Values.deployment.type "RollingUpdate"}}
    rollingUpdate:
      maxSurge: {{ .Values.deployment.maxSurge }}
      maxUnavailable: {{ .Values.deployment.maxUnavailable }}
    {{- end}}
  template:
    metadata:
      labels:
        app: {{ template "name" . }}
        release: {{ .Release.Name }}
        version: "{{ .Values.global.app.version }}"
      annotations:
      {{- if .Values.global.app.monitoring.activate }}
        prometheus.io/scrape: "true"
        prometheus.io/port: "{{ .Values.global.app.monitoring.port }}"
        prometheus.io/path: "{{ .Values.global.app.monitoring.path }}"
      {{- end }}
    spec:
      containers:
        - name: {{ .Values.global.app.name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: {{ .Values.global.app.service.internalPort }}
          securityContext:
            readOnlyRootFilesystem: false
        {{- if .Values.probes.liveness.activate }}
          livenessProbe:
            httpGet:
              path: {{ .Values.probes.liveness.path }}
              port: {{ .Values.probes.port }}
              scheme: {{ .Values.probes.urlScheme }}
            initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
            timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
            successThreshold: {{ .Values.probes.liveness.successThreshold }}
            failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
          {{- end }}
          {{- if .Values.probes.readiness.activate }}
          readinessProbe:
            httpGet:
              path: {{ .Values.probes.readiness.path }}
              port: {{ .Values.probes.port }}
              scheme: {{ .Values.probes.urlScheme }}
            initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
            timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
            successThreshold: {{ .Values.probes.readiness.successThreshold }}
            failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
          {{- end }}
          {{- if .Values.environmentVariablesLool }}
          env:
{{ toYaml .Values.environmentVariablesLool | indent 12 }}
          {{- end }}
          volumeMounts:
            - name: tmp
              mountPath: /tmp
          resources:
{{ toYaml .Values.resources | indent 12 }}
    {{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
    {{- end }}
      volumes:
        - name: tmp
          emptyDir: {}