File size: 2,964 Bytes
7ef7cde
 
 
 
 
 
99fe398
 
 
 
7ef7cde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c62c5f6
 
7ef7cde
c62c5f6
7ef7cde
c3fd758
 
 
7ef7cde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
be2778b
 
 
 
 
7ef7cde
8f46b95
 
 
 
7ef7cde
 
 
5c1156a
7ef7cde
583a268
7ef7cde
8f46b95
 
 
7ef7cde
 
 
 
 
 
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
apiVersion: apps/v1
kind: Deployment
metadata:
  labels: {{ include "labels.standard" . | nindent 4 }}
  name: {{ include "name" . }}
  namespace: {{ .Release.Namespace }}
  {{- if .Values.infisical.enabled }}
  annotations:
    secrets.infisical.com/auto-reload: "true"
  {{- end }}
spec:
  progressDeadlineSeconds: 600
  {{- if not $.Values.autoscaling.enabled }}
  replicas: {{ .Values.replicas }}
  {{- end }}
  revisionHistoryLimit: 10
  selector:
    matchLabels: {{ include "labels.standard" . | nindent 6 }}
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels: {{ include "labels.standard" . | nindent 8 }}
      annotations:
        checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
        {{- if $.Values.envVars.NODE_LOG_STRUCTURED_DATA }}
        co.elastic.logs/json.expand_keys: "true"
        {{- end }}
    spec:
      {{- if .Values.serviceAccount.enabled }}
      serviceAccountName: "{{ .Values.serviceAccount.name | default (include "name" .) }}"
      {{- end }}
      containers:
        - name: chat-ui
          image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          readinessProbe:
            failureThreshold: 30
            periodSeconds: 10
            httpGet:
              path: {{ $.Values.envVars.APP_BASE | default "" }}/healthcheck
              port: {{ $.Values.envVars.APP_PORT | default 3000 | int }}
          livenessProbe:
            failureThreshold: 30
            periodSeconds: 10
            httpGet:
              path: {{ $.Values.envVars.APP_BASE | default "" }}/healthcheck
              port: {{ $.Values.envVars.APP_PORT | default 3000 | int }}
          ports:
            - containerPort: {{ $.Values.envVars.APP_PORT | default 3000 | int }}
              name: http
              protocol: TCP
            {{- if eq "true" $.Values.envVars.METRICS_ENABLED }}
            - containerPort: {{ $.Values.envVars.METRICS_PORT | default 5565 | int }}
              name: metrics
              protocol: TCP
            {{- end }}
          resources: {{ toYaml .Values.resources | nindent 12 }}
          {{- with $.Values.extraEnv }}
          env:
            {{- toYaml . | nindent 14 }}
          {{- end }}
          envFrom:
            - configMapRef:
                name: {{ include "name" . }}
          {{- if $.Values.infisical.enabled }}
            - secretRef:
                name: {{ include "name" $ }}-secs
          {{- end }}
          {{- with $.Values.extraEnvFrom }}
            {{- toYaml . | nindent 14 }}
          {{- end }}
      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
      tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
      volumes:
        - name: config
          configMap:
            name: {{ include "name" . }}