Repository: unicef/magasin (language: python)

Issue:
Error: Unable to create magasin-dagster namespace using manual installation
Running the helm command below to create a `magasin-dagster` namespace returns error using [manual installation](https://unicef.github.io/magasin/install/manual-installation.html).

`helm install dagster magasin/dagster --namespace magasin-dagster --create-namespace`

**Error returned:**

`Error: INSTALLATION FAILED: template: dagster/templates/deployment-webserver.yaml:3:4: executing "dagster/templates/deployment-webserver.yaml" at <include "deployment-webserver" $data>: error calling include: template: dagster/templates/helpers/_deployment-webserver.tpl:36:38: executing "deployment-webserver" at <include (print $.Template.BasePath "/configmap-instance.yaml") .>: error calling include: template: dagster/templates/configmap-instance.yaml:16:12: executing "dagster/templates/configmap-instance.yaml" at <include "dagsterYaml.scheduler.daemon" .>: error calling include: template: no template "dagsterYaml.scheduler.daemon" associated with template "gotpl"`

**Additional context**:
kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.4
Uninstall chart tenant on uninstaller not working properly
```
[ i ] helm uninstall tenant --namespace magasin-tenant
Error: failed to delete release: tenant
[ ✗ ] Could not uninstall magasin/tenant in the namespace magasin-tenant
namespace "magasin" deleted
```

May be related with uninstalling operator first.


Discussion / hints:

Fix patch:
diff --git a/.gitignore b/.gitignore
index 7f1f8ba7..05210c79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,7 +68,6 @@ db.sqlite3
 db.sqlite3-journal
 
 # Flask stuff:
-instance/
 .webassets-cache
 
 # Scrapy stuff:
diff --git a/helm-scripts/local-helm-repo.sh b/helm-scripts/local-helm-repo.sh
index 57d8c2e9..9ade5803 100755
--- a/helm-scripts/local-helm-repo.sh
+++ b/helm-scripts/local-helm-repo.sh
@@ -3,19 +3,24 @@
 #
 # Script to create a helm repository in the local filesystem and serve it in localhost.
 # 
-# A help respository is just a folder that is served through HTTP that contains
-# a set of helm chart packages (tgz files will all the templates)
-# and an index.yaml file that lists som metadata of these pacakges.
+# A help repository is just a folder that is served through HTTP that contains
+# a set of helm chart packages (tgz files with all the templates)
+# and an index.yaml file that lists some metadata of these packages.
 #  
-# Launches http server in port 8000 (ie http://localhost:8000)
-# The repo is created in ../_helm-repo/
+# Launches http server by default on port 8000 (i.e., http://localhost:8000)
+# The repository is created in ../_helm-repo/ by default
 # It uses the folder ../helm/ to extract the charts
 # 
+# Options:
+#  -p <port_number >to select the port (default 8000)
+#  -n to avoid launching the http server
+#   -r <repo_dir> change where the repo is created (defaults to ../_helm_repo). 
+# 
 # This script is useful for testing the setup of not-yet-released versions of the magasin helm charts
 # 
 # /scripts/install/install-magasin.sh -u http://localhost:8000
 #
-#  References: 
+# References: 
 # * https://helm.sh/docs/helm/helm_package/  
 # * https://helm.sh/docs/helm/helm_repo/
 #
@@ -26,40 +31,79 @@
 # Get the path of the script.
 script_dir=$(dirname "$(realpath "$0")")
 
-# Path where the helm packages and index yaml will reside (../_helm-repo)
-DEFAULT_REPO_DIR=$(realpath ../)/_helm-repo
-
 # Path for the folder that holds the helm charts (../helm)
 HELM_DIR=$(realpath "../helm")
 
+# Default port for the HTTP server
+DEFAULT_PORT=8000
 
-# Actual path of the repo dir
+# Default behavior to launch the server
+LAUNCH_SERVER=true
+
+# Default port for the HTTP server
+PORT=$DEFAULT_PORT
+
+# Default repository directory
+DEFAULT_REPO_DIR=$(realpath ../)/_helm-repo
+
+# Actual path of the repository dir
 REPO_DIR=$DEFAULT_REPO_DIR
 
-LAUNCH_SERVER=true
+# Function to display script usage
+usage() {
+    echo "Usage: $1 [-n] [-p port] [-r repo_dir]"
+    echo "Options:"
+    echo "  -n: Do not launch server"
+    echo "  -p port: Specify the port number for the HTTP server (default: $DEFAULT_PORT)"
+    echo "  -r repo_dir: Specify the repository directory (default: $DEFAULT_REPO_DIR)"
+    echo "  "
+    echo "Tip: If you are running simultaneously more than one instance of this script" 
+    echo "Use -p and -r in the second instance. Otherwise it will overwrite the repo
+    echo "of the first one."
+    echo "set the -r option 
+}
 
-while getopts ":n" opt; do
+# Parse command-line options
+while getopts ":np:r:" opt; do
   case $opt in
     n)
       echo "** Do not launch server"
       LAUNCH_SERVER=false
       ;;
+    p)
+      if [[ $OPTARG =~ ^[0-9]+$ && $OPTARG -ge 1 && $OPTARG -le 65535 ]]; then
+        PORT=$OPTARG
+      else
+        echo "Error: Invalid port number. Port must be a number between 1 and 65535."
+        usage "$script_name"
+        exit 1
+      fi
+      ;;
+    r)
+      REPO_DIR=$OPTARG
+      ;;
     h)
-      usage $script_name
+      usage "$script_name"
+      exit 0
       ;;
     \?)
       echo "Invalid option: -$OPTARG"
-      echo ""
+      usage "$script_name"
+      exit 1
       ;;
     :)
       echo "Option -$OPTARG requires an argument." >&2
+      usage "$script_name"
+      exit 1
       ;;
   esac
 done
+
 echo "** Helm repository will be created in: $REPO_DIR"
 echo "** The following folder should contain the charts: $HELM_DIR"
+echo "** HTTP server will be launched on port: $PORT"
 
-# Create the local repo dir if does not exist
+# Create the local repository dir if does not exist
 if [ ! -d "$REPO_DIR" ]; then
     #mkdir -p "$REPO_DIR"
     echo "Local repository directory created: $REPO_DIR"
@@ -67,7 +111,7 @@ else
   echo "Local repository directory exits"
 fi
 
-# Check if helm dir exits
+# Check if helm dir exists
 if [ ! -d "$HELM_DIR" ]; then
   echo "ERROR: Helm directory not found: $HELM_DIR"
   exit 2
@@ -88,12 +132,12 @@ for directory in */; do
 cd -
 echo "Returned to `pwd`"
 
