apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "nebulous-optimiser-solver.fullname" . }} labels: {{- include "nebulous-optimiser-solver.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "nebulous-optimiser-solver.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "nebulous-optimiser-solver.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "nebulous-optimiser-solver.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 resources: {{- toYaml .Values.resources | nindent 12 }} env: - name: APPLICATION_ID value: {{ .Values.application.id }} - name: ACTIVEMQ_HOST value: {{ .Values.activemq.ACTIVEMQ_HOST }} - name: ACTIVEMQ_PORT value: {{ .Values.activemq.ACTIVEMQ_PORT | quote }} - name: ACTIVEMQ_USER value: {{ .Values.activemq.ACTIVEMQ_USER }} - name: ACTIVEMQ_PASSWORD valueFrom: secretKeyRef: name: {{ .Values.activemqSecret.secretName }} key: {{ .Values.activemqSecret.secretKey }} - name: AMPL_LICENSE valueFrom: secretKeyRef: name: {{ .Values.amplLicense.secretName }} key: {{ .Values.amplLicense.secretKey }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}