diff --git a/helm/tenant/templates/tenant.yaml b/helm/tenant/templates/tenant.yaml
index 24a1b4ef620..173e44f4ff6 100644
--- a/helm/tenant/templates/tenant.yaml
+++ b/helm/tenant/templates/tenant.yaml
@@ -25,6 +25,9 @@ spec:
imagePullSecret:
name: {{ dig "imagePullSecret" "name" "" . }}
{{- end }}
+ {{- with (dig "initContainers" (list) .) }}
+ initContainers: {{- toYaml . | nindent 4 }}
+ {{- end }}
## Secret with default environment variable configurations
configuration:
name: {{ .configuration.name }}
diff --git a/helm/tenant/values.yaml b/helm/tenant/values.yaml
index 52d8ca8dd62..1dcc4311502 100644
--- a/helm/tenant/values.yaml
+++ b/helm/tenant/values.yaml
@@ -38,6 +38,30 @@ tenant:
# Only one array element is supported at this time.
imagePullSecret: { }
###
+ #
+ # Specify `initContainers `__ to perform setup or configuration tasks before the main Tenant pods starts.
+ #
+ # Example of init container which waits for idenity provider to be reachable before starting MinIO Tenant:
+ #
+ # .. code-block:: yaml
+ #
+ # initContainers:
+ # - name: wait-for-idp
+ # image: busybox
+ # command:
+ # - sh
+ # - -c
+ # - |
+ # URL="https://idp-url"
+ # echo "Checking IdP reachability (${URL})"
+ # until $(wget -q -O "/dev/null" ${URL}) ; do
+ # echo "IdP (${URL}) not reachable. Waiting to be reachable..."
+ # sleep 5
+ # done
+ # echo "IdP (${URL}) reachable. Starting MinIO..."
+ #
+ initContainers: [ ]
+ ###
# The Kubernetes `Scheduler `__ to use for dispatching Tenant pods.
#
# Specify an empty dictionary ``{}`` to dispatch pods with the default scheduler.