about summary refs log blame commit diff
path: root/k8s/rest-api/templates/deployment.yaml
blob: aa61cb6c1b3b9861b28a6eab988da4473bab1061 (plain) (tree)
1
2
3
4
5
6
7
8






                                                  
                                      















                                                              





                                                              
                                                                         














                                                         
              
                                

                           

                                          

                                            











                                      
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "rest-api.fullname" . }}
  labels:
    {{- include "rest-api.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "rest-api.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      {{- with .Values.podAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      labels:
        {{- include "rest-api.selectorLabels" . | nindent 8 }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.service.port }}
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: http
          readinessProbe:
            httpGet:
              path: /
              port: http
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
          env:
          - name: KAFKA_PASSWORD
            valueFrom:
              secretKeyRef:
                name: kafka-user-passwords
                key: client-passwords
          - name: DB_PASSWORD
            value: {{ .Values.db.password }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}