adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1939434338


##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
         {{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
         {{- end }}
     spec:
-      {{- if and .Values.persistenceConfigSecret (index 
.Values.polarisServerConfig.metaStoreManager "conf-file") }}
-      initContainers:
-        - name: init-config
-          image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl 
.Values.toolsImage.tag . }}"
-          imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
-          command: ["jar"]
-          args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", 
"persistence.xml"]
-          {{- if .Values.securityContext}}
-          securityContext:
-            {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
-          {{- end }}
-          volumeMounts:
-            - name: eclipselink-config-volume
-              mountPath: /eclipselink-config
-            - name: secret-volume
-              mountPath: /secret
-      {{- end }}
       {{- if .Values.imagePullSecrets }}
       imagePullSecrets:
       {{- range .Values.imagePullSecrets }}
         - name: {{ . | quote }}
       {{- end }}
       {{- end }}
       serviceAccountName: {{ include "polaris.serviceAccountName" . }}
-      {{- if .Values.podSecurityContext}}
+      {{- if .Values.podSecurityContext }}
       securityContext:
         {{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
       {{- end }}
-      containers:
-        - name: {{ .Chart.Name }}
-          {{- if .Values.securityContext}}
+      {{- if .Values.bootstrap.purge }}
+      initContainers:
+        - name: "polaris-purge"
+          {{- if .Values.containerSecurityContext }}
           securityContext:
-            {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+            {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
           {{- end }}
-          image: "{{ tpl .Values.image.repository . }}:{{ tpl 
.Values.image.tag . | default .Chart.Version }}"
-          imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
-          command: ["/app/bin/polaris-service"]
-          args: ["bootstrap", "/app/config/polaris-server.yml"]
-          {{- if .Values.bootstrapExtraEnv }}
+          image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl 
.Values.bootstrap.image.tag . | default .Chart.Version }}"
+          imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+          args:
+            - "purge"
+            {{- range $realm := .Values.bootstrap.realms }}
+            - --realm={{ tpl $realm $ }}
+            {{- end }}
           env:
-            {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
-          {{- end }}
+            {{- if .Values.bootstrap.extraEnv }}
+            {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+            {{- end }}
+            - name: "quarkus.log.file.enable"
+              value: "false"
           volumeMounts:
             - name: config-volume
-              mountPath: /app/config/polaris-server.yml
-              subPath: polaris-server.yml
-            {{- if and .Values.persistenceConfigSecret (index 
.Values.polarisServerConfig.metaStoreManager "conf-file") }}
-            - name: eclipselink-config-volume
-              mountPath: /eclipselink-config
+              mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+              readOnly: true
+            - name: temp-dir
+              mountPath: /tmp
+              readOnly: false
+          {{- if .Values.resources }}
+          resources:
+            {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+          {{- end }}
+      {{- end }}
+      containers:
+        - name: "polaris-bootstrap"

Review Comment:
   Okay job removed!



##########
helm/polaris/values.yaml:
##########
@@ -28,14 +28,9 @@ image:
   pullPolicy: IfNotPresent
   # -- The image tag.
   tag: "latest"
-
-toolsImage:
-  # -- The image repository to pull from (must have jar binary included).
-  repository: registry.access.redhat.com/ubi9/openjdk-21
-  # -- The image pull policy.
-  pullPolicy: IfNotPresent
-  # -- The image tag.
-  tag: "latest"
+  # -- The path to the directory where the application.properties file, and 
other configuration
+  # files, if any, should be mounted.
+  configDir: /deployments/config

Review Comment:
   Good point, done



-- 
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