File tree Expand file tree Collapse file tree 3 files changed +32
-13
lines changed
Expand file tree Collapse file tree 3 files changed +32
-13
lines changed Original file line number Diff line number Diff line change 3030 serviceAccountName : {{ include "flights.serviceAccountName" . }}
3131 securityContext :
3232 {{- toYaml .Values.podSecurityContext | nindent 8 }}
33+ {{- if or .Values.variables.configmap.DB_URL .Values.variables.secret.DB_URL }}
34+ initContainers :
35+ - name : {{ .Chart.Name }}-prisma-migrate
36+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
37+ command : ["sh", "-c", "npx prisma migrate deploy; exit 0"]
38+ {{- if .Values.variables.configmap.DB_URL }}
39+ env :
40+ - name : DATABASE_URL
41+ value : {{ required ".Values.variables.configmap.DB_URL is required" .Values.variables.configmap.DB_URL }}
42+ {{- else if .Values.variables.secret.DB_URL }}
43+ env :
44+ - name : DATABASE_URL
45+ value : {{ required ".Values.variables.configmap.DB_URL is required" .Values.variables.configmap.DB_URL }}
46+ {{- end }}
47+ {{- end }}
3348 containers :
3449 - name : {{ .Chart.Name }}
3550 securityContext :
Original file line number Diff line number Diff line change 11{{- if .Values.autoscaling.enabled }}
2- apiVersion : autoscaling/v2beta1
2+ apiVersion : autoscaling/v2
33kind : HorizontalPodAutoscaler
44metadata :
55 name : {{ include "flights.fullname" . }}
@@ -17,12 +17,16 @@ spec:
1717 - type : Resource
1818 resource :
1919 name : cpu
20- targetAverageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
20+ target :
21+ type : Utilization
22+ averageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
2123 {{- end }}
2224 {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
2325 - type : Resource
2426 resource :
2527 name : memory
26- targetAverageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
28+ target :
29+ type : Utilization
30+ averageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
2731 {{- end }}
2832{{- end }}
Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ image:
1010
1111variables :
1212 configmap :
13- BCRYPT_SALT : 10
14- COMPOSE_PROJECT_NAME : amp_${resourceId}
15- PORT : 3000
16- DB_URL : postgres://admin:admin@localhost:5432/my-db
17- DB_USER : admin
18- DB_PASSWORD : admin
19- DB_PORT : 5432
20- DB_NAME : my-db
21- JWT_SECRET_KEY : Change_ME!!!
22- JWT_EXPIRATION : 2d
13+ BCRYPT_SALT : " 10 "
14+ COMPOSE_PROJECT_NAME : " amp_${resourceId}"
15+ PORT : " 3000"
16+ DB_URL : " postgres://admin:admin@localhost:5432/my-db"
17+ DB_USER : " admin"
18+ DB_PASSWORD : " admin"
19+ DB_PORT : " 5432"
20+ DB_NAME : " my-db"
21+ JWT_SECRET_KEY : " Change_ME!!!"
22+ JWT_EXPIRATION : " 2d "
2323 secret : {}
2424
2525imagePullSecrets : []
You can’t perform that action at this time.
0 commit comments