-echo "helm repo index "$REPO_DIR" --merge "$REPO_DIR/index.yaml" --url "http://localhost:8000""
-helm repo index "$REPO_DIR" --merge "$REPO_DIR/index.yaml" --url "http://localhost:8000"
+echo "helm repo index "$REPO_DIR" --merge "$REPO_DIR/index.yaml" --url "http://localhost:$PORT""
+helm repo index "$REPO_DIR" --merge "$REPO_DIR/index.yaml" --url "http://localhost:$PORT"
 
 if [[ "$LAUNCH_SERVER" == true ]]; then
   cd $REPO_DIR
-  echo "Starting a local helm repo in http://localhost:8000"
-  python3 -m http.server
+  echo "Starting a local helm repo in http://localhost:$PORT"
+  python3 -m http.server $PORT
   cd -
-fi
\ No newline at end of file
+fi
diff --git a/helm-scripts/update-helm-charts.sh b/helm-scripts/update-helm-charts.sh
index 1d55c126..e557fb46 100755
--- a/helm-scripts/update-helm-charts.sh
+++ b/helm-scripts/update-helm-charts.sh
@@ -55,7 +55,7 @@ helm_pull() {
 helm_pull https://dagster-io.github.io/helm \
         dagster \
         dagster \
-        1.6.0   \
+        1.6.4   \
         $temp_charts          
 
 
diff --git a/helm/dagster/Chart.lock b/helm/dagster/Chart.lock
index 857c3b20..3570cb82 100644
--- a/helm/dagster/Chart.lock
+++ b/helm/dagster/Chart.lock
@@ -1,7 +1,7 @@
 dependencies:
 - name: dagster-user-deployments
   repository: ""
-  version: 1.6.0
+  version: 1.6.4
 - name: postgresql
   repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami
   version: 8.1.0
@@ -11,5 +11,5 @@ dependencies:
 - name: redis
   repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami
   version: 12.7.4
-digest: sha256:df7d5cd8af469ddde75672a7883602daba14691689bd5d51790c25372418bcc8
-generated: "2024-01-11T21:10:08.614154149Z"
+digest: sha256:f057532e6c463008f93dd3ac0bb5426366f320354634d50e4e6ae4fa6e4d742b
+generated: "2024-02-08T22:42:27.322103144Z"
diff --git a/helm/dagster/Chart.yaml b/helm/dagster/Chart.yaml
index 0a7dee26..479f8b36 100644
--- a/helm/dagster/Chart.yaml
+++ b/helm/dagster/Chart.yaml
@@ -1,10 +1,10 @@
 apiVersion: v2
-appVersion: 1.6.0
+appVersion: 1.6.4
 dependencies:
 - condition: dagster-user-deployments.enableSubchart
   name: dagster-user-deployments
   repository: ""
-  version: 1.6.0
+  version: 1.6.4
 - condition: postgresql.enabled
   name: postgresql
   repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami
@@ -34,4 +34,4 @@ name: dagster
 sources:
 - https://github.com/dagster-io/dagster/tree/master/helm/dagster
 type: application
-version: 1.6.0
+version: 1.6.4
diff --git a/helm/dagster/charts/dagster-user-deployments/Chart.yaml b/helm/dagster/charts/dagster-user-deployments/Chart.yaml
index 55abdb81..9c4d125a 100644
--- a/helm/dagster/charts/dagster-user-deployments/Chart.yaml
+++ b/helm/dagster/charts/dagster-user-deployments/Chart.yaml
@@ -1,5 +1,5 @@
 apiVersion: v2
-appVersion: 1.6.0
+appVersion: 1.6.4
 description: A chart to deploy code servers for your Dagster deployment.
 icon: https://dagster.io/images/brand/logos/dagster-primary-mark.png
 keywords:
@@ -17,4 +17,4 @@ name: dagster-user-deployments
 sources:
 - https://github.com/dagster-io/dagster/tree/master/helm/dagster/charts/dagster-user-deployments
 type: application
-version: 1.6.0
+version: 1.6.4
diff --git a/helm/dagster/charts/dagster-user-deployments/templates/deployment-user.yaml b/helm/dagster/charts/dagster-user-deployments/templates/deployment-user.yaml
index 5c6559a4..4ce66db0 100644
--- a/helm/dagster/charts/dagster-user-deployments/templates/deployment-user.yaml
+++ b/helm/dagster/charts/dagster-user-deployments/templates/deployment-user.yaml
@@ -35,7 +35,12 @@ spec:
     spec:
       imagePullSecrets: {{ $.Values.imagePullSecrets | toYaml | nindent 8 }}
       serviceAccountName: {{ include "dagsterUserDeployments.serviceAccountName" $ }}
+      automountServiceAccountToken: true
       securityContext: {{ $deployment.podSecurityContext | toYaml | nindent 8 }}
+      {{- if $deployment.initContainers }}
+      initContainers:
+        {{- toYaml $deployment.initContainers | nindent 8 }}
+      {{- end }}
       containers:
         - name: {{ $.Chart.Name }}
           securityContext: {{ $deployment.securityContext | toYaml | nindent 12 }}
@@ -173,6 +178,9 @@ spec:
             - {{- $volumeMount | toYaml | nindent 14 }}
           {{- end }}
         {{- end }}
+        {{- if $deployment.sidecarContainers }}
+        {{- toYaml $deployment.sidecarContainers | nindent 8 }}
+        {{- end }}
       nodeSelector: {{ $deployment.nodeSelector | toYaml | nindent 8 }}
       affinity: {{ $deployment.affinity | toYaml | nindent 8 }}
       tolerations: {{- $deployment.tolerations | toYaml | nindent 8 }}
diff --git a/helm/dagster/charts/dagster-user-deployments/templates/helpers/_helpers.tpl b/helm/dagster/charts/dagster-user-deployments/templates/helpers/_helpers.tpl
index 99621f5b..8eb87a1f 100644
--- a/helm/dagster/charts/dagster-user-deployments/templates/helpers/_helpers.tpl
+++ b/helm/dagster/charts/dagster-user-deployments/templates/helpers/_helpers.tpl
@@ -135,5 +135,15 @@ DAGSTER_K8S_PIPELINE_RUN_ENV_CONFIGMAP: "{{ template "dagster.fullname" . }}-pip
     {{- if and (.env) (kindIs "slice" .env) }}
     env: {{- .env | toYaml | nindent 6 }}
     {{- end }}
+    {{- if or .sidecarContainers .initContainers }}
+    run_k8s_config:
+      pod_spec_config:
+        {{- if .sidecarContainers }}
+        containers: {{- toYaml .sidecarContainers | nindent 10 }}
+        {{- end }}
+        {{- if .initContainers }}
+        init_containers: {{- toYaml .initContainers | nindent 10 }}
+        {{- end }}
+    {{- end }}
   {{- end }}
 {{- end -}}
diff --git a/helm/dagster/charts/dagster-user-deployments/templates/role.yaml b/helm/dagster/charts/dagster-user-deployments/templates/role.yaml
index 416e2659..54bda8e9 100644
--- a/helm/dagster/charts/dagster-user-deployments/templates/role.yaml
+++ b/helm/dagster/charts/dagster-user-deployments/templates/role.yaml
@@ -8,10 +8,16 @@ metadata:
 # Allow the Dagster service account to read and write Kubernetes jobs, deployments, pods, and events.
 rules:
   - apiGroups: ["batch"]
-    resources: ["jobs", "jobs/status"]
-    verbs: ["*"]
+    resources: ["jobs"]
+    verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
+  - apiGroups: ["batch"]
+    resources: ["jobs/status"]
+    verbs: ["get", "watch", "list"]
   # The empty arg "" corresponds to the core API group
   - apiGroups: [""]
-    resources: ["pods", "pods/log", "pods/status", "events"]
-    verbs: ["*"]
-{{- end -}}
\ No newline at end of file
+    resources: ["pods", "events"]
+    verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
+  - apiGroups: [""]
+    resources: ["pods/log", "pods/status"]
+    verbs: ["get", "watch", "list"]
+{{- end -}}
diff --git a/helm/dagster/charts/dagster-user-deployments/templates/serviceaccount.yaml b/helm/dagster/charts/dagster-user-deployments/templates/serviceaccount.yaml
index 2a7b144d..98be615c 100644
--- a/helm/dagster/charts/dagster-user-deployments/templates/serviceaccount.yaml
+++ b/helm/dagster/charts/dagster-user-deployments/templates/serviceaccount.yaml
@@ -11,4 +11,5 @@ metadata:
   name: {{ include "dagsterUserDeployments.serviceAccountName" . }}
   labels: {{ include "dagster.labels" . | nindent 4 }}
   annotations: {{- .Values.serviceAccount.annotations | toYaml | nindent 4 }}
+automountServiceAccountToken: false
 {{- end }}
diff --git a/helm/dagster/charts/dagster-user-deployments/values.schema.json b/helm/dagster/charts/dagster-user-deployments/values.schema.json
index 6d2faec3..29a51058 100644
--- a/helm/dagster/charts/dagster-user-deployments/values.schema.json
+++ b/helm/dagster/charts/dagster-user-deployments/values.schema.json
@@ -198,6 +198,12 @@
             "properties": {},
             "$ref": "https://kubernetesjsonschema.dev/v1.18.0/_definitions.json#/definitions/io.k8s.api.core.v1.Volume"
         },
