-
Notifications
You must be signed in to change notification settings - Fork 484
Add sideCars
to the MinIO tenant Helm chart
#2466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Although I think it's fine to add sidecars to the Helm chart, this is not the correct use. Sidecars are typically used to add functionality to a pod (i.e. logging, monitoring, networking, ...). It's not to be used for a single task, like setting up a service account for the following reasons:
This is better fixed by deploing a Kubernetes batch job (docs) instead that will perform the required setup tasks. |
@ramondeklein our use case is exactly that: start a MinIO configuration reconciler sidecar container that mounts a K8s secret as a volume. As the Tenant CRD supports Whenever Terraform updates this secret, it will also update the secret within the container. Our reconciler script, which runs every 60 seconds, will then remove or add resources such as console users or service accounts. We don't want to expose the MinIO API using an ingress (which would allow us to interact with MinIO again using Terraform). Therefore, a reconciler sidecar is the approach we've chosen. |
A
Regarding point 2, we run the reconciler script every 60 seconds (and we catch any potential errors), therefore the container will never exit, and the pod keeps running.
|
A |
You are right, I'll remove the example value. |
Description
This PR adds the ability to configure the
tenant
Helm chartsideCars
.With the replacement of the MinIO Console with the simple Object Browser, more and more administrative tasks like the creation of service accounts have to be done with the MinIO Client
mc
command, which is a good thing, as IaC is more in the focus instead of conveniently using a web UI.This configuration can be done, for example, using a K8s sidecar using the
quay.io/minio/mc
container image.The Operator Tenant CRD already supports
sideCars
, but the tenant Helm chart currently does not support them.https://github.com/minio/operator/blob/v7.1.1/docs/tenant_crd.adoc#sidecars
https://github.com/minio/operator/blob/v7.1.1/resources/base/crds/minio.min.io_tenants.yaml#L3805

https://github.com/minio/operator/blob/v7.1.1/helm/operator/templates/minio.min.io_tenants.yaml#L3805
Related Issue
fixes: #2465
Type of Change
Checklist
Test Steps
sideCars
configuration example inhelm/tenant/values.yaml
, same as it was done with theinitContainers
example.