Skip to content

Commit

Permalink
Add initcontainers to tenant Helm Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
lcominoli committed Dec 10, 2024
1 parent bdab160 commit f4c451a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/tenant/templates/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
24 changes: 24 additions & 0 deletions helm/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ tenant:
# Only one array element is supported at this time.
imagePullSecret: { }
###
#
# Specify `initContainers <https://kubernetes.io/docs/concepts/workloads/pods/init-containers/>`__ 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 <https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/>`__ to use for dispatching Tenant pods.
#
# Specify an empty dictionary ``{}`` to dispatch pods with the default scheduler.
Expand Down

0 comments on commit f4c451a

Please sign in to comment.