minio-configurator

by tjungbauer

Helm chartv1.0.13Apache-2.0Verified publisher

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

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/minio-configurator

Parameters

Values

KeyTypeDefaultDescription
argoproj.hookstringSyncArgo CD Hook phase
argoproj.hook_delete_policystringHookSucceededArgo CD delete policy for the hook
auth.secretNamestring''Name of the Secret that contains the access to Minio Must contain root-password and root-user
auth.useCredentialsFilesboolfalseMount credentials as a files instead of using an environment variable.
image.pullPolicystringAlwaysPull policy for the image. Can be Always or IfNotPresent
image.pullSecretslist[]Optional List of pull secrets for the image
image.urlstring"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.portint''Port of the Minio Cluster
miniocluster.urlstring''Name/URL of the Minio Cluster
namestring""Name of the resources (unlike Bitnami I am not using any templating here)
namespacestring""Namespace where the provisioner should be scheduled
provisioning.bucketslist''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.cleanupAfterFinishedobjectdisabledAutomatic 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.configlist[]
provisioning.enabledboolfalseEnable Bucket provisioning
provisioning.extraCommandslist[]Optionally specify extra list of additional commands for provisioning
provisioning.groupslist[]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.policieslist[]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.resourcesobject{}Optionall define resource for the provisioner pod. Simply define typical resources, like limits.cpu; requests.memory etc.
provisioning.tolerationslist[]Tolerations for the provisioning Pod
provisioning.userslist[]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.usersExistingSecretslist[]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.automountServiceAccountTokenboolfalseEnable/disable auto mounting of the service account token
serviceAccount.createboolfalse
serviceAccount.namestring''Name of the created ServiceAccount
skip_tls_verificationboolfalseSkip TLS verification for Minio. This set the variable MC_INSECURE to true Can be used when you are using self-signed certificates for example.
syncwaveint5Argo CD Sync wave for the Minio provisioner
tls.enabledbooltrueEnable tls in front of the container
tls.mountPathstring""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.secretNamestring""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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartminio-configurator is pinned at v1.0.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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