minio-configurator
by tjungbauer
A Chart to automate the bucket creation and configuration for MINIO Object Storage
About this chart
minio-configurator
Description
A Chart to automate the bucket creation and configuration for MINIO Object Storage
This Chart is based on the Bitnami Minio Chart. Without Bitnami I would not have been able to create this Helm Chart.
Unlike Bitnami's chart, which does a full deployment of Minio including the configuration of the Buckets, I wanted to create a small and quick chart, that focuses on the bucket configuration only. Therefore, I forked the original chart, cleaned it up, streamlined it a little bit and added some additional features, like Bucket replication and the option to ignore the TLS certificate etc.
It should help to overcome the requirement that manual configurations are required before gitops can perform certain steps. The main use cases are:
- create a bucket
- configure the bucket (ie. quota or lifecycle)
- create a user
- create a policy and assign it to the user
- enable bucket replication
To achieve this, a provisioning Job is created in order to use an MC command line tool
Maintainers
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/minio-configurator
Parameters
Values
| Key | Type | Default | Description |
|---|---|---|---|
| argoproj.hook | string | Sync | Argo CD Hook phase |
| argoproj.hook_delete_policy | string | HookSucceeded | Argo CD delete policy for the hook |
| auth.secretName | string | '' | Name of the Secret that contains the access to Minio Must contain root-password and root-user |
| auth.useCredentialsFiles | bool | false | Mount credentials as a files instead of using an environment variable. |
| image.pullPolicy | string | Always | Pull policy for the image. Can be Always or IfNotPresent |
| image.pullSecrets | list | [] | Optional List of pull secrets for the image |
| image.url | string | "quay.io/tjungbau/minio-client-tools:v1.0.3" | MinIO Client Tools image version. Specifies the image that contains the mc command line tool |
| miniocluster.port | int | '' | Port of the Minio Cluster |
| miniocluster.url | string | '' | Name/URL of the Minio Cluster |
| name | string | "" | Name of the resources (unlike Bitnami I am not using any templating here) |
| namespace | string | "" | Namespace where the provisioner should be scheduled |
| provisioning.buckets | list | '' | buckets, versioning, lifecycle, quota and tags provisioning Buckets https://docs.min.io/docs/minio-client-complete-guide.html#mb Lifecycle https://docs.min.io/docs/minio-client-complete-guide.html#ilm Quotas https://docs.min.io/docs/minio-admin-complete-guide.html#bucket Tags https://docs.min.io/docs/minio-client-complete-guide.html#tag Versioning https://docs.min.io/docs/minio-client-complete-guide.html#version e.g. buckets: - name: test-bucket region: us-east-1 # Only when mode is 'distributed' # Allowed values: "Versioned" |
| provisioning.cleanupAfterFinished | object | disabled | Automatic Cleanup for Finished Jobs @param provisioning.cleanupAfterFinished.enabled Enables Cleanup for Finished Jobs @param provisioning.cleanupAfterFinished.seconds Sets the value of ttlSecondsAfterFinished ref: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
| provisioning.config | list | [] | |
| provisioning.enabled | bool | false | Enable Bucket provisioning |
| provisioning.extraCommands | list | [] | Optionally specify extra list of additional commands for provisioning |
| provisioning.groups | list | [] | Provisioning.groups e.g. groups - name: test-group disabled: false members: - test-username policies: - readwrite # When set to true, it will replace all policies with the specified. # When false, the policies will be added to the existing. setPolicies: false |
| provisioning.policies | list | [] | Policies provisioning https://docs.min.io/docs/minio-admin-complete-guide.html#policy e.g. policies: - name: custom-bucket-specific-policy statements: - resources: - "arn:aws:s3:::my-bucket" actions: - "s3:GetBucketLocation" - "s3:ListBucket" - "s3:ListBucketMultipartUploads" - resources: - "arn:aws:s3:::my-bucket/*" # Allowed values: "Allow" |
| provisioning.resources | object | {} | Optionall define resource for the provisioner pod. Simply define typical resources, like limits.cpu; requests.memory etc. |
| provisioning.tolerations | list | [] | Tolerations for the provisioning Pod |
| provisioning.users | list | [] | Users provisioning. Can be used in addition to provisioning.usersExistingSecrets. e.g. users: - username: test-username password: test-password disabled: false policies: - readwrite - consoleAdmin - diagnostics # When set to true, it will replace all policies with the specified. # When false, the policies will be added to the existing. setPolicies: false |
| provisioning.usersExistingSecrets | list | [] | Instead of configuring users inside values.yaml, referring to existing Kubernetes secrets containing user configurations is possible. e.g. usersExistingSecrets: - centralized-minio-users All provided Kubernetes secrets require a specific data structure. The same data from the provisioning.users example above can be defined via secrets with the following data structure. The secret keys have no meaning to the provisioning job except that they are used as filenames. ## apiVersion: v1 ## kind: Secret ## metadata: ## name: centralized-minio-users ## type: Opaque ## stringData: ## username1: |
| serviceAccount.automountServiceAccountToken | bool | false | Enable/disable auto mounting of the service account token |
| serviceAccount.create | bool | false | |
| serviceAccount.name | string | '' | Name of the created ServiceAccount |
| skip_tls_verification | bool | false | Skip TLS verification for Minio. This set the variable MC_INSECURE to true Can be used when you are using self-signed certificates for example. |
| syncwave | int | 5 | Argo CD Sync wave for the Minio provisioner |
| tls.enabled | bool | true | Enable tls in front of the container |
| tls.mountPath | string | "" | The mount path where the secret will be located Custom mount path where the certificates will be located, if empty will default to /certs |
| tls.secretName | string | "" | Name of the Secret that contains the TLS information |
Example
# -- Name of the resources (unlike Bitnami I am not using any templating here)
# @default -- ""
name: minio-provisioner
# -- Namespace where the provisioner should be scheduled
# @default -- ""
namespace: minio-operator
# -- Argo CD Sync wave for the Minio provisioner
# @default -- 5
synwave: 5
argoproj:
# -- Argo CD Hook phase
# @default -- Sync
hook: Sync
# -- Argo CD delete policy for the hook
# @default -- HookSucceeded
hook_delete_policy: HookSucceeded
image:
# -- Specifies the image (by Bitnami) that contains the mc command line tool
url: docker.io/bitnami/minio:2024.5.1-debian-12-r0
# -- Pull policy for the image. Can be Always or IfNotPresent
# @default -- Always
pullPolicy: IfNotPresent
# -- Optional List of pull secrets for the image
# @default -- []
pullSecrets: []
# Parameters for authentication
auth:
# -- Mount credentials as a files instead of using an environment variable.
# @default -- false
useCredentialsFiles: true
# -- Name of the Secret that contains the access to Minio
# Must contain root-password and root-user
# @default -- ''
secretName: minio-provisioner
# -- Skip TLS verification for Minio. This set the variable MC_INSECURE to true
# Can be used when you are using self-signed certificates for example.
# @default -- false
skip_tls_verification: true
# TLS Settings
tls:
# -- Enable tls in front of the container
enabled: true
# -- The mount path where the secret will be located
# Custom mount path where the certificates will be located, if empty will default to /certs
# @default -- ""
mountPath: ""
# -- Name of the Secret that contains the TLS information
# @default -- ""
secretName: ""
# Actual bucket configuration
provisioning:
# -- Enable Bucket provisioning
# @default -- false
enabled: false
# -- Optionally specify extra list of additional commands for provisioning
# @default -- []
extraCommands: []
# -- Optionall define resource for the provisioner pod.
# Simply define typical resources, like limits.cpu; requests.memory etc.
# @default -- {}
resources: {}
# -- Policies provisioning <br />
# https://docs.min.io/docs/minio-admin-complete-guide.html#policy
# e.g.
# policies:
# - name: custom-bucket-specific-policy
# statements:
# - resources:
# - "arn:aws:s3:::my-bucket"
# actions:
# - "s3:GetBucketLocation"
# - "s3:ListBucket"
# - "s3:ListBucketMultipartUploads"
# - resources:
# - "arn:aws:s3:::my-bucket/*"
# # Allowed values: "Allow" | "Deny"
# # Defaults to "Deny" if not specified
# effect: "Allow"
# actions:
# - "s3:AbortMultipartUpload"
# - "s3:DeleteObject"
# - "s3:GetObject"
# - "s3:ListMultipartUploadParts"
# - "s3:PutObject"
# @default -- []
policies: []
# -- Users provisioning. Can be used in addition to provisioning.usersExistingSecrets.
# e.g.
# users:
# - username: test-username
# password: test-password
# disabled: false
# policies:
# - readwrite
# - consoleAdmin
# - diagnostics
# # When set to true, it will replace all policies with the specified.
# # When false, the policies will be added to the existing.
# setPolicies: false
# @default -- []
users: []
# -- Instead of configuring users inside values.yaml, referring to existing Kubernetes secrets containing user configurations is possible.
# e.g.
# usersExistingSecrets:
# - centralized-minio-users
#
# All provided Kubernetes secrets require a specific data structure. The same data from the provisioning.users example above
# can be defined via secrets with the following data structure. The secret keys have no meaning to the provisioning job except that
# they are used as filenames.
# ## apiVersion: v1
# ## kind: Secret
# ## metadata:
# ## name: centralized-minio-users
# ## type: Opaque
# ## stringData:
# ## username1: |
# ## username=test-username
# ## password=test-password
# ## disabled=false
# ## policies=readwrite,consoleAdmin,diagnostics
# ## setPolicies=false
# @default -- []
usersExistingSecrets: []
# -- Provis
Deploy minio-configurator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has minio-configurator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartminio-configurator is pinned at v1.0.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply