potiuk commented on a change in pull request #8265:
URL: https://github.com/apache/airflow/pull/8265#discussion_r434187900



##########
File path: scripts/ci/kubernetes/app/templates/airflow.template.yaml
##########
@@ -42,33 +42,43 @@ spec:
         name: airflow
     spec:
       initContainers:
-      - name: "init"
-        image: {{AIRFLOW_KUBERNETES_IMAGE}}
-        imagePullPolicy: IfNotPresent
-        volumeMounts:
-        - name: airflow-configmap
-          mountPath: /root/airflow/airflow.cfg
-          subPath: airflow.cfg
-        - name: {{INIT_DAGS_VOLUME_NAME}}
-          mountPath: /root/airflow/dags
-        - name: test-volume
-          mountPath: /root/test_volume
-        env:
-        - name: SQL_ALCHEMY_CONN
-          valueFrom:
-            secretKeyRef:
-              name: airflow-secrets
-              key: sql_alchemy_conn
-        command:
-          - "bash"
-        args:
-          - "-cx"
-          - "/tmp/airflow-test-env-init.sh"
+        - name: volume-permissions
+          image: busybox
+          command: ['sh', '-c', 'chmod -R og+rwX 
/home/airflow/airflow_home/dags /home/airflow/airflow_home/logs 
/home/airflow/test_volume/']
+          volumeMounts:
+            - name: {{INIT_DAGS_VOLUME_NAME}}
+              mountPath: /home/airflow/airflow_home/dags
+            - name: airflow-logs
+              mountPath: /home/airflow/airflow_home/logs
+            - name: test-volume
+              mountPath: /home/airflow/test_volume
+        - name: "init"
+          image: {{AIRFLOW_KUBERNETES_IMAGE}}
+          imagePullPolicy: IfNotPresent
+          volumeMounts:
+          - name: airflow-configmap
+            mountPath: /home/airflow/airflow_home/airflow.cfg
+            subPath: airflow.cfg
+          - name: {{INIT_DAGS_VOLUME_NAME}}
+            mountPath: /home/airflow/airflow_home/dags
+          - name: test-volume
+            mountPath: /home/airflow/test_volume
+          env:
+          - name: SQL_ALCHEMY_CONN
+            valueFrom:
+              secretKeyRef:
+                name: airflow-secrets
+                key: sql_alchemy_conn
+          command:
+            - "bash"
+          args:
+            - "-cx"
+            - "/tmp/airflow-test-env-init.sh"
 {{INIT_GIT_SYNC}}
       containers:
       - name: webserver
         image: {{AIRFLOW_KUBERNETES_IMAGE}}
-        imagePullPolicy: IfNotPresent
+        imagePullPolicy: Never

Review comment:
       We deploy the image to cluster via "kind load" 




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

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


Reply via email to