+        "Container": {
+            "title": "Container",
+            "type": "object",
+            "properties": {},
+            "$ref": "https://kubernetesjsonschema.dev/v1.18.0/_definitions.json#/definitions/io.k8s.api.core.v1.Container"
+        },
         "UserDeployment": {
             "title": "UserDeployment",
             "type": "object",
@@ -315,6 +321,20 @@
                 "schedulerName": {
                     "title": "Schedulername",
                     "type": "string"
+                },
+                "initContainers": {
+                    "title": "Initcontainers",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/Container"
+                    }
+                },
+                "sidecarContainers": {
+                    "title": "Sidecarcontainers",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/Container"
+                    }
                 }
             },
             "required": [
diff --git a/helm/dagster/charts/dagster-user-deployments/values.yaml b/helm/dagster/charts/dagster-user-deployments/values.yaml
index c95c2c5c..32ad2553 100644
--- a/helm/dagster/charts/dagster-user-deployments/values.yaml
+++ b/helm/dagster/charts/dagster-user-deployments/values.yaml
@@ -105,6 +105,22 @@ deployments:
     #   - name: secret
     envSecrets: []
 
+    # Init containers to run before the main container. See:
+    # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+    initContainers: []
+
+    # Additional containers (i.e. sidecars) to run alongside the main container. See:
+    # https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
+    #
+    # Example:
+    #
+    # sidecarContainers:
+    #   - name: my-sidecar
+    #     image: ...
+    #     volumeMounts: []
+    #     env: []
+    sidecarContainers: []
+
     annotations: {}
     nodeSelector: {}
     affinity: {}
diff --git a/helm/dagster/templates/deployment-celery-queues.yaml b/helm/dagster/templates/deployment-celery-queues.yaml
index 7b426df0..bbd8f164 100644
--- a/helm/dagster/templates/deployment-celery-queues.yaml
+++ b/helm/dagster/templates/deployment-celery-queues.yaml
@@ -36,6 +36,7 @@ spec:
         {{- toYaml . | nindent 8 }}
     {{- end }}
       serviceAccountName: {{ include "dagster.serviceAccountName" $ }}
+      automountServiceAccountToken: true
       securityContext:
         {{- toYaml $celeryK8sRunLauncherConfig.podSecurityContext | nindent 8 }}
       initContainers:
@@ -147,4 +148,4 @@ spec:
     {{- end }}
 ---
 {{ end }}
-{{ end }}
\ No newline at end of file
+{{ end }}
diff --git a/helm/dagster/templates/deployment-daemon.yaml b/helm/dagster/templates/deployment-daemon.yaml
index 0936dcea..b28149be 100644
--- a/helm/dagster/templates/deployment-daemon.yaml
+++ b/helm/dagster/templates/deployment-daemon.yaml
@@ -45,6 +45,7 @@ spec:
       imagePullSecrets:
         {{- toYaml $.Values.imagePullSecrets | nindent 8 }}
       serviceAccountName: {{ include "dagster.serviceAccountName" $ }}
+      automountServiceAccountToken: true
       securityContext:
         {{- toYaml .Values.dagsterDaemon.podSecurityContext | nindent 8 }}
       initContainers:
@@ -54,6 +55,8 @@ spec:
           command: ['sh', '-c', {{ include "dagster.postgresql.pgisready" . | squote }}]
           securityContext:
             {{- toYaml .Values.dagsterDaemon.securityContext | nindent 12 }}
+          resources:
+            {{- toYaml .Values.dagsterDaemon.initContainerResources | nindent 12 }}
         {{- if (and $userDeployments.enabled $userDeployments.enableSubchart) }}
         {{- range $deployment := $userDeployments.deployments }}
         - name: "init-user-deployment-{{- $deployment.name -}}"
@@ -61,6 +64,10 @@ spec:
           command: ['sh', '-c', "until nslookup {{ $deployment.name -}}; do echo waiting for user service; sleep 2; done"]
           securityContext:
             {{- toYaml $.Values.dagsterDaemon.securityContext | nindent 12 }}
+          {{- if $.Values.dagsterDaemon.initContainerResources }}
+          resources:
+            {{- toYaml $.Values.dagsterDaemon.initContainerResources | nindent 12 }}
+          {{- end }}
         {{- end }}
         {{- end }}
       containers:
diff --git a/helm/dagster/templates/deployment-flower.yaml b/helm/dagster/templates/deployment-flower.yaml
index 7f2009f9..18dd7b3d 100644
--- a/helm/dagster/templates/deployment-flower.yaml
+++ b/helm/dagster/templates/deployment-flower.yaml
@@ -32,6 +32,7 @@ spec:
       {{- toYaml . | nindent 8 }}
       {{- end }}
       serviceAccountName: {{ include "dagster.serviceAccountName" . }}
+      automountServiceAccountToken: true
       securityContext:
       {{- toYaml .Values.flower.podSecurityContext | nindent 8 }}
       initContainers:
@@ -85,4 +86,4 @@ spec:
       {{- if .Values.flower.schedulerName }}
       schedulerName: {{ .Values.flower.schedulerName }}
       {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/helm/dagster/templates/helpers/_deployment-webserver.tpl b/helm/dagster/templates/helpers/_deployment-webserver.tpl
index fd25b7ba..2c5f6494 100644
--- a/helm/dagster/templates/helpers/_deployment-webserver.tpl
+++ b/helm/dagster/templates/helpers/_deployment-webserver.tpl
@@ -43,6 +43,7 @@ spec:
         {{- toYaml . | nindent 8 }}
     {{- end }}
       serviceAccountName: {{ include "dagster.serviceAccountName" . }}
+      automountServiceAccountToken: true
       securityContext:
         {{- toYaml $_.Values.dagsterWebserver.podSecurityContext | nindent 8 }}
       initContainers:
@@ -52,6 +53,10 @@ spec:
           command: ['sh', '-c', {{ include "dagster.postgresql.pgisready" . | squote }}]
           securityContext:
             {{- toYaml $_.Values.dagsterWebserver.securityContext | nindent 12 }}
+          {{- if $_.Values.dagsterWebserver.initContainerResources }}
+          resources:
+            {{- toYaml $_.Values.dagsterWebserver.initContainerResources | nindent 12 }}
+          {{- end }}
         {{- if (and $userDeployments.enabled $userDeployments.enableSubchart) }}
         {{- range $deployment := $userDeployments.deployments }}
         - name: "init-user-deployment-{{- $deployment.name -}}"
@@ -59,6 +64,10 @@ spec:
           command: ['sh', '-c', "until nslookup {{ $deployment.name -}}; do echo waiting for user service; sleep 2; done"]
           securityContext:
             {{- toYaml $_.Values.dagsterWebserver.securityContext | nindent 12 }}
+          {{- if $_.Values.dagsterWebserver.initContainerResources }}
+          resources:
+            {{- toYaml $_.Values.dagsterWebserver.initContainerResources | nindent 12 }}
+          {{- end }}
         {{- end }}
         {{- end }}
       containers:
diff --git a/helm/dagster/templates/helpers/instance/_compute-log-manager.tpl b/helm/dagster/templates/helpers/instance/_compute-log-manager.tpl
new file mode 100644
index 00000000..0e3f6bff
--- /dev/null
+++ b/helm/dagster/templates/helpers/instance/_compute-log-manager.tpl
@@ -0,0 +1,126 @@
+{{- define "stringSource" }}
+{{- $tp := typeOf . }}
+
+{{- if eq $tp "map[string]interface {}" }}
+  {{- . | toYaml | nindent 4 }}
+{{- else if eq $tp "string" }}
+  {{- . | quote }}
+{{- end }}
+{{- end }}
+
+{{- define "dagsterYaml.computeLogManager.noop" }}
+module: dagster.core.storage.noop_compute_log_manager
+class: NoOpComputeLogManager
+{{- end }}
+
+{{- define "dagsterYaml.computeLogManager.azure" }}
+{{- $azureBlobComputeLogManagerConfig := .Values.computeLogManager.config.azureBlobComputeLogManager }}
+module: dagster_azure.blob.compute_log_manager
+class: AzureBlobComputeLogManager
+config:
+  storage_account: {{ include "stringSource" $azureBlobComputeLogManagerConfig.storageAccount }}
+  container: {{ include "stringSource" $azureBlobComputeLogManagerConfig.container }}
+  secret_key: {{ include "stringSource" $azureBlobComputeLogManagerConfig.secretKey }}
+
+  {{- if $azureBlobComputeLogManagerConfig.localDir }}
+  local_dir: {{ include "stringSource" $azureBlobComputeLogManagerConfig.localDir }}
+  {{- end }}
+
+  {{- if $azureBlobComputeLogManagerConfig.prefix }}
+  prefix: {{ include "stringSource" $azureBlobComputeLogManagerConfig.prefix }}
+  {{- end }}
+
+  {{- if $azureBlobComputeLogManagerConfig.uploadInterval }}
+  upload_interval: {{ $azureBlobComputeLogManagerConfig.uploadInterval }}
+  {{- end }}
+
+  {{- if $azureBlobComputeLogManagerConfig.defaultAzureCredential }}
+  default_azure_credential: {{ $azureBlobComputeLogManagerConfig.defaultAzureCredential | toYaml | nindent 4 }}
+  {{- end }}
+{{- end }}
+
+{{- define "dagsterYaml.computeLogManager.gcs" }}
+{{- $gcsComputeLogManagerConfig := .Values.computeLogManager.config.gcsComputeLogManager }}
+module: dagster_gcp.gcs.compute_log_manager
+class: GCSComputeLogManager
+config:
+  bucket: {{ include "stringSource" $gcsComputeLogManagerConfig.bucket }}
+
+  {{- if $gcsComputeLogManagerConfig.localDir }}
+  local_dir: {{ include "stringSource" $gcsComputeLogManagerConfig.localDir }}
+  {{- end }}
+
+  {{- if $gcsComputeLogManagerConfig.prefix }}
+  prefix: {{ include "stringSource" $gcsComputeLogManagerConfig.prefix }}
+  {{- end }}
+
+  {{- if $gcsComputeLogManagerConfig.jsonCredentialsEnvvar }}
+  json_credentials_envvar: {{ include "stringSource" $gcsComputeLogManagerConfig.jsonCredentialsEnvvar }}
+  {{- end }}
+
+  {{- if $gcsComputeLogManagerConfig.uploadInterval }}
+  upload_interval: {{ $gcsComputeLogManagerConfig.uploadInterval }}
+  {{- end }}
+
+  {{- if $gcsComputeLogManagerConfig.showUrlOnly }}
+  show_url_only: {{ $gcsComputeLogManagerConfig.showUrlOnly }}
+  {{- end }}
+
+{{- end }}
+
+{{- define "dagsterYaml.computeLogManager.s3" }}
+{{- $s3ComputeLogManagerConfig := .Values.computeLogManager.config.s3ComputeLogManager }}
+module: dagster_aws.s3.compute_log_manager
+class: S3ComputeLogManager
+config:
+  bucket: {{ include "stringSource" $s3ComputeLogManagerConfig.bucket }}
+
+  {{- if $s3ComputeLogManagerConfig.localDir }}
+  local_dir: {{ include "stringSource" $s3ComputeLogManagerConfig.localDir }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.prefix }}
+  prefix: {{ include "stringSource" $s3ComputeLogManagerConfig.prefix }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.useSsl }}
+  use_ssl: {{ $s3ComputeLogManagerConfig.useSsl }}
+  {{- end }}
+
+  verify: {{ ne $s3ComputeLogManagerConfig.verify false }}
+
+  {{- if $s3ComputeLogManagerConfig.verifyCertPath }}
+  verify_cert_path: {{ include "stringSource" $s3ComputeLogManagerConfig.verifyCertPath }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.endpointUrl }}
+  endpoint_url: {{ include "stringSource" $s3ComputeLogManagerConfig.endpointUrl }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.skipEmptyFiles }}
+  skip_empty_files: {{ $s3ComputeLogManagerConfig.skipEmptyFiles }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.uploadInterval }}
+  upload_interval: {{ $s3ComputeLogManagerConfig.uploadInterval }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.uploadExtraArgs }}
+  upload_extra_args: {{ $s3ComputeLogManagerConfig.uploadExtraArgs | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.showUrlOnly }}
+  show_url_only: {{ $s3ComputeLogManagerConfig.showUrlOnly }}
+  {{- end }}
+
+  {{- if $s3ComputeLogManagerConfig.region }}
+  region: {{ $s3ComputeLogManagerConfig.region }}
+  {{- end }}
+{{- end }}
+
+{{- define "dagsterYaml.computeLogManager.custom" }}
+{{- $customComputeLogManagerConfig := .Values.computeLogManager.config.customComputeLogManager }}
+module: {{ $customComputeLogManagerConfig.module | quote }}
+class: {{ $customComputeLogManagerConfig.class | quote }}
+config: {{ $customComputeLogManagerConfig.config | toYaml | nindent 2 }}
+{{- end }}
diff --git a/helm/dagster/templates/helpers/instance/_postgresql.tpl b/helm/dagster/templates/helpers/instance/_postgresql.tpl
new file mode 100644
index 00000000..c72c505e
--- /dev/null
+++ b/helm/dagster/templates/helpers/instance/_postgresql.tpl
@@ -0,0 +1,13 @@
+{{- define "dagsterYaml.postgresql.config" }}
+postgres_db:
+  username: {{ .Values.postgresql.postgresqlUsername }}
+  password:
+    env: DAGSTER_PG_PASSWORD
+  hostname: {{ include "dagster.postgresql.host" . }}
+  db_name: {{ .Values.postgresql.postgresqlDatabase	}}
+  port: {{ .Values.postgresql.service.port }}
+  params: {{- .Values.postgresql.postgresqlParams | toYaml | nindent 4 }}
+  {{- if .Values.postgresql.postgresqlScheme }}
+  scheme: {{ .Values.postgresql.postgresqlScheme }}
+  {{- end }}
+{{- end }}
diff --git a/helm/dagster/templates/helpers/instance/_run-coordinator.tpl b/helm/dagster/templates/helpers/instance/_run-coordinator.tpl
new file mode 100644
index 00000000..a4304bfa
--- /dev/null
+++ b/helm/dagster/templates/helpers/instance/_run-coordinator.tpl
@@ -0,0 +1,34 @@
+{{- define "dagsterYaml.runCoordinator.queued" }}
+{{- $queuedRunCoordinatorConfig := .Values.dagsterDaemon.runCoordinator.config.queuedRunCoordinator }}
+module: dagster.core.run_coordinator
+class: QueuedRunCoordinator
+{{- if not (empty (compact (values $queuedRunCoordinatorConfig))) }}
+config:
+  {{/* Workaround to prevent 0 from being interpreted as falsey: https://github.com/helm/helm/issues/3164#issuecomment-709537506 */}}
+  max_concurrent_runs: {{ if (kindIs "invalid" $queuedRunCoordinatorConfig.maxConcurrentRuns) }}-1{{ else }}{{ $queuedRunCoordinatorConfig.maxConcurrentRuns }}
+  {{- end }}
+
+  {{- if $queuedRunCoordinatorConfig.tagConcurrencyLimits }}
+  tag_concurrency_limits: {{ $queuedRunCoordinatorConfig.tagConcurrencyLimits | toYaml | nindent 2 }}
+  {{- end }}
+
+  {{- if $queuedRunCoordinatorConfig.dequeueIntervalSeconds }}
+  dequeue_interval_seconds: {{ $queuedRunCoordinatorConfig.dequeueIntervalSeconds }}
+  {{- end }}
+
+  {{- if $queuedRunCoordinatorConfig.dequeueUseThreads }}
+  dequeue_use_threads: {{ $queuedRunCoordinatorConfig.dequeueUseThreads }}
+  {{- end }}
+
+  {{- if $queuedRunCoordinatorConfig.dequeueNumWorkers }}
+  dequeue_num_workers: {{ $queuedRunCoordinatorConfig.dequeueNumWorkers }}
+  {{- end }}
+{{- end }}
+{{- end }}
+
+{{- define "dagsterYaml.runCoordinator.custom" }}
+{{- $customRunCoordinatorConfig := .Values.dagsterDaemon.runCoordinator.config.customRunCoordinator }}
+module: {{ $customRunCoordinatorConfig.module | quote }}
+class: {{ $customRunCoordinatorConfig.class | quote }}
+config: {{ $customRunCoordinatorConfig.config | toYaml | nindent 2 }}
+{{- end }}
diff --git a/helm/dagster/templates/helpers/instance/_run-launcher.tpl b/helm/dagster/templates/helpers/instance/_run-launcher.tpl
new file mode 100644
index 00000000..7e85a1ab
--- /dev/null
+++ b/helm/dagster/templates/helpers/instance/_run-launcher.tpl
@@ -0,0 +1,161 @@
+{{- define "dagsterYaml.runLauncher.celery" }}
+{{- $celeryK8sRunLauncherConfig := .Values.runLauncher.config.celeryK8sRunLauncher }}
+module: dagster_celery_k8s
+class: CeleryK8sRunLauncher
+config:
+  dagster_home: {{ .Values.global.dagsterHome | quote }}
+  instance_config_map: "{{ template "dagster.fullname" .}}-instance"
+  postgres_password_secret: {{ include "dagster.postgresql.secretName" . | quote }}
+  job_namespace: {{ $celeryK8sRunLauncherConfig.jobNamespace | default .Release.Namespace }}
+  broker:
+    env: DAGSTER_CELERY_BROKER_URL
+  backend:
+    env: DAGSTER_CELERY_BACKEND_URL
+  {{- if $celeryK8sRunLauncherConfig.configSource }}
+  config_source: {{- $celeryK8sRunLauncherConfig.configSource | toYaml | nindent 4 }}
+  {{- end }}
+  env_config_maps:
+    - env: DAGSTER_K8S_PIPELINE_RUN_ENV_CONFIGMAP
+    {{- range $envConfigMap := $celeryK8sRunLauncherConfig.envConfigMaps }}
+    {{- if hasKey $envConfigMap "name" }}
+    - {{ $envConfigMap.name }}
+    {{- end }}
+    {{- end }}
+  {{- if or $celeryK8sRunLauncherConfig.envSecrets .Values.global.celeryConfigSecretName }}
+  env_secrets:
+    {{- range $envSecret := $celeryK8sRunLauncherConfig.envSecrets }}
+    {{- if hasKey $envSecret "name" }}
+    - {{ $envSecret.name }}
+    {{- end }}
+    {{- end }}
+    - {{ .Values.global.celeryConfigSecretName }}
+  {{- end }}
+  {{- if $celeryK8sRunLauncherConfig.volumeMounts }}
+  volume_mounts: {{- $celeryK8sRunLauncherConfig.volumeMounts | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $celeryK8sRunLauncherConfig.volumes }}
+  volumes: {{- $celeryK8sRunLauncherConfig.volumes | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $celeryK8sRunLauncherConfig.labels }}
+  labels: {{- $celeryK8sRunLauncherConfig.labels | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if .Values.imagePullSecrets }}
+  image_pull_secrets: {{- .Values.imagePullSecrets | toYaml | nindent 4 }}
+  {{- end }}
+
+  service_account_name: {{ include "dagster.serviceAccountName" . }}
+
+  {{- if $celeryK8sRunLauncherConfig.imagePullPolicy }}
+  image_pull_policy: {{ $celeryK8sRunLauncherConfig.imagePullPolicy }}
+  {{- end }}
+
+  {{- if $celeryK8sRunLauncherConfig.failPodOnRunFailure }}
+  fail_pod_on_run_failure: true
+  {{- end }}
+
+{{- end }}
+
+{{- define "dagsterYaml.runLauncher.k8s" }}
+{{- $k8sRunLauncherConfig := .Values.runLauncher.config.k8sRunLauncher }}
+module: dagster_k8s
+class: K8sRunLauncher
+config:
+  load_incluster_config: {{ $k8sRunLauncherConfig.loadInclusterConfig }}
+
+  {{- if $k8sRunLauncherConfig.kubeconfigFile }}
+  kubeconfig_file: {{ $k8sRunLauncherConfig.kubeconfigFile }}
+  {{- end }}
+  job_namespace: {{ $k8sRunLauncherConfig.jobNamespace | default .Release.Namespace }}
+  image_pull_policy: {{ $k8sRunLauncherConfig.imagePullPolicy }}
+
+  {{- if .Values.imagePullSecrets }}
+  image_pull_secrets: {{- .Values.imagePullSecrets | toYaml | nindent 4 }}
+  {{- end }}
+  service_account_name: {{ include "dagster.serviceAccountName" . }}
+
+  {{- if (hasKey $k8sRunLauncherConfig "image") }}
+  job_image: {{ include "dagster.externalImage.name" (list $ $k8sRunLauncherConfig.image) | quote }}
+  {{- end }}
+  dagster_home: {{ .Values.global.dagsterHome | quote }}
+  instance_config_map: "{{ template "dagster.fullname" .}}-instance"
+  postgres_password_secret: {{ include "dagster.postgresql.secretName" . | quote }}
+  {{- if $k8sRunLauncherConfig.envConfigMaps }}
+  env_config_maps:
+    {{- range $envConfigMap := $k8sRunLauncherConfig.envConfigMaps }}
+    {{- if hasKey $envConfigMap "name" }}
+    - {{ $envConfigMap.name }}
+    {{- end }}
+    {{- end }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.envSecrets }}
+  env_secrets:
+    {{- range $envSecret := $k8sRunLauncherConfig.envSecrets }}
+    {{- if hasKey $envSecret "name" }}
+    - {{ $envSecret.name }}
+    {{- end }}
+    {{- end }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.envVars }}
+  env_vars: {{- $k8sRunLauncherConfig.envVars | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.volumeMounts }}
+  volume_mounts: {{- $k8sRunLauncherConfig.volumeMounts | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.volumes }}
+  volumes: {{- $k8sRunLauncherConfig.volumes | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.labels }}
+  labels: {{- $k8sRunLauncherConfig.labels | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.resources }}
+  resources: {{- $k8sRunLauncherConfig.resources | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.failPodOnRunFailure }}
+  fail_pod_on_run_failure: true
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.schedulerName }}
+  scheduler_name: {{ $k8sRunLauncherConfig.schedulerName | quote }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.securityContext }}
+  security_context: {{- $k8sRunLauncherConfig.securityContext | toYaml | nindent 4 }}
+  {{- end }}
+
+  {{- if $k8sRunLauncherConfig.runK8sConfig }}
+  run_k8s_config:
+    {{- if $k8sRunLauncherConfig.runK8sConfig.containerConfig }}
+    container_config: {{- $k8sRunLauncherConfig.runK8sConfig.containerConfig | toYaml | nindent 6 }}
+    {{- end }}
+    {{- if $k8sRunLauncherConfig.runK8sConfig.podSpecConfig }}
+    pod_spec_config: {{- $k8sRunLauncherConfig.runK8sConfig.podSpecConfig | toYaml | nindent 6 }}
+    {{- end }}
+    {{- if $k8sRunLauncherConfig.runK8sConfig.podTemplateSpecMetadata }}
+    pod_template_spec_metadata: {{- $k8sRunLauncherConfig.runK8sConfig.podTemplateSpecMetadata | toYaml | nindent 6 }}
+    {{- end }}
+    {{- if $k8sRunLauncherConfig.runK8sConfig.jobSpecConfig }}
+    job_spec_config: {{- $k8sRunLauncherConfig.runK8sConfig.jobSpecConfig | toYaml | nindent 6 }}
+    {{- end }}
+    {{- if $k8sRunLauncherConfig.runK8sConfig.jobMetadata }}
+    job_metadata: {{- $k8sRunLauncherConfig.runK8sConfig.jobMetadata | toYaml | nindent 6 }}
+    {{- end }}
+  {{- end }}
+
+{{- end }}
+
+{{- define "dagsterYaml.runLauncher.custom" }}
+{{- $customRunLauncherConfig := .Values.runLauncher.config.customRunLauncher }}
+module: {{ $customRunLauncherConfig.module | quote }}
+class: {{ $customRunLauncherConfig.class | quote }}
+config: {{ $customRunLauncherConfig.config | toYaml | nindent 2 }}
+{{- end }}
diff --git a/helm/dagster/templates/helpers/instance/_scheduler.tpl b/helm/dagster/templates/helpers/instance/_scheduler.tpl
new file mode 100644
index 00000000..62e4c276
--- /dev/null
+++ b/helm/dagster/templates/helpers/instance/_scheduler.tpl
@@ -0,0 +1,21 @@
+{{- define "dagsterYaml.scheduler.daemon" }}
+{{- $daemonSchedulerConfig := .Values.scheduler.config.daemonScheduler }}
+module: dagster.core.scheduler
+class: DagsterDaemonScheduler
+{{- if not (empty (compact (values $daemonSchedulerConfig))) }}
+config:
+  {{- if $daemonSchedulerConfig.maxCatchupRuns }}
+  max_catchup_runs: {{ $daemonSchedulerConfig.maxCatchupRuns }}
+  {{- end }}
+  {{- if $daemonSchedulerConfig.maxTickRetries }}
+  max_tick_retries: {{ $daemonSchedulerConfig.maxTickRetries }}
+  {{- end }}
+{{- end }}
+{{- end }}
+
+{{- define "dagsterYaml.scheduler.custom" }}
+{{- $customSchedulerConfig := .Values.scheduler.config.customScheduler }}
+module: {{ $customSchedulerConfig.module | quote }}
+class: {{ $customSchedulerConfig.class | quote }}
+config: {{ $customSchedulerConfig.config | toYaml | nindent 2 }}
+{{- end }}
\ No newline at end of file
diff --git a/helm/dagster/templates/job-instance-migrate.yaml b/helm/dagster/templates/job-instance-migrate.yaml
index 6c8acb44..f8a61789 100644
--- a/helm/dagster/templates/job-instance-migrate.yaml
+++ b/helm/dagster/templates/job-instance-migrate.yaml
@@ -19,6 +19,7 @@ spec:
     spec:
       imagePullSecrets: {{ .Values.imagePullSecrets | toYaml | nindent 8 }}
       serviceAccountName: {{ include "dagster.serviceAccountName" . }}
