This commit is contained in:
zeaslity
2024-10-30 16:30:51 +08:00
commit 437acbeb63
3363 changed files with 653948 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
ci/Jenkinsfile
ci/values_override_template.yaml

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.4.2
digest: sha256:4e3ec38e0e27e9fc1defb2a13f67a0aa12374bf0b15f06a6c13b1b46df6bffeb
generated: "2021-03-26T20:51:50.938325675Z"

View File

@@ -0,0 +1,27 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 2.2.2
#dependencies:
#- name: common
# repository: https://charts.bitnami.com/bitnami
# tags:
# - bitnami-common
# version: 1.x.x
description: 基于bitnami的minio后端存储组件使用起来非常正常但是暂时废弃。请保留
home: https://github.com/bitnami/charts/tree/master/bitnami/minio
icon: https://bitnami.com/assets/stacks/minio/img/minio-stack-220x234.png
keywords:
- minio
- storage
- object-storage
- s3
- cluster
maintainers:
- email: containers@bitnami.com
name: Bitnami
name: minio-storage
sources:
- https://github.com/bitnami/bitnami-docker-minio
- https://min.io
version: 6.7.1

View File

@@ -0,0 +1,471 @@
# Bitnami Object Storage Helm Chart based on MinIO®
[MinIO®](https://min.io) is an object storage server, compatible with Amazon S3 cloud storage service, mainly used for storing unstructured data (such as photos, videos, log files, etc.)
Disclaimer: All software products, projects and company names are trademark™ or registered® trademarks of their respective holders, and use of them does not imply any affiliation or endorsement. This software is licensed to you subject to one or more open source licenses and VMware provides the software on an AS-IS basis. MinIO® is a registered trademark of the MinIO, Inc in the US and other countries. Bitnami is not affiliated, associated, authorized, endorsed by, or in any way officially connected with MinIO Inc.
## TL;DR
```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/minio
```
## Introduction
This chart bootstraps a [MinIO®](https://github.com/bitnami/bitnami-docker-minio) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of [Bitnami Kubernetes Production Runtime](https://kubeprod.io/) (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
## Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling
## Installing the Chart
To install the chart with the release name `my-release`:
```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/minio
```
These commands deploy MinIO® on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Parameters
The following table lists the configurable parameters of the MinIO® chart and their their default values per section/component:
### Global parameters
| Parameter | Description | Default |
|--------------------------------|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
| `global.minio.existingSecret` | Global MinIO® credentials (overrides `accessKey.password` `secretKey.password` and `existingSecret`) | `{}` |
### Common parameters
| Parameter | Description | Default |
|---------------------|----------------------------------------------------------------------|--------------------------------|
| `nameOverride` | String to partially override common.names.fullname | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) |
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
### MinIO® parameters
| Parameter | Description | Default |
|-----------------------------------|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `image.registry` | MinIO® image registry | `docker.io` |
| `image.repository` | MinIO® image name | `bitnami/minio` |
| `image.tag` | MinIO® image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `image.debug` | Specify if debug logs should be enabled | `false` |
| `clientImage.registry` | MinIO® Client image registry | `docker.io` |
| `clientImage.repository` | MinIO® Client image name | `bitnami/minio-client` |
| `clientImage.tag` | MinIO® Client image tag | `{TAG_NAME}` |
| `mode` | MinIO® server mode (`standalone` or `distributed`) | `standalone` |
| `accessKey.password` | MinIO® Access Key. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ |
| `accessKey.forcePassword` | Force users to specify an Access Key | `false` |
| `secretKey.password` | MinIO® Secret Key. Ignored if existing secret is provided. | _random 40 character alphanumeric string_ |
| `secretKey.forcePassword` | Force users to specify an Secret Key | `false` |
| `existingSecret` | Existing secret with MinIO® credentials | `nil` |
| `useCredentialsFile` | Have the secret mounted as a file instead of env vars | `false` |
| `forceNewKeys` | Force admin credentials (access and secret key) to be reconfigured every time they change in the secrets | `false` |
| `tls.enabled` | Enable tls in front of the container | `true` |
| `tls.secretName` | The name of the secret containing the certificates and key. | `nil` |
| `tls.mountPath` | The mount path where the secret will be located. | `nil` |
| `defaultBuckets` | Comma, semi-colon or space separated list of buckets to create (only in standalone mode) | `nil` |
| `disableWebUI` | Disable MinIO® Web UI | `false` |
| `command` | Default container command (useful when using custom images) | `{}` |
| `args` | Default container args (useful when using custom images) | `nil` |
| `extraEnv` | Extra environment variables to be set on MinIO® container | `{}` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
### MinIO® deployment/statefulset parameters
| Parameter | Description | Default |
|-----------------------------------|-------------------------------------------------------------------------------------------|--------------------------------|
| `schedulerName` | Specifies the schedulerName, if it's nil uses kube-scheduler | `nil` |
| `statefulset.replicaCount` | Number of pods per zone (only for MinIO® distributed mode). Should be even and `>= 4` | `4` |
| `statefulset.zones` | Number of zones (only for MinIO® distributed mode) | `1` |
| `statefulset.drivesPerNode` | Number of drives per node (only for MinIO® distributed mode) | `1` |
| `statefulset.updateStrategy` | Statefulset update strategy policy | `RollingUpdate` |
| `statefulset.podManagementPolicy` | Statefulset pods management policy | `Parallel` |
| `deployment.updateStrategy` | Deployment update strategy policy | `Recreate` |
| `securityContext.enabled` | Enable security context | `true` |
| `securityContext.fsGroup` | Group ID for the container | `1001` |
| `securityContext.runAsUser` | User ID for the container | `1001` |
| `containerPort` | MinIO(R) container port to open | `9000` |
| `resources.limits` | The resources limits for the MinIO® container | `{}` |
| `resources.requests` | The requested resources for the MinIO® container | `{}` |
| `livenessProbe` | Liveness probe configuration for MinIO® | Check `values.yaml` file |
| `readinessProbe` | Readiness probe configuration for MinIO® | Check `values.yaml` file |
| `startupProbe` | Startup probe configuration for MinIO® | Check `values.yaml` file |
| `customLivenessProbe` | Override default liveness probe | `nil` |
| `customReadinessProbe` | Override default readiness probe | `nil` |
| `customStartupProbe` | Override default startup probe | `nil` |
| `hostAliases` | MinIO® pod host aliases | `[]` |
| `podLabels` | Extra labels for MinIO® pods | `{}` |
| `podAnnotations` | Annotations for MinIO® pods | `{}` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
| `nodeSelector` | Node labels for pod assignment | `{}` (evaluated as a template) |
| `tolerations` | Tolerations for pod assignment | `[]` (evaluated as a template) |
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for MinIO® container(s) | `[]` |
| `extraVolumes` | Optionally specify extra list of additional volumes for MinIO® pods | `[]` |
| `initContainers` | Add additional init containers to the MinIO® pods | `{}` (evaluated as a template) |
| `sidecars` | Add additional sidecar containers to the MinIO® pods | `{}` (evaluated as a template) |
### Exposure parameters
| Parameter | Description | Default |
|------------------------------------|-----------------------------------------------------------------------------------|--------------------------------|
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.port` | MinIO® service port | `9000` |
| `service.nodePort` | Port to bind to for NodePort service type | `nil` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
| `service.annotations` | Annotations for MinIO® service | `{}` (evaluated as a template) |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `` |
| `ingress.path` | Ingress path | `/` |
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.certManager` | Add annotations for cert-manager | `false` |
| `ingress.hostname` | Default host for the ingress resource | `minio.local` |
| `ingress.tls` | Enable TLS configuration for the hostname defined at `ingress.hostname` parameter | `false` |
| `ingress.annotations` | Ingress annotations | `{}` (evaluated as a template) |
| `ingress.extraPaths` | Any additional paths that may need to be added to the ingress under the main host | `[]` |
| `ingress.extraHosts[0].name` | Additional hostnames to be covered | `nil` |
| `ingress.extraHosts[0].path` | Additional hostnames to be covered | `nil` |
| `ingress.extraTls[0].hosts[0]` | TLS configuration for additional hostnames to be covered | `nil` |
| `ingress.extraTls[0].secretName` | TLS configuration for additional hostnames to be covered | `nil` |
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
| `ingress.servicePort` | Service port to be used | `http` |
| `networkPolicy.enabled` | Enable the default NetworkPolicy policy | `false` |
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
### Persistence parameters
| Parameter | Description | Default |
|------------------------------------|------------------------------------------------------------------------------------|--------------------------------|
| `persistence.enabled` | Enable MinIO® data persistence using PVC | `true` |
| `persistence.storageClass` | PVC Storage Class for MinIO® data volume | `nil` |
| `persistence.mountPath` | Path to mount the volume at | `/data` |
| `persistence.accessModes` | PVC Access Modes for MinIO® data volume | `[ReadWriteOnce]` |
| `persistence.size` | PVC Storage Request for MinIO® data volume | `8Gi` |
| `persistence.selector` | Selector to match an existing Persistent Volume | `{}`(evaluated as a template) |
| `persistence.annotations` | Annotations for the PVC | `{}`(evaluated as a template) |
| `persistence.existingClaim` | Name of an existing PVC to use (only in "standalone" mode) | `nil` |
### Volume Permissions parameters
| Parameter | Description | Default |
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/bitnami-shell` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `"10"` |
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `volumePermissions.resources.limits` | Init container volume-permissions resource limits | `{}` |
| `volumePermissions.resources.requests` | Init container volume-permissions resource requests | `{}` |
### RBAC parameters
| Parameter | Description | Default |
|-------------------------|-------------------------------------------------------------|------------------------------------------------------|
| `serviceAccount.create` | Enable the creation of a ServiceAccount for MinIO® pods | `true` |
| `serviceAccount.name` | Name of the created ServiceAccount | Generated using the `common.names.fullname` template |
### Other parameters
| Parameter | Description | Default |
|-------------------------|----------------------------------------------------------------|---------|
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `nil` |
### Metrics parameters
| Parameter | Description | Default |
|-------------------------------------------|-------------------------------------------------------------------------------------|--------------------------------------------------------------|
| `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.path` | HTTP path to scrape for metrics | `/minio/v2/metrics/cluster` |
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `nil` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `nil` |
| `metrics.serviceMonitor.relabellings` | Specify Metric Relabellings to add to the scrape endpoint | `nil` |
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels. | `false` |
| `metrics.serviceMonitor.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator | `{}` |
| `metrics.serviceMonitor.release` | Used to pass Labels release that sometimes should be custom for Prometheus Operator | `nil` |
### Gateway parameters
| Parameter | Description | Default |
|-------------------------------------------|-------------------------------------------------------------------------------------|--------------------------------------------------------------|
| `gateway.enabled` | Use MinIO® as Gateway for other storage systems | `false` |
| `gateway.type` | Gateway type. Supported types are: `azure`, `gcs`, `nas`, `s3` | `s3` |
| `gateway.replicaCount` | Number of MinIO® Gateway replicas | `4` |
| `gateway.auth.azure.accessKey` | Access Key to access MinIO using Azure Gateway | _random 10 character alphanumeric string_ |
| `gateway.auth.azure.secretKey` | Secret Key to access MinIO using Azure Gateway | _random 40 character alphanumeric string_ |
| `gateway.auth.azure.storageAccountName` | Azure Storage Account Name to use to access Azure Blob Storage | `nil` |
| `gateway.auth.azure.storageAccountKey` | Azure Storage Account Key to use to access Azure Blob Storage | `nil` |
| `gateway.auth.gcs.accessKey` | Access Key to access MinIO using GCS Gateway | _random 10 character alphanumeric string_ |
| `gateway.auth.gcs.secretKey` | Secret Key to access MinIO using GCS Gateway | _random 40 character alphanumeric string_ |
| `gateway.auth.gcs.keyJSON` | Service Account key to access GCS | `nil` |
| `gateway.auth.gcs.projectID` | GCP Project ID to use | `nil` |
| `gateway.auth.nas.accessKey` | Access Key to access MinIO using NAS Gateway | _random 10 character alphanumeric string_ |
| `gateway.auth.nas.secretKey` | Secret Key to access MinIO using NAS Gateway | _random 40 character alphanumeric string_ |
| `gateway.auth.s3.serviceEndpoint` | AWS S3 endpoint | `https://s3.amazonaws.com` |
| `gateway.auth.s3.accessKey` | Access Key to use to access AWS S3 | `nil` |
| `gateway.auth.s3.secretKey` | Secret Key to use to access AWS S3 | `nil` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
$ helm install my-release \
--set accessKey.password=minio-access-key \
--set secretKey.password=minio-secret-key \
bitnami/minio
```
The above command sets the MinIO® Server access key and secret key to `minio-access-key` and `minio-secret-key`, respectively.
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```console
$ helm install my-release -f values.yaml bitnami/minio
```
> **Tip**: You can use the default [values.yaml](values.yaml)
## Configuration and installation details
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### Distributed mode
By default, this chart provisions a MinIO® server in standalone mode. You can start MinIO® server in [distributed mode](https://docs.minio.io/docs/distributed-minio-quickstart-guide) with the following parameter: `mode=distributed`
This chart bootstrap MinIO® server in distributed mode with 4 nodes by default. You can change the number of nodes using the `statefulset.replicaCount` parameter. For instance, you can deploy the chart with 8 nodes using the following parameters:
```console
mode=distributed
statefulset.replicaCount=8
```
You can also bootstrap MinIO® server in distributed mode in several zones, and using multiple drives per node. For instance, you can deploy the chart with 2 nodes per zone on 2 zones, using 2 drives per node:
```console
mode=distributed
statefulset.replicaCount=2
statefulset.zones=2
statefulset.drivesPerNode=2
```
> Note: The total number of drives should be multiple of 4 to guarantee erasure coding. Please set a combination of nodes, and drives per node that match this condition.
### Prometheus exporter
MinIO® exports Prometheus metrics at `/minio/v2/metrics/cluster`. To allow Prometheus collecting your MinIO® metrics, modify the `values.yaml` adding the corresponding annotations:
```diff
- podAnnotations: {}
+ podAnnotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/minio/v2/metrics/cluster"
+ prometheus.io/port: "9000"
```
> Find more information about MinIO® metrics at https://docs.min.io/docs/how-to-monitor-minio-using-prometheus.html
## Persistence
The [Bitnami Object Storage based on MinIO®](https://github.com/bitnami/bitnami-docker-minio) image stores data at the `/data` path of the container.
The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.
### Adjust permissions of persistent volume mountpoint
As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting `volumePermissions.enabled` to `true`.
### Ingress
This chart provides support for ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress](https://kubeapps.com/charts/stable/nginx-ingress) or [traefik](https://kubeapps.com/charts/stable/traefik) you can utilize the ingress controller to serve your MinIO® server.
To enable ingress integration, please set `ingress.enabled` to `true`, and `disableWebUI` to `false`.
#### Hosts
Most likely you will only want to have one hostname that maps to this MinIO® installation. If that's your case, the property `ingress.hostname` will set it. However, it is possible to have more than one host. To facilitate this, the `ingress.extraHosts` object is can be specified as an array. You can also use `ingress.extraTLS` to add the TLS configuration for extra hosts.
For each host indicated at `ingress.extraHosts`, please indicate a `name`, `path`, and any `annotations` that you may want the ingress controller to know about.
For annotations, please see [this document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md). Not all annotations are supported by all ingress controllers, but this document does a good job of indicating which annotation is supported by many popular ingress controllers.
#### TLS
This chart will facilitate the creation of TLS secrets for use with the ingress controller, however, this is not required. There are four common use cases:
- Helm generates/manages certificate secrets based on the parameters.
- User generates/manages certificates separately.
- Helm creates self-signed certificates and generates/manages certificate secrets.
- An additional tool (like [cert-manager](https://github.com/jetstack/cert-manager/)) manages the secrets for the application.
In the first two cases, it's needed a certificate and a key. Files are expected in PEM format.
- If you are going to use Helm to manage the certificates based on the parameters, please copy these values into the `certificate` and `key` values for a given `ingress.secrets` entry.
- In case you are going to manage TLS secrets separately, please know that you must create a TLS secret with name *INGRESS_HOSTNAME-tls* (where *INGRESS_HOSTNAME* is a placeholder to be replaced with the hostname you set using the `ingress.hostname` parameter).
- To use self-signed certificates created by Helm, set `ingress.tls` to `true`, and `ingress.certManager` to `false`.
- If your cluster has a [cert-manager](https://github.com/jetstack/cert-manager) add-on to automate the management and issuance of TLS certificates, set `ingress.certManager` boolean to `true` to enable the corresponding annotations for cert-manager.
### MinIO® Gateway
MinIO® can be configured as a Gateway for other other storage systems. Currently this chart supports to setup MinIO® as a Gateway for the storage systems below:
- [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/)
- [GCS](https://cloud.google.com/storage)
- NAS: Network Attached Storage
- [AWS S3](https://aws.amazon.com/s3/)
The enable this feature, install the chart setting `gateway.enabled` to `true`. You can choose the Gateway type setting the `gateway.type` parameter. For instance, to install the chart as a S3 Gateway, install the chart the using the following parameters:
```console
gateway.enabled=true
gateway.replicaCount=4
gateway.type=s3
gateway.auth.s3.serviceEndpoint=https://s3.amazonaws.com
gateway.auth.s3.accessKey=S3_ACCESS_KEY
gateway.auth.s3.secretKey=S3_SECRET_KEY
```
> Note: remember to replace the S3_ACCESS_KEY and S3_SECRET_KEY placeholders with your actual S3 access & secret keys.
Find all the available parameters to configure MinIO® as a Gateway in the [Gateway parameters section](#gateway-parameters).
> Note: when using MinIO® as a NAS Gateway, you need ReadWriteMany PVs to deploy multiple MinIO® instances. Ensure you K8s cluster supports this kind of cluster, and install the chart setting `persistence.accessModes[0]` to `ReadWriteMany` to do so.
### Adding extra environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnv` property.
```yaml
extraEnv:
- name: MINNIO_LOG_LEVEL
value: DEBUG
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
### Sidecars and Init Containers
If you have a need for additional containers to run within the same pod as the MinIO® app (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
```yaml
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
Similarly, you can add extra init containers using the `initContainers` parameter.
```yaml
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
### Setting Pod's affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
### Deploying extra resources
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the `extraDeploy` parameter.
## Troubleshooting
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
## Upgrading
### To 5.0.0
This version standardizes the way of defining Ingress rules. When configuring a single hostname for the Ingress rule, set the `ingress.hostname` value. When defining more than one, set the `ingress.extraHosts` array. Apart from this case, no issues are expected to appear when upgrading.
### To 4.1.0
This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
### To 4.0.0
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
**What changes were introduced in this major version?**
- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts
**Considerations when upgrading to this version**
- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues
- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore
- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3
**Useful links**
- https://docs.bitnami.com/tutorials/resolve-helm2-helm3-post-migration-issues/
- https://helm.sh/docs/topics/v2_v3_migration/
- https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/

View File

@@ -0,0 +1,77 @@
** Please be patient while the chart is being deployed **
{{- if .Values.gateway.enabled }}
MinIO(R) deployed as a {{ upper .Values.gateway.type }} Gateway
{{- end }}
MinIO(R) can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster:
{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
To get your credentials run:
export ACCESS_KEY=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "minio.secretName" . }} -o jsonpath="{.data.access-key}" | base64 --decode)
export SECRET_KEY=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "minio.secretName" . }} -o jsonpath="{.data.secret-key}" | base64 --decode)
To connect to your MinIO(R) server using a client:
- Run a MinIO(R) Client pod and append the desired command (e.g. 'admin info'):
kubectl run --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }}-client \
--rm --tty -i --restart='Never' \
--env MINIO_SERVER_ACCESS_KEY=$ACCESS_KEY \
--env MINIO_SERVER_SECRET_KEY=$SECRET_KEY \
--env MINIO_SERVER_HOST={{ include "common.names.fullname" . }} \
--image {{ template "minio.clientImage" . }} -- admin info minio
{{- if or .Values.gateway.enabled (not .Values.disableWebUI) }}
To access the MinIO(R) web UI:
- Get the MinIO(R) URL:
{{- if .Values.ingress.enabled }}
You should be able to access your new MinIO(R) web UI through
{{ if .Values.ingress.tls }}https{{ else }}http{{ end }}://{{ .Values.ingress.hostname }}/minio/
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "common.names.fullname" . }}'
{{- $port:=.Values.service.port | toString }}
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo "MinIO(R) web URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/minio"
{{- else if contains "ClusterIP" .Values.service.type }}
echo "MinIO(R) web URL: http://127.0.0.1:9000/minio"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "common.names.fullname" . }} 9000:{{ .Values.service.port }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "MinIO(R) web URL: http://$NODE_IP:$NODE_PORT/minio"
{{- end }}
{{- else }}
WARN: MinIO(R) Web UI is disabled.
{{- end }}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.rollingTag" .Values.clientImage }}
{{- include "minio.validateValues" . }}
{{- $requiredPassword := list -}}
{{- $secretName := include "minio.secretName" . -}}
{{- if and (not .Values.existingSecret) (not .Values.forceNewKeys) -}}
{{- $requiredAccessKey := dict "valueKey" "accessKey.password" "secret" $secretName "field" "access-key" -}}
{{- $requiredSecretKey := dict "valueKey" "secretKey.password" "secret" $secretName "field" "secret-key" -}}
{{- $requiredPassword = append $requiredPassword $requiredAccessKey -}}
{{- $requiredPassword = append $requiredPassword $requiredSecretKey -}}
{{- end -}}
{{- $requiredMinioPasswordErrors := include "common.validations.values.multiple.empty" (dict "required" $requiredPassword "context" $) -}}
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $requiredMinioPasswordErrors) "context" $) -}}

View File

@@ -0,0 +1,279 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Return the proper MinIO(R) image name
*/}}
{{- define "minio.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper MinIO(R) Client image name
*/}}
{{- define "minio.clientImage" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.clientImage "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "minio.volumePermissions.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "minio.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.clientImage .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}}
{{/*
Get the user to use to access MinIO(R)
*/}}
{{- define "minio.secret.userValue" -}}
{{- if .Values.gateway.enabled }}
{{- if eq .Values.gateway.type "azure" }}
{{- if .Values.gateway.auth.azure.accessKey }}
{{- .Values.gateway.auth.azure.accessKey -}}
{{- else -}}
{{- randAlphaNum 10 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "gcs" }}
{{- if .Values.gateway.auth.gcs.accessKey }}
{{- .Values.gateway.auth.gcs.accessKey -}}
{{- else -}}
{{- randAlphaNum 10 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "nas" }}
{{- if .Values.gateway.auth.nas.accessKey }}
{{- .Values.gateway.auth.nas.accessKey -}}
{{- else -}}
{{- randAlphaNum 10 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "s3" }}
{{- .Values.gateway.auth.s3.accessKey -}}
{{- end -}}
{{- else }}
{{- $accessKey := coalesce .Values.accessKey.password "woshinibaba" -}}
{{- if $accessKey }}
{{- $accessKey -}}
{{- else if (not .Values.accessKey.forcePassword) }}
{{- randAlphaNum 10 -}}
{{- else -}}
{{ required "An Access Key is required!" .Values.accessKey.password }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Get the password to use to access MinIO(R)
*/}}
{{- define "minio.secret.passwordValue" -}}
{{- if .Values.gateway.enabled }}
{{- if eq .Values.gateway.type "azure" }}
{{- if .Values.gateway.auth.azure.secretKey }}
{{- .Values.gateway.auth.azure.secretKey -}}
{{- else -}}
{{- randAlphaNum 40 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "gcs" }}
{{- if .Values.gateway.auth.gcs.secretKey }}
{{- .Values.gateway.auth.gcs.secretKey -}}
{{- else -}}
{{- randAlphaNum 40 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "nas" }}
{{- if .Values.gateway.auth.nas.secretKey }}
{{- .Values.gateway.auth.nas.secretKey -}}
{{- else -}}
{{- randAlphaNum 40 -}}
{{- end -}}
{{- else if eq .Values.gateway.type "s3" }}
{{- .Values.gateway.auth.s3.secretKey -}}
{{- end -}}
{{- else }}
{{- $secretKey := coalesce .Values.secretKey.password "tmp" -}}
{{- if $secretKey }}
{{- $secretKey -}}
{{- else if (not .Values.secretKey.forcePassword) }}
{{- randAlphaNum 40 -}}
{{- else -}}
{{ required "A Secret Key is required!" .Values.secretKey.password }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Get the credentials secret.
*/}}
{{- define "minio.secretName" -}}
{{- if .Values.existingSecret -}}
{{- printf "%s" .Values.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a secret object should be created
*/}}
{{- define "minio.createSecret" -}}
{{- if .Values.existingSecret }}
{{- else -}}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a PVC object should be created (only in standalone mode)
*/}}
{{- define "minio.createPVC" -}}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (or (and (eq .Values.mode "standalone") (not .Values.gateway.enabled)) (and .Values.gateway.enabled (eq .Values.gateway.type "nas"))) }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the PVC name (only in standalone mode)
*/}}
{{- define "minio.claimName" -}}
{{- if and .Values.persistence.existingClaim }}
{{- printf "%s" (tpl .Values.persistence.existingClaim $) -}}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Returns the proper service account name depending if an explicit service account name is set
in the values file. If the name is not set it will default to either common.names.fullname if serviceAccount.create
is true or default otherwise.
*/}}
{{- define "minio.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Compile all warnings into a single message, and call fail.
*/}}
{{- define "minio.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "minio.validateValues.mode" .) -}}
{{- $messages := append $messages (include "minio.validateValues.totalDrives" .) -}}
{{- $messages := append $messages (include "minio.validateValues.tls" .) -}}
{{- $messages := append $messages (include "minio.validateValues.gateway.type" .) -}}
{{- $messages := append $messages (include "minio.validateValues.gateway.azure.credentials" .) -}}
{{- $messages := append $messages (include "minio.validateValues.gateway.gcs.projectID" .) -}}
{{- $messages := append $messages (include "minio.validateValues.gateway.nas.persistence" .) -}}
{{- $messages := append $messages (include "minio.validateValues.gateway.s3.credentials" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - must provide a valid mode ("distributed" or "standalone")
*/}}
{{- define "minio.validateValues.mode" -}}
{{- $allowedValues := list "distributed" "standalone" }}
{{- if not (has .Values.mode $allowedValues) -}}
minio: mode
Invalid mode selected. Valid values are "distributed" and
"standalone". Please set a valid mode (--set mode="xxxx")
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - total number of drives should be multiple of 4
*/}}
{{- define "minio.validateValues.totalDrives" -}}
{{- $replicaCount := int .Values.statefulset.replicaCount }}
{{- $drivesPerNode := int .Values.statefulset.drivesPerNode }}
{{- $totalDrives := mul $replicaCount $drivesPerNode }}
{{- if and (eq .Values.mode "distributed") (or (not (eq (mod $totalDrives 4) 0)) (lt $totalDrives 4)) -}}
minio: total drives
The total number of drives should be multiple of 4 to guarantee erasure coding!
Please set a combination of nodes, and drives per node that match this condition.
For instance (--set statefulset.replicaCount=2 --set statefulset.drivesPerNode=2)
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - TLS secret must provided if TLS is enabled
*/}}
{{- define "minio.validateValues.tls" -}}
{{- if and .Values.tls.enabled (not .Values.tls.secretName) }}
minio: tls.secretName
The name of an existing secret containing the certificates must be provided
if TLS is enabled. Please set its name (--set tls.secretName=X)
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - must provide a valid gateway type ("azure", "gcs", "nas" or "s3")
*/}}
{{- define "minio.validateValues.gateway.type" -}}
{{- $allowedValues := list "azure" "gcs" "nas" "s3" }}
{{- if and .Values.gateway.enabled (not (has .Values.gateway.type $allowedValues)) -}}
minio: gateway.type
Invalid Gateway type. Valid values are "azure", "gcs", "nas" and "s3".
Please set a valid mode (--set gateway.type="xxxx")
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - when using MinIO(R) as an Azure Gateway, the StorageAccount Name/Key are required
*/}}
{{- define "minio.validateValues.gateway.azure.credentials" -}}
{{- if and .Values.gateway.enabled (eq .Values.gateway.type "azure") (or (empty .Values.gateway.auth.azure.storageAccountName) (empty .Values.gateway.auth.azure.storageAccountKey)) }}
minio: gateway.auth.azure
The StorageAccount name and key are required to use MinIO(R) as a Azure Gateway.
Please set a valid StorageAccount information (--set gateway.auth.azure.storageAccountName="xxxx",gateway.auth.azure.storageAccountKey="yyyy")
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - when using MinIO(R) as a GCS Gateway, the GCP project ID is required
*/}}
{{- define "minio.validateValues.gateway.gcs.projectID" -}}
{{- if and .Values.gateway.enabled (eq .Values.gateway.type "gcs") (empty .Values.gateway.auth.gcs.projectID) }}
minio: gateway.auth.gcs.projectID
A GCP project ID is required to use MinIO(R) as a GCS Gateway.
Please set a valid project ID (--set gateway.auth.gcs.projectID="xxxx")
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - when using MinIO(R) as a NAS Gateway, ReadWriteMany volumes are required
*/}}
{{- define "minio.validateValues.gateway.nas.persistence" -}}
{{- $replicaCount := int .Values.gateway.replicaCount }}
{{- if and .Values.gateway.enabled (eq .Values.gateway.type "nas") (gt $replicaCount 1) (not .Values.persistence.enabled) }}
minio: persistence.enabled
ReadWriteMany volumes are required to use MinIO(R) as a NAS Gateway with N replicas.
Please enable persistence (--set persistence.enabled=true)
{{- else if and .Values.gateway.enabled (eq .Values.gateway.type "nas") (gt $replicaCount 1) (include "minio.createPVC" .) (not (has "ReadWriteMany" .Values.persistence.accessModes)) }}
minio: persistence.accessModes
ReadWriteMany volumes are required to use MinIO(R) as a NAS Gateway with N replicas.
Please set a valid mode (--set persistence.accessModes[0]="ReadWriteMany")
{{- end -}}
{{- end -}}
{{/*
Validate values of MinIO(R) - when using MinIO(R) as a S3 Gateway, the Access & Secret keys are required
*/}}
{{- define "minio.validateValues.gateway.s3.credentials" -}}
{{- if and .Values.gateway.enabled (eq .Values.gateway.type "s3") (or (empty .Values.gateway.auth.s3.accessKey) (empty .Values.gateway.auth.s3.secretKey)) }}
minio: gateway.auth.s3
The Access & Secret keys are required to use MinIO(R) as a S3 Gateway.
Please set valid keys (--set gateway.auth.s3.accessKey="xxxx",gateway.auth.s3.secretKey="yyyy")
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,23 @@
{{- if and (eq .Values.mode "distributed") (not .Values.gateway.enabled) }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: minio
port: {{ .Values.service.port }}
targetPort: minio
publishNotReadyAddresses: true
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
{{- end }}

View File

@@ -0,0 +1,376 @@
{{- if and (eq .Values.mode "distributed") (not .Values.gateway.enabled) }}
{{- $fullname := include "common.names.fullname" . }}
{{- $headlessService := printf "%s-headless" (include "common.names.fullname" .) | trunc 63 }}
{{- $releaseNamespace := .Release.Namespace }}
{{- $clusterDomain := .Values.clusterDomain }}
{{- $replicaCount := int .Values.statefulset.replicaCount }}
{{- $zoneCount := int .Values.statefulset.zones }}
{{- $drivesPerNode := int .Values.statefulset.drivesPerNode }}
{{- $mountPath := .Values.persistence.mountPath }}
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ $fullname }}
namespace: {{ $releaseNamespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
serviceName: {{ $headlessService }}
replicas: {{ mul $zoneCount $replicaCount }}
podManagementPolicy: {{ .Values.statefulset.podManagementPolicy }}
updateStrategy:
type: {{ .Values.statefulset.updateStrategy }}
{{- if (eq "Recreate" .Values.statefulset.updateStrategy) }}
rollingUpdate: null
{{- end }}
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.podAnnotations (include "minio.createSecret" .) }}
annotations:
{{- if (include "minio.createSecret" .) }}
checksum/credentials-secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- include "minio.imagePullSecrets" . | nindent 6 }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName }}
{{- end }}
serviceAccountName: {{ template "minio.serviceAccountName" . }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- if or .Values.initContainers (and .Values.volumePermissions.enabled .Values.persistence.enabled) }}
initContainers:
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions
image: {{ template "minio.volumePermissions.image" . }}
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
{{- if and .Values.persistence.enabled (gt $drivesPerNode 1) }}
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} {{ range $diskId := until $drivesPerNode }}{{ $mountPath }}-{{ $diskId }} {{ end }}
{{- else }}
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} {{ $mountPath }}
{{- end }}
securityContext:
runAsUser: 0
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
{{- if and .Values.persistence.enabled (gt $drivesPerNode 1) }}
{{- range $diskId := until $drivesPerNode }}
- name: data-{{ $diskId }}
mountPath: {{ $mountPath }}-{{ $diskId }}
{{- end }}
{{- else }}
- name: data
mountPath: {{ $mountPath }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: minio
image: {{ include "minio.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
- name: MINIO_DISTRIBUTED_MODE_ENABLED
value: "yes"
- name: MINIO_DISTRIBUTED_NODES
{{- $clusters := list }}
{{- range $i := until $zoneCount }}
{{- $factor := mul $i $replicaCount }}
{{- $endIndex := sub (add $factor $replicaCount) 1 }}
{{- $beginIndex := mul $i $replicaCount }}
{{- $bucket := ternary (printf "%s-{0...%d}" $mountPath (sub $drivesPerNode 1)) $mountPath (gt $drivesPerNode 1) }}
{{- $clusters = append $clusters (printf "%s-{%d...%d}.%s.%s.svc.%s%s" $fullname $beginIndex $endIndex $headlessService $releaseNamespace $clusterDomain $bucket) }}
{{- end }}
value: {{ join "," $clusters | quote }}
- name: MINIO_SCHEME
value: {{ ternary "https" "http" .Values.tls.enabled | quote }}
- name: MINIO_FORCE_NEW_KEYS
value: {{ ternary "yes" "no" .Values.forceNewKeys | quote }}
{{- if .Values.useCredentialsFile }}
- name: MINIO_ACCESS_KEY_FILE
value: "/opt/bitnami/minio/secrets/access-key"
{{- else }}
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: access-key
{{- end }}
{{- if .Values.useCredentialsFile }}
- name: MINIO_SECRET_KEY_FILE
value: "/opt/bitnami/minio/secrets/secret-key"
{{- else }}
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: secret-key
{{- end }}
- name: MINIO_SKIP_CLIENT
value: {{ ternary "yes" "no" (empty .Values.defaultBuckets) | quote }}
{{- if .Values.defaultBuckets }}
- name: MINIO_DEFAULT_BUCKETS
value: {{ .Values.defaultBuckets }}
{{- end }}
- name: MINIO_BROWSER
value: {{ ternary "off" "on" .Values.disableWebUI | quote }}
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: {{ .Values.metrics.prometheusAuthType | quote }}
{{- if .Values.tls.mountPath }}
- name: MINIO_CERTSDIR
value: {{ .Values.tls.mountPath | quote }}
{{- end }}
{{- if .Values.extraEnv }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnv "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.global.webhook.enabled }}
- name: MINIO_NOTIFY_WEBHOOK_ENABLE_1
valueFrom:
configMapKeyRef:
name: {{ include "common.names.fullname" . }}-webhook-config
key: minio_notify_webhook_enable_1
- name: MINIO_NOTIFY_WEBHOOK_ENDPOINT_1
valueFrom:
configMapKeyRef:
name: {{ include "common.names.fullname" . }}-webhook-config
key: minio_notify_webhook_endpoint_1
- name: MINIO_NOTIFY_WEBHOOK_QUEUE_DIR_1
valueFrom:
configMapKeyRef:
name: {{ include "common.names.fullname" . }}-webhook-config
key: minio_notify_webhook_queue_dir_1
{{- end }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
ports:
- name: minio
containerPort: {{ .Values.containerPort }}
protocol: TCP
{{- if .Values.global.webhook.enabled }}
- name: minio-webhook
containerPort: {{ .Values.global.webhook.port }}
protocol: TCP
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /minio/health/live
port: minio
scheme: {{ ternary "HTTPS" "HTTP" .Values.tls.enabled | quote }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- else if .Values.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
tcpSocket:
port: minio
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
tcpSocket:
port: minio
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.useCredentialsFile }}
- name: minio-credentials
mountPath: /opt/bitnami/minio/secrets/
{{- end }}
{{- if .Values.tls.enabled }}
- name: minio-certs
mountPath: {{ default "/certs" .Values.tls.mountPath }}
{{- end }}
{{- if and .Values.persistence.enabled (gt $drivesPerNode 1) }}
{{- range $diskId := until $drivesPerNode }}
- name: data-{{ $diskId }}
mountPath: {{ $mountPath }}-{{ $diskId }}
{{- end }}
{{- else }}
- name: data
mountPath: {{ $mountPath }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.global.webhook.enabled }}
- name: webhook-config
mountPath: "/.mc/config.json"
readOnly: false
subPath: config.json
- name: webhook-download-config
mountPath: "/.mc/share/downloads.json"
readOnly: false
subPath: downloads.json
- name: webhook-uploads-config
mountPath: "/.mc/share/uploads.json"
readOnly: false
subPath: uploads.json
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.global.webhook.enabled }}
- name: webhook-config
configMap:
name: {{ include "common.names.fullname" . }}-webhook-config
items:
- key: config.json
path: "config.json"
- name: webhook-download-config
configMap:
name: {{ include "common.names.fullname" . }}-webhook-config
items:
- key: downloads.json
path: "downloads.json"
- name: webhook-uploads-config
configMap:
name: {{ include "common.names.fullname" . }}-webhook-config
items:
- key: uploads.json
path: "uploads.json"
{{- end }}
{{- if .Values.useCredentialsFile }}
- name: minio-credentials
secret:
secretName: {{ include "minio.secretName" . }}
{{- end }}
{{- if .Values.tls.enabled }}
- name: minio-certs
secret:
secretName: {{ .Values.tls.secretName }}
items:
- key: tls.crt
path: public.crt
- key: tls.key
path: private.key
- key: ca.crt
path: CAs/public.crt
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- if not .Values.persistence.enabled }}
- name: data
emptyDir: {}
{{- else }}
volumeClaimTemplates:
{{- if gt $drivesPerNode 1 }}
{{- range $diskId := until $drivesPerNode }}
- metadata:
name: data-{{ $diskId }}
labels: {{- include "common.labels.matchLabels" $ | nindent 10 }}
{{- if $.Values.persistence.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.persistence.annotations "context" $) | nindent 10 }}
{{- end }}
spec:
accessModes:
{{- range $.Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $.Values.persistence.size | quote }}
{{- include "common.storage.class" (dict "persistence" $.Values.persistence "global" $.Values.global) | nindent 8 }}
{{- end }}
{{- else }}
- metadata:
name: data
labels: {{- include "common.labels.matchLabels" . | nindent 10 }}
{{- if .Values.persistence.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,4 @@
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

View File

@@ -0,0 +1,197 @@
{{- if .Values.gateway.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.gateway.replicaCount }}
{{- if .Values.deployment.updateStrategy }}
strategy: {{- toYaml .Values.deployment.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.podAnnotations (include "minio.createSecret" .) }}
annotations:
{{- if (include "minio.createSecret" .) }}
checksum/credentials-secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- include "minio.imagePullSecrets" . | nindent 6 }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName }}
{{- end }}
serviceAccountName: {{ template "minio.serviceAccountName" . }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- if .Values.initContainers }}
initContainers: {- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: minio
image: {{ include "minio.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
command:
{{- if .Values.command }}
{{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- else }}
- minio
{{- end }}
args:
{{- if .Values.args }}
{{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- else }}
- --certs-dir
- /opt/bitnami/minio/certs
- gateway
- {{ .Values.gateway.type }}
{{- if eq .Values.gateway.type "gcs" }}
- {{ .Values.gateway.auth.gcs.projectID }}
{{- else if eq .Values.gateway.type "nas" }}
- {{ .Values.persistence.mountPath }}
{{- else if eq .Values.gateway.type "s3" }}
- {{ .Values.gateway.auth.s3.serviceEndpoint }}
{{- end }}
{{- end }}
env:
{{- if eq .Values.gateway.type "azure" }}
- name: AZURE_STORAGE_ACCOUNT
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: azure-storage-account-name
- name: AZURE_STORAGE_KEY
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: azure-storage-account-key
{{- else if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/opt/bitnami/minio/secrets/key.json"
{{- end }}
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: access-key
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: secret-key
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: {{ .Values.metrics.prometheusAuthType | quote }}
{{- if .Values.extraEnv }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnv "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
ports:
- name: minio
containerPort: {{ .Values.containerPort }}
protocol: TCP
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
volumeMounts:
{{- if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
- name: minio-credentials
mountPath: /opt/bitnami/minio/secrets/
readOnly: true
{{- end }}
{{- if eq .Values.gateway.type "nas" }}
- name: data
mountPath: {{ .Values.persistence.mountPath }}
subPath: {{ .Release.Namespace }}/{{ include "common.names.fullname" . }}
{{- if .Values.global.srs.pvc }}
- name: srs-vol
mountPath: /data/live-cluster-hls
subPath: {{ .Values.global.srs.mpath.cluster.hls }}
- name: srs-vol
mountPath: /data/live-cluster-dvr
subPath: {{ .Values.global.srs.mpath.cluster.dvr }}
- name: srs-vol
mountPath: /data/live-rtc-hls
subPath: {{ .Values.global.srs.mpath.rtc.hls }}
- name: srs-vol
mountPath: /data/live-rtc-dvr
subPath: {{ .Values.global.srs.mpath.rtc.dvr }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
- name: minio-credentials
secret:
secretName: {{ include "minio.secretName" . }}
{{- end }}
{{- if eq .Values.gateway.type "nas" }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "minio.claimName" . }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.global.srs.pvc }}
- name: srs-vol
persistentVolumeClaim:
claimName: {{ .Values.global.srs.pvc }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,57 @@
{{- if and .Values.ingress.enabled (not .Values.disableWebUI ) -}}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "minio" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "minio" "context" $) | nindent 14 }}
{{- end }}
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
tls:
{{- if .Values.ingress.tls }}
- hosts:
- {{ .Values.ingress.hostname }}
secretName: {{ default (printf "%s-tls" .Values.ingress.hostname) .Values.ingress.existing.secretName }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,29 @@
{{- if (include "minio.createPVC" .) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.persistence.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.persistence.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.persistence.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 2 }}
{{- end }}

View File

@@ -0,0 +1,18 @@
{{- if (include "minio.createSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
access-key: {{ include "minio.secret.userValue" . | b64enc | quote }}
secret-key: {{ include "minio.secret.passwordValue" . | b64enc | quote }}
{{- end }}

View File

@@ -0,0 +1,45 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.middleware.minio" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if eq .Values.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- name: minio
port: {{ .Values.service.port }}
targetPort: {{ .Values.containerPort }}
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
nodePort: {{ .Values.service.nodePort }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.global.webhook.enabled }}
- name: minio-webhook
port: {{ .Values.global.webhook.port }}
targetPort: minio-webhook
protocol: TCP
{{- end }}
selector: {{- include "common.labels.matchLabels.minio" . | nindent 4 }}

View File

@@ -0,0 +1,16 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "minio.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
secrets:
- name: {{ include "common.names.fullname" . }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{- if .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "common.names.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: minio
path: {{ .Values.metrics.serviceMonitor.path }}
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabellings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.relabellings | nindent 6 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
{{- end }}

View File

@@ -0,0 +1,235 @@
{{- if .Values.enabled }}
{{- if and (eq .Values.mode "standalone") (not .Values.gateway.enabled) }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.middleware.minio" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.deployment.updateStrategy }}
strategy: {{- toYaml .Values.deployment.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels.minio" . | nindent 6 }}
template:
metadata:
labels: {{- include "common.labels.middleware.minio" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.podAnnotations (include "minio.createSecret" .) }}
annotations:
{{- if (include "minio.createSecret" .) }}
checksum/credentials-secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- include "minio.imagePullSecrets" . | nindent 6 }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName }}
{{- end -}}
serviceAccountName: {{ template "minio.serviceAccountName" . -}}
{{- if .Values.global.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.global.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
{{- /* podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.global.podAffinityPreset "context" $) | nindent 10 -}}*/}}
{{- /* podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.global.podAntiAffinityPreset "context" $) | nindent 10 }}*/}}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.global.nodeAffinityPreset.type "key" .Values.global.nodeAffinityPreset.key "values" .Values.global.nodeAffinityPreset.values) | nindent 10 -}}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- if or .Values.initContainers (and .Values.volumePermissions.enabled .Values.persistence.enabled) }}
initContainers:
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions
image: {{ template "minio.volumePermissions.image" . }}
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} {{ .Values.persistence.mountPath }}
securityContext:
runAsUser: 0
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- end }}
{{- end }}
containers:
- name: minio
image: "{{ .Values.global.image.repository | default .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
- name: MINIO_FORCE_NEW_KEYS
value: {{ ternary "yes" "no" .Values.forceNewKeys | quote }}
{{- if .Values.useCredentialsFile }}
- name: MINIO_ACCESS_KEY_FILE
value: "/opt/bitnami/minio/secrets/access-key"
{{- else }}
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: access-key
{{- end }}
{{- if .Values.useCredentialsFile }}
- name: MINIO_SECRET_KEY_FILE
value: "/opt/bitnami/minio/secrets/secret-key"
{{- else }}
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "minio.secretName" . }}
key: secret-key
{{- end }}
{{- if .Values.defaultBuckets }}
- name: MINIO_DEFAULT_BUCKETS
value: {{ .Values.defaultBuckets }}
{{- end }}
- name: MINIO_BROWSER
value: {{ ternary "off" "on" .Values.disableWebUI | quote }}
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: {{ .Values.metrics.prometheusAuthType | quote }}
{{- if .Values.extraEnv }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnv "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
ports:
- name: minio
containerPort: {{ .Values.containerPort }}
protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /minio/health/live
port: minio
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- else if .Values.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
tcpSocket:
port: minio
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
tcpSocket:
port: minio
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.useCredentialsFile }}
- name: minio-credentials
mountPath: /opt/bitnami/minio/secrets/
{{- end }}
- name: data
mountPath: {{ .Values.persistence.mountPath }}
- name: srs-vol
mountPath: /data/live-cluster-hls
subPath: {{ .Release.Namespace }}/helm-srs/cluster/hls/default
- name: srs-vol
mountPath: /data/live-cluster-dvr
subPath: {{ .Release.Namespace }}/helm-srs/cluster/dvr
- name: srs-vol
mountPath: /data/live-rtc-hls
subPath: {{ .Release.Namespace }}/helm-srs/rtc/hls/default
- name: srs-vol
mountPath: /data/live-rtc-dvr
subPath: {{ .Release.Namespace }}/helm-srs/rtc/dvr
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.useCredentialsFile }}
- name: minio-credentials
secret:
secretName: {{ include "minio.secretName" . }}
{{- end }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "minio.claimName" . }}
{{- else }}
emptyDir: {}
{{- end }}
- name: srs-vol
persistentVolumeClaim:
claimName: glusterfs-middleware-srs-pvc
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,46 @@
{{- if .Values.ingress.enabled }}
{{- if .Values.ingress.secrets }}
{{- if not .Values.ingress.existing.secretName }}
{{- range .Values.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ $.Release.Namespace }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.ingress.tls (not .Values.ingress.certManager) }}
{{- $ca := genCA "minio-ca" 365 }}
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls" .Values.ingress.hostname }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
ca.crt: {{ $ca.Cert | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,40 @@
{{- if .Values.global.webhook.enabled }}
{{- $namespace := .Release.Namespace -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-webhook-config
namespace: {{ $namespace }}
labels:
cmii.additional: webhook
{{- include "common.labels.standard" . | nindent 4 }}
data:
minio_notify_webhook_enable_1: "on"
minio_notify_webhook_endpoint_1: "http://127.0.0.1:{{ .Values.global.webhook.port }}/minio/events"
minio_notify_webhook_queue_dir_1: ""
config.json: |
{
"version": "10",
"aliases": {
"server": {
"url": "http://127.0.0.1:{{ .Values.containerPort }}",
"accessKey": "{{ .Values.gateway.auth.nas.accessKey }}",
"secretKey": "{{ .Values.gateway.auth.nas.secretKey }}",
"api": "S3v4",
"path": "auto"
}
}
}
downloads.json: |
{
"version": "1",
"shares": {}
}
uploads.json: |
{
"version": "1",
"shares": {}
}
---
{{- end }}

View File

@@ -0,0 +1,470 @@
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
##
global:
imagePullSecrets: []
webhook:
enabled: false
port: 3000
enabled: true
## MinIO(R) server mode. Allowed values: standalone or distributed.
## ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
mode: standalone
## Bitnami MinIO(R) image version
## ref: https://hub.docker.com/r/bitnami/minio/tags/
##
image:
repository: docker.io/bitnami
name: minio
tag: 2021.3.26-debian-10-r0
pullPolicy: IfNotPresent
pullSecrets: []
debug: false
## Extra volumes to add to the MinIO(R) statefulset
##
extraVolumes: []
## Extra volume mounts to add to MinIO(R) containers
##
extraVolumeMounts: []
## MinIO(R) credentials
##
accessKey:
## MinIO(R) Access Key
## ref: https://github.com/bitnami/bitnami-docker-minio/#setting-up-minio-in-distributed-mode
##
password: cmii
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
## If it is not force, a random password will be generated.
forcePassword: false
secretKey:
## MinIO(R) Secret Key
## ref: https://github.com/bitnami/bitnami-docker-minio/#setting-up-minio-in-distributed-mode
password: B#923fC7mk
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
## If it is not force, a random password will be generated.
forcePassword: false
## Comma, semi-colon or space separated list of buckets to create at initialization
##
# defaultBuckets: "my-bucket, my-second-bucket"
## Disable MinIO(R) Web UI
## ref: https://github.com/minio/minio/tree/master/docs/config/#browser
##
disableWebUI: false
## MinIO(R) statefulset parameters
## Only when mode is 'distributed'
##
statefulset:
updateStrategy: RollingUpdate
podManagementPolicy: Parallel
replicaCount: 4
## Number of expanded MinIO(R) clusters
zones: 1
## Number of drives (PVC) attached to every node
drivesPerNode: 1
## MinIO(R) container ports to open
##
containerPort: 9000
## MinIO(R) Service properties
##
service:
type: NodePort
nodePort: 36677
port: 9000
# common no usage
loadBalancerSourceRanges: [] # common no usage
externalTrafficPolicy: Cluster # common no usage
annotations: {} # common no usage
ingress:
enabled: false
certManager: false
apiVersion:
hostname: minio.ig-dev.uavcmlc.com
path: /
pathType: ImplementationSpecific
servicePort: minio
tls: false
existing:
secretName: x.ig-dev.uavcmlc.com-tls
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
annotations: {}
extraHosts: []
extraPaths: []
extraTls: []
secrets: []
## Bitnami MinIO(R) Client image version
## ref: https://hub.docker.com/r/bitnami/minio-client/tags/
##
clientImage:
registry: docker.io
repository: bitnami/minio-client
tag: 2021.3.23-debian-10-r3
# -------------------------------------------------------------------------------------------------------
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
enabled: true
storageClass: heketi-glusterfs-distribute
mountPath: /data
accessModes:
- ReadWriteOnce
size: 200Gi
annotations: {}
## Enable persistence using an existing PVC (only in standalone mode)
# standalone mode is commonly used, so pvc name below should be equal to the name of the minio
existingClaim: helm-minio
resources:
limits:
cpu: 2000m
memory: 1500Mi
requests:
cpu: 250m
memory: 256Mi
## Use existing secret (ignores accessKey, and secretKey passwords)
##
# existingSecret:
## Configure extra options for liveness, readiness and startup probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
##
livenessProbe:
enabled: true
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 10
readinessProbe:
enabled: true
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
startupProbe:
enabled: false
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 10
## Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
## Only when 'mode' is 'standalone' or 'gateway.enabled' is 'true'
##
deployment:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
## Enable tls in front of MinIO(R) containers.
##
tls:
enabled: false
secretName: ""
## The mounted path where the secret will be located
## Custom mount path where the certificates will be located, if empty will default to /certs
mountPath: ""
podLabels: {}
podAnnotations: {}
## Cluster domain
##
clusterDomain: cluster.local
affinity: {}
podAffinityPreset: ""
podAntiAffinityPreset: soft
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
type: ""
## Node label key to match
## key: "kubernetes.io/e2e-az-name"
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
values: []
nodeSelector: {}
tolerations: []
## Mount MinIO(R) secret as a file instead of passing environment variable
##
useCredentialsFile: false
## Force reconfiguring new keys whenever the credentials change
##
forceNewKeys: false
## MinIO(R) pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## ----------------------------------------------------------------------------------------------------------
## ----------------------------------------------------------------------------------------------------------
## --------------------------------------------- 下面的基本没用 -----------------------------------------------
## Extra objects to deploy (value evaluated as a template)
##
extraDeploy: []
## An array to add extra env vars
## e.g:
## extraEnv:
## - name: FOO
## value: "bar"
##
extraEnv: {}
## ConfigMap with extra environment variables
##
extraEnvVarsCM: ""
## Secret with extra environment variables
##
extraEnvVarsSecret: ""
## Command and args for running the MinIO(R) container (set to default if not set). Use array form
##
command:
- minio
args:
- '--certs-dir'
- /opt/bitnami/minio/certs
- gateway
- nas
- /data
## Scheduler name
## https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
# schedulerName: stork
## String to partially override common.names.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override common.names.fullname template
##
fullnameOverride: helm-minio
## Add labels to all the deployed resources
##
commonLabels: {}
## Add annotations to all the deployed resources
##
commonAnnotations: {}
## Force target Kubernetes version (using Helm capabilites if not set)
##
kubeVersion:
## Custom Liveness, Readiness, and Startup probes for MinIO(R)
##
customLivenessProbe: {}
customReadinessProbe: {}
customStartupProbe: {}
## Add init containers to the MinIO(R) pods.
## e.g:
## initContainers:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
initContainers: {}
## Add sidecars to the MinIO(R) pods.
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: {}
## Init containers parameters:
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
##
volumePermissions:
enabled: false
image:
registry: docker.io
repository: bitnami/bitnami-shell
tag: "10"
pullPolicy: Always
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
## e.g:
## pullSecrets:
## - myRegistryKeySecretName
##
pullSecrets: []
## Init container' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
limits: {}
requests: {}
## Specifies whether a ServiceAccount should be created
##
serviceAccount:
create: true
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the common.names.fullname template
##
name: ""
## MinIO(R) Pod Disruption Budget configuration (only in distributed mode)
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
##
pdb:
create: false
## Min number of pods that must still be available after the eviction
##
minAvailable: 1
## Max number of pods that can be unavailable after the eviction
##
# maxUnavailable: 1
## Metrics configuration
##
metrics:
## MinIO(R) supports two authentication modes for Prometheus either jwt or public, by default MinIO(R) runs in jwt mode.
## To allow public access without authentication for prometheus metrics set environment as follows.
##
prometheusAuthType: public
## Prometheus Operator ServiceMonitor configuration
##
serviceMonitor:
## If the operator is installed in your cluster, set to true to create a Service Monitor Entry
##
enabled: false
## Specify the namespace in which the serviceMonitor resource will be created
##
# namespace: ""
## HTTP path to scrape for metrics
##
path: /minio/v2/metrics/cluster
## Specify the interval at which metrics should be scraped
##
interval: 30s
## Specify the timeout after which the scrape is ended
##
# scrapeTimeout: 30s
## Specify Metric Relabellings to add to the scrape endpoint
##
# relabellings:
## Specify honorLabels parameter to add the scrape endpoint
##
honorLabels: false
## Specify the release for ServiceMonitor. Sometimes it should be custom for prometheus operator to work
##
# release: ""
## Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
##
additionalLabels: {}
## MinIO(R) Gateway configuration
##
gateway:
## Use MinIO(R) as Gateway for other storage systems
##
enabled: false
## Gateway type
## Current supported types are: azure, gcs, nas, and s3
## ref: https://docs.minio.io/docs/minio-gateway-for-azure
## ref: https://docs.minio.io/docs/minio-gateway-for-gcs
## ref: https://docs.minio.io/docs/minio-gateway-for-nas
## ref: https://docs.minio.io/docs/minio-gateway-for-s3
##
type: s3
## Number of Gateway replicas
##
replicaCount: 4
## Gateway authentication configuration
##
auth:
## Authentication configuration for Azure
## Ignored unless type=azure
##
azure:
accessKey: ""
secretKey: ""
storageAccountName: ""
storageAccountKey: ""
## Authentication configuration for GCS
## Ignored unless type=gcs
##
gcs:
accessKey: ""
secretKey: ""
keyJSON: ""
projectID: ""
## Authentication configuration for NAS
## Ignored unless type=nas
##
nas:
accessKey: ""
secretKey: ""
## Authentication configuration for S3
## Ignored unless type=s3
##
s3:
accessKey: ""
secretKey: ""
serviceEndpoint: https://s3.amazonaws.com