@@ -47,16 +47,79 @@ spec:
47
47
fieldPath : spec.nodeName
48
48
volumeMounts :
49
49
- {{ include "spring-boot.config-volume-mount" . | indent 14 | trim }}
50
- - name : execution-logs-storage
51
- mountPath : /home/cnb/executionLogs/
50
+ - name : fs-storage
51
+ mountPath : /home/cnb/files
52
+ - name : database-secret
53
+ mountPath : {{ .Values.sandbox.dbPasswordFile }}
52
54
{{- include "spring-boot.management" .Values.sandbox | nindent 10 }}
53
55
resources :
54
56
limits :
55
57
memory : 800M
56
58
requests :
57
59
memory : 600M
60
+ initContainers :
61
+ - name : git-cloner
62
+ image : alpine/git
63
+ args :
64
+ - clone
65
+ - --single-branch
66
+ - --branch
67
+ - {{ .Values.mysql.migrations.branch | default "master" }}
68
+ - --
69
+ - https://github.com/saveourtool/save-cloud.git
70
+ - /data
71
+ volumeMounts :
72
+ - mountPath : /data
73
+ name : migrations-data
74
+ - name : liquibase-runner
75
+ image : liquibase/liquibase:4.15
76
+ securityContext :
77
+ runAsUser : 1001
78
+ runAsGroup : 1001
79
+ args :
80
+ - --url=$(DB_URL)
81
+ - --changeLogFile=save-sandbox/db/db.changelog-master.xml
82
+ - --username=$(DB_USERNAME)
83
+ - --password=$(DB_PASSWORD)
84
+ - --log-level=info
85
+ - --contexts={{ .Values.profile }}
86
+ - update
87
+ resources :
88
+ requests :
89
+ memory : 100M
90
+ limits :
91
+ memory : 300M
92
+ env :
93
+ # See https://hub.docker.com/r/liquibase/liquibase, section 'Notice for MySQL Users'
94
+ - name : INSTALL_MYSQL
95
+ value : ' true'
96
+ - name : DB_URL
97
+ valueFrom :
98
+ secretKeyRef :
99
+ name : db-secrets
100
+ key : spring.datasource.url
101
+ - name : DB_USERNAME
102
+ valueFrom :
103
+ secretKeyRef :
104
+ name : db-secrets
105
+ key : spring.datasource.username
106
+ - name : DB_PASSWORD
107
+ valueFrom :
108
+ secretKeyRef :
109
+ name : db-secrets
110
+ key : spring.datasource.password
111
+ volumeMounts :
112
+ - mountPath : /liquibase/changelog
113
+ name : migrations-data
114
+ - mountPath : {{ .Values.sandbox.dbPasswordFile }}
115
+ name : database-secret
58
116
volumes :
59
117
- {{ include "spring-boot.config-volume" (dict "service" .Values.sandbox) | indent 10 | trim }}
60
- - name : execution-logs-storage
61
- # FixMe: Do we still need logs storage? All logs should be stored in Loki.
62
- emptyDir : {}
118
+ - name : fs-storage
119
+ persistentVolumeClaim :
120
+ claimName : save-fs-storage
121
+ - name : database-secret
122
+ secret :
123
+ secretName : db-secrets
124
+ - name : migrations-data
125
+ emptyDir : { }
0 commit comments