+      automountServiceAccountToken: true
       securityContext: {{ $_.Values.dagsterWebserver.podSecurityContext | toYaml | nindent 8 }}
       restartPolicy: Never
       containers:
@@ -51,11 +52,21 @@ spec:
             - name: dagster-instance
               mountPath: "{{ .Values.global.dagsterHome }}/dagster.yaml"
               subPath: dagster.yaml
+            {{- if .Values.dagsterWebserver.volumeMounts }}
+            {{- range $volumeMount := .Values.dagsterWebserver.volumeMounts }}
+            - {{- $volumeMount | toYaml | nindent 14 }}
+            {{- end }}
+            {{- end }}
           resources: {{ $_.Values.dagsterWebserver.resources | toYaml | nindent 12 }}
       volumes:
         - name: dagster-instance
           configMap:
             name: {{ template "dagster.fullname" . }}-instance
+        {{- if .Values.dagsterWebserver.volumes }}
+        {{- range $volume := .Values.dagsterWebserver.volumes }}
+        - {{- $volume | toYaml | nindent 10 }}
+        {{- end }}
+        {{- end }}
       nodeSelector: {{ $_.Values.dagsterWebserver.nodeSelector | toYaml | nindent 8 }}
       affinity: {{ $_.Values.dagsterWebserver.affinity | toYaml | nindent 8 }}
       tolerations: {{ $_.Values.dagsterWebserver.tolerations | toYaml | nindent 8 }}
