mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 06:47:24 +08:00
* Setup provisioning job * Add values, comments, list mc aliases * Fix resources * Setup values for local testing * Bump chart version * Add temp gitignore for charts folder * Update provisioning-job.yaml * Complete job setup * Add groups, users, buckets, retentions provisioning * Add lifecycle rules * Add lifecycle condition * Add bucket quota * Add config options provisioning * Set default values back * Remove mc admin service restart as it restarts all nodes at once * Add group.members, remove user.groups * Add user and group policy assignment * Add tags, refactor script template * Dedupe enable/disable on users and groups * Remove comments, EOF broken * Update values.yaml * Remove retentions * Test distributed mode, fix script * Update .gitignore * Delete templated.yaml * Update provisioning-job.yaml * Add support for credential files * Add docs * Delete .gitignore * Complete todos, use minio image in job init container for wait-for-port * Copy command and args from statefulset. Add provisioning values * Add extraVolumes and extraVolumeMounts * Regenerate readme
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
{{- if .Values.provisioning.enabled }}
|
|
{{- $fullname := printf "%s-provisioning" (include "common.names.fullname" .) }}
|
|
{{- $releaseNamespace := .Release.Namespace }}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ $fullname }}
|
|
namespace: {{ $releaseNamespace }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: minio-provisioning
|
|
{{- 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 }}
|
|
data:
|
|
{{- range $bucket := .Values.provisioning.buckets }}
|
|
{{- if $bucket.lifecycle }}
|
|
{{ $bucket.name }}.json: |
|
|
{
|
|
"Rules": [
|
|
{{- range $idx, $lifecycle := $bucket.lifecycle }}
|
|
{{- if not (eq $idx 0) }}
|
|
,
|
|
{{- end }}
|
|
{
|
|
"ID": "{{ $lifecycle.id }}",
|
|
"Status": "{{ ternary "Disabled" "Enabled" (and (not (empty $lifecycle.disabled)) $lifecycle.disabled) }}",
|
|
{{- if $lifecycle.expiry }}
|
|
"Expiration": {
|
|
{{- with $lifecycle.expiry.date }}
|
|
"Date": "{{ . }}"
|
|
{{- end }}
|
|
{{- with $lifecycle.expiry.days }}
|
|
"Days": {{ . }}
|
|
{{- end }}
|
|
}
|
|
{{- with $lifecycle.expiry.nonconcurrentDays }}
|
|
,
|
|
"NoncurrentVersionExpiration": {
|
|
"NoncurrentDays": {{ . }}
|
|
}
|
|
{{- end }}
|
|
{{- with $lifecycle.prefix }}
|
|
,
|
|
"Filter": {
|
|
"Prefix": "{{ . }}"
|
|
}
|
|
{{- end }}
|
|
}
|
|
{{- end }}
|
|
{{- end }}
|
|
]
|
|
}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|