Skip to content

Commit

Permalink
Add initContainer in statefulsets and values (#196)
Browse files Browse the repository at this point in the history
* solution to '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied)

* templating

* templating

* data type is a list instead of a map for initContainers

* add initContainers to HelmSetup.md

* add initContainers to HelmSetup.md
  • Loading branch information
ProjectsOfMLee authored Oct 31, 2023
1 parent 9e3c7e7 commit c5fcec6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions HelmSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Some useful parameters for the chart, you could also check them in values.yaml
| mysql.image.repository | repository for mysql's image | mysql |
| mysql.image.tag | image tag for mysql's image | 8 |
| mysql.image.pullPolicy | pullPolicy for mysql's image | IfNotPresent |
| mysql.initContainers | init containers to run to complete before mysql | [] |
| mysql.extraLabels | extra labels for mysql's statefulset | {} |
| mysql.securityContext | pod security context values | {} |
| mysql.containerSecurityContext | container security context values | {} |
Expand Down
4 changes: 4 additions & 0 deletions charts/devlake/templates/statefulsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.mysql.initContainers}}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: mysql
image: "{{ .Values.mysql.image.repository }}:{{ .Values.mysql.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/devlake/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ mysql:
tag: 8
pullPolicy: IfNotPresent

# init containers for mysql if have
initContainers: []

# resources config for mysql if have
resources: {}

Expand Down

0 comments on commit c5fcec6

Please sign in to comment.