diff --git a/helm/dagster/templates/role.yaml b/helm/dagster/templates/role.yaml
index 7e02bd22..bba8f1a4 100644
--- a/helm/dagster/templates/role.yaml
+++ b/helm/dagster/templates/role.yaml
@@ -12,10 +12,16 @@ metadata:
 # Allow the Dagster service account to read and write Kubernetes jobs, deployments, pods, and events.
 rules:
   - apiGroups: ["batch"]
-    resources: ["jobs", "jobs/status"]
-    verbs: ["*"]
+    resources: ["jobs"]
+    verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
+  - apiGroups: ["batch"]
+    resources: ["jobs/status"]
+    verbs: ["get", "watch", "list"]
   # The empty arg "" corresponds to the core API group
   - apiGroups: [""]
-    resources: ["pods", "pods/log", "pods/status", "events"]
-    verbs: ["*"]
-{{- end -}}
\ No newline at end of file
+    resources: ["pods", "events"]
+    verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
+  - apiGroups: [""]
+    resources: ["pods/log", "pods/status"]
+    verbs: ["get", "watch", "list"]
+{{- end -}}
diff --git a/helm/dagster/templates/serviceaccount.yaml b/helm/dagster/templates/serviceaccount.yaml
index 588449d5..3b1e054f 100644
--- a/helm/dagster/templates/serviceaccount.yaml
+++ b/helm/dagster/templates/serviceaccount.yaml
@@ -5,4 +5,5 @@ metadata:
   name: {{ include "dagster.serviceAccountName" . }}
   labels: {{ include "dagster.labels" . | nindent 4 }}
   annotations: {{- .Values.serviceAccount.annotations | toYaml | nindent 4 }}
