apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "devopsguru_eks_test.fullname" . }} labels: {{- include "devopsguru_eks_test.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "devopsguru_eks_test.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "devopsguru_eks_test.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "devopsguru_eks_test.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: 8080 protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: "prod" - name: JAVA_TOOL_OPTIONS value: >- -XX:ReservedCodeCacheSize=40M -XX:MaxMetaspaceSize=60M -Xms128m -Xmx256m -Xss256k -XX:MaxRAM=384M - name: REBOOT_LOOP value: "false" livenessProbe: httpGet: path: /actuator/health/livenesss port: http initialDelaySeconds: 10 periodSeconds: 5 readinessProbe: httpGet: path: /actuator/health/readiness port: http initialDelaySeconds: 10 periodSeconds: 5 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}