80 lines
2.8 KiB
YAML
80 lines
2.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "common.name" . }}
|
|
namespace: {{ .Values.global.namespace }}
|
|
labels:
|
|
{{- include "common.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "common.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
{{- with .Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "common.labels" . | nindent 8 }}
|
|
{{- with .Values.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "common.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
initContainers:
|
|
- name: retain-schemas-content-ebs-volume
|
|
image: {{ .Values.global.image.repository }}
|
|
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
|
|
command: ['sh', '-c', 'cp -r /usr/src/app/schemas/* /mnt/schemas/']
|
|
volumeMounts:
|
|
- name: bap-schemas-efs-volume
|
|
mountPath: /mnt/schemas
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: {{ .Values.global.image.repository }}
|
|
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
|
|
ports:
|
|
- name: bap-net-port
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
{{- if .Values.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: bap-network-config
|
|
mountPath: "/usr/src/app/config/default.yaml"
|
|
subPath: default.yaml
|
|
readOnly: true
|
|
# EFS volumes for L2 schemas
|
|
- name: bap-schemas-efs-volume
|
|
mountPath: /usr/src/app/schemas
|
|
# EBS volumes for logs
|
|
- name: bap-network-logs-ebs-volume
|
|
mountPath: /usr/src/app/logs
|
|
volumes:
|
|
- name: bap-network-config
|
|
configMap:
|
|
name: {{ include "common.name" . }}-config
|
|
- name: bap-schemas-efs-volume
|
|
persistentVolumeClaim:
|
|
claimName: beckn-onix-bap-efs-pvc
|
|
- name: bap-network-logs-ebs-volume
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "common.name" . }}-logs-pvc |