+automountServiceAccountToken: false
 {{- end -}}
diff --git a/helm/dagster/values.schema.json b/helm/dagster/values.schema.json
index 29d8afa0..fed5bb84 100644
--- a/helm/dagster/values.schema.json
+++ b/helm/dagster/values.schema.json
@@ -516,6 +516,17 @@
                             "type": "null"
                         }
                     ]
+                },
+                "initContainerResources": {
+                    "title": "Resources",
+                    "anyOf": [
+                        {
+                            "$ref": "#/definitions/Resources"
+                        },
+                        {
+                            "type": "null"
+                        }
+                    ]
                 }
             },
             "required": [
@@ -568,6 +579,12 @@
             "properties": {},
             "$ref": "https://kubernetesjsonschema.dev/v1.18.0/_definitions.json#/definitions/io.k8s.api.core.v1.Probe"
         },
+        "Container": {
+            "title": "Container",
+            "type": "object",
+            "properties": {},
+            "$ref": "https://kubernetesjsonschema.dev/v1.18.0/_definitions.json#/definitions/io.k8s.api.core.v1.Container"
+        },
         "UserDeployment": {
             "title": "UserDeployment",
             "type": "object",
@@ -685,6 +702,20 @@
                 "schedulerName": {
                     "title": "Schedulername",
                     "type": "string"
+                },
+                "initContainers": {
+                    "title": "Initcontainers",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/Container"
+                    }
+                },
+                "sidecarContainers": {
+                    "title": "Sidecarcontainers",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/Container"
+                    }
                 }
             },
             "required": [
@@ -2871,6 +2902,17 @@
                             "type": "null"
                         }
                     ]
