Răsfoiți Sursa

diskoverdata: fix perms on elastic search (#2602)

Stavros Kois 1 an în urmă
părinte
comite
53c9c64f93

+ 1 - 1
library/ix-dev/charts/diskoverdata/Chart.yaml

@@ -3,7 +3,7 @@ description: Diskover is used to monitor size/volumes of distributed dataset.
 annotations:
   title: Diskover Data
 type: application
-version: 2.0.0
+version: 2.0.1
 apiVersion: v2
 appVersion: "2.0.1"
 kubeVersion: ">=1.16.0-0"

+ 6 - 0
library/ix-dev/charts/diskoverdata/templates/_es.tpl

@@ -50,4 +50,10 @@ workload:
                 - |
                   curl -s -H "Authorization: Basic $(base64 <<< "elastic:$ELASTIC_PASSWORD")" \
                     http://localhost:9200/_cluster/health?local=true
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" 1000
+                                                        "GID" 1000
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{- end -}}

+ 5 - 0
library/ix-dev/charts/diskoverdata/templates/_persistence.tpl

@@ -21,6 +21,11 @@ persistence:
       elasticsearch:
         elasticsearch:
           mountPath: /usr/share/elasticsearch/data
+        {{- if and (eq .Values.diskoverStorage.esdata.type "ixVolume")
+                  (not (.Values.diskoverStorage.esdata.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/esdata
+        {{- end }}
   defaultcrawler:
     enabled: true
     type: configmap