You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/10/31 04:35:13 UTC

(incubator-devlake-helm-chart) branch main updated: Add initContainer in statefulsets and values (#196)

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-helm-chart.git


The following commit(s) were added to refs/heads/main by this push:
     new c5fcec6  Add initContainer in statefulsets and values (#196)
c5fcec6 is described below

commit c5fcec611204439c6647aeacaa035a3237643ed4
Author: M****i L* <10...@users.noreply.github.com>
AuthorDate: Tue Oct 31 00:35:07 2023 -0400

    Add initContainer in statefulsets and values (#196)
    
    * 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
---
 HelmSetup.md                               | 1 +
 charts/devlake/templates/statefulsets.yaml | 4 ++++
 charts/devlake/values.yaml                 | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/HelmSetup.md b/HelmSetup.md
index 794513e..219439a 100644
--- a/HelmSetup.md
+++ b/HelmSetup.md
@@ -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                                                     | {}                       |
diff --git a/charts/devlake/templates/statefulsets.yaml b/charts/devlake/templates/statefulsets.yaml
index c022f3a..eb91c21 100644
--- a/charts/devlake/templates/statefulsets.yaml
+++ b/charts/devlake/templates/statefulsets.yaml
@@ -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 }}"
diff --git a/charts/devlake/values.yaml b/charts/devlake/values.yaml
index 4b75323..8652800 100644
--- a/charts/devlake/values.yaml
+++ b/charts/devlake/values.yaml
@@ -61,6 +61,9 @@ mysql:
     tag: 8
     pullPolicy: IfNotPresent
 
+  # init containers for mysql if have
+  initContainers: []
+  
   # resources config for mysql if have
   resources: {}