+                },
+                "initContainerResources": {
+                    "title": "Resources",
+                    "anyOf": [
+                        {
+                            "$ref": "#/definitions/Resources"
+                        },
+                        {
+                            "type": "null"
+                        }
+                    ]
                 }
             },
             "required": [
diff --git a/helm/dagster/values.yaml b/helm/dagster/values.yaml
index 0294910a..df8afd2b 100644
--- a/helm/dagster/values.yaml
+++ b/helm/dagster/values.yaml
@@ -163,6 +163,8 @@ dagsterWebserver:
   securityContext: {}
   resources: {}
 
+  # Configure initContainer resources separately from main container
+  initContainerResources: {}
   # Override the default K8s scheduler
   # schedulerName: ~
 
@@ -380,6 +382,22 @@ dagster-user-deployments:
       #     subPath: test_file.yaml
       volumeMounts: []
 
+      # Init containers to run before the main container. See:
+      # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+      initContainers: []
+
+      # Additional containers (i.e. sidecars) to run alongside the main container. See:
+      # https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
+      #
+      # Example:
+      #
+      # sidecarContainers:
+      #   - name: my-sidecar
+      #     image: ...
+      #     volumeMounts: []
+      #     env: []
+      sidecarContainers: []
+
       annotations: {}
       nodeSelector: {}
       affinity: {}
@@ -1199,6 +1217,8 @@ dagsterDaemon:
   securityContext: {}
   resources: {}
 
+  # Configure initContainer resources separately from main container
+  initContainerResources: {}
   # Override the default K8s scheduler
   # schedulerName: ~
 
diff --git a/installer/install-magasin.sh b/installer/install-magasin.sh
index 349660a1..097f7d48 100755
--- a/installer/install-magasin.sh
+++ b/installer/install-magasin.sh
@@ -628,10 +628,9 @@ function install_chart {
 
 } 
 
-
+install_chart dagster
 install_chart drill
 install_chart daskhub
-install_chart dagster
 install_chart superset
 install_chart operator
 install_chart tenant
diff --git a/installer/uninstall-magasin.sh b/installer/uninstall-magasin.sh
index 1bcf8719..6f94c270 100755
--- a/installer/uninstall-magasin.sh
+++ b/installer/uninstall-magasin.sh
@@ -241,8 +241,9 @@ uninstall_chart drill
 uninstall_chart daskhub
 uninstall_chart superset
 uninstall_chart dagster
-uninstall_chart operator
 uninstall_chart tenant
+uninstall_chart operator
+
 
 # Remove the magasin realm namespace.
 namespace=$REALM_ARG


Test patch:
diff --git a/.github/workflows/install-tests.yml b/.github/workflows/install-tests.yml
index 54a797fa..3c3629ae 100644
--- a/.github/workflows/install-tests.yml
+++ b/.github/workflows/install-tests.yml
@@ -18,29 +18,50 @@ jobs:
     steps:
       - name: Check out repository
         uses: actions/checkout@v4
-    
-       # Tests if the script checks ok
+
+      # Tests if the install script checks ok
       - name: Test install-magasin.sh -c (dependencies installed)
         run: |
           cd installer
           ./install-magasin.sh -c
-
+          cd ..
+      
+      # This action also installs helm
+      - name: Start a local k8s cluster
+        uses: jupyterhub/action-k3s-helm@v3
+        with:
+          k3s-channel: latest
+          metrics-enabled: false
+          traefik-enabled: false
+          docker-enabled: false
+      
+      # Run local Helm repo with the branch helm charts
+      - name: Run local repo 
+        run: |
+          pwd
+          cd helm-scripts
+          ./local-helm-repo.sh &
+          # Give some time to create the .tgz files
+          sleep 10
+          cd ..
+    
       - name: Remove kubectl and helm
         run: |
           whereis kubectl
           whereis helm
           dpkg -s kubectl
           sudo apt-get remove -y kubectl
-          sudo rm /usr/local/bin/helm
-      
+          sudo rm /usr/local/bin/helm    
+
       # Tests if the script checks ok
-      - name: Test install-magasin.sh -c (dependencies missing)
+      - name: Test install-magasin.sh -c (check with dependencies missing)
         run: |
           cd installer
           ./install-magasin.sh -c
+          cd ..
 
       # Tests if the script installs pedendencies ok
-      - name: Test install-magasin.sh -i (dependencies missing)
+      - name: Test install-magasin.sh -i (install with dependencies missing)
         run: |
           cd installer
           ./install-magasin.sh -i -y
@@ -48,19 +69,6 @@ jobs:
           # Double test dependencies were installed
           helm version
           kubectl 
-
-      
-      # This action also installs helm
-      - name: Start a local k8s cluster
-        uses: jupyterhub/action-k3s-helm@v3
-        with:
-          k3s-channel: latest
-          metrics-enabled: false
-          traefik-enabled: false
-          docker-enabled: false
-
-      #- name: Create k8s Kind Cluster
-      #  uses: helm/kind-action@v1.5.0
         
       - name: Verify function of k8s, kubectl, and helm
         run: |
@@ -76,17 +84,8 @@ jobs:
           whereis helm
           whereis kubectl
          
-      # Tests if the script checks ok
-      - name: Test install-magasin.sh
-        run: |
-
-          # We run a local helm repo in background 
-          pwd
-          cd helm-scripts
-          ./local-helm-repo.sh &
-          sleep 15
-          cd ..
-
+      - name: Install magasin from local repo
+        run: | 
           # Now we install magasin
           cd installer