mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
add support to minio bootstrap (#2061)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
description: Distributed object storage server built for cloud applications and devops.
|
||||
name: minio
|
||||
version: 0.2.1
|
||||
version: 0.3.0
|
||||
keywords:
|
||||
- storage
|
||||
- object-storage
|
||||
|
||||
@@ -90,6 +90,10 @@ The following tables lists the configurable parameters of the Minio chart and th
|
||||
| `persistence.storageClass` | Type of persistent volume claim | `generic` |
|
||||
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | `ReadWriteOnce` |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` |
|
||||
| `defaultBucket.enabled` | If true, a bucket will be created after minio
|
||||
install | `false` |
|
||||
| `defaultBucket.name` | Bucket name | `nil` |
|
||||
| `defaultBucket.policy` | Bucket policy | `download` |
|
||||
|
||||
Some of the parameters above map to the env variables defined in the [Minio DockerHub image](https://hub.docker.com/r/minio/minio/).
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{{- if .Values.defaultBucket.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-create-bucket
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: minio-mc
|
||||
image: minio/mc
|
||||
command: ["/bin/sh", "-c",
|
||||
"/usr/bin/mc config host add myminio http://$MINIO_ENDPOINT:9000 $MINIO_ACCESS_KEY $MINIO_SECRET_KEY;
|
||||
/usr/bin/mc rm -r --force myminio/{{ .Values.defaultBucket.name }};
|
||||
/usr/bin/mc mb myminio/{{ .Values.defaultBucket.name }};
|
||||
/usr/bin/mc policy {{ .Values.defaultBucket.policy }} myminio/{{ .Values.defaultBucket.name }};"]
|
||||
env:
|
||||
- name: MINIO_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}-user
|
||||
key: accesskey
|
||||
- name: MINIO_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}-user
|
||||
key: secretkey
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ template "fullname" . }}-svc
|
||||
{{- end }}
|
||||
@@ -54,7 +54,16 @@ resources:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
|
||||
## Below settings can be used to setup event notifications as explained here.
|
||||
|
||||
## Create a bucket after minio install
|
||||
##
|
||||
defaultBucket:
|
||||
enabled: false
|
||||
## If enabled, must be a string with length > 0
|
||||
# name: example
|
||||
## Can be one of none|download|upload|public
|
||||
# policy: download
|
||||
|
||||
## https://docs.minio.io/docs/minio-bucket-notification-guide
|
||||
##
|
||||
minioConfig:
|
||||
|
||||
Reference in New Issue
Block a user