jerryshao commented on code in PR #7767:
URL: https://github.com/apache/gravitino/pull/7767#discussion_r2232387574


##########
dev/charts/gravitino/templates/deployment.yaml:
##########
@@ -46,13 +46,81 @@ spec:
           {{- toYaml . | nindent 8 }}
           {{- end }}
     spec:
-      {{- with .Values.image.pullSecrets }}
+      {{- with .Values.global.imagePullSecrets }}
       imagePullSecrets:
         {{- toYaml . | nindent 8 }}
+      {{- end }}    
+      initContainers:
+      - name: sqlfile
+        image: {{ include "gravitino.image" . }}
+        imagePullPolicy: "{{ .Values.image.pullPolicy }}"
+        command:
+        - /bin/bash
+        - -c
+        - |
+          cp -r /root/gravitino/scripts/*  /tmp/scripts/
+          /root/gravitino/bin/gravitino.sh run > /dev/null 2>&1 &
+          while ! /root/gravitino/bin/gcli.sh -s; do
+              echo "Waiting for Gravitino to be ready..."
+              sleep 2
+          done
+          VERSION=$(/root/gravitino/bin/gcli.sh -s  | grep -oP 
'[0-9]+\.[0-9]+\.[0-9]+' | head -1)
+          echo $VERSION > /tmp/scripts/version.txt
+        resources:
+          {{- toYaml .Values.initResources | nindent 10 }}
+        volumeMounts:
+          - mountPath: /tmp/scripts/
+            name: scripts-emptydir

Review Comment:
   Can you please explain the meaning of these code, how do you get the 
version? I'm confused that you need a version to get mysql script. On the 
contrary, you need to start the gravitino to get the version?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to