Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/minio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions stable/minio/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- if eq .Values.serviceType "ClusterIP" }}
Minio can be accessed via port {{ .Values.servicePort }} on the following DNS name from within your cluster:
{{ template "fullname" . }}-svc.{{ .Release.Namespace }}.svc.cluster.local
{{ template "minio.fullname" . }}-svc.{{ .Release.Namespace }}.svc.cluster.local

To access Minio from localhost, run the below commands:

1. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
1. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "minio.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")

2. kubectl port-forward $POD_NAME 9000 --namespace {{ .Release.Namespace }}

Expand All @@ -14,31 +14,31 @@ You can now access Minio server on http://localhost:9000. Follow the below steps

1. Download the Minio mc client - https://docs.minio.io/docs/minio-client-quickstart-guide

2. mc config host add {{ template "fullname" . }}-local http://localhost:9000 {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4
2. mc config host add {{ template "minio.fullname" . }}-local http://localhost:9000 {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4

3. mc ls {{ template "fullname" . }}-local
3. mc ls {{ template "minio.fullname" . }}-local

Alternately, you can use your browser or the Minio SDK to access the server - https://docs.minio.io/categories/17
{{- end }}
{{- if eq .Values.serviceType "LoadBalancer" }}
Minio can be accessed via port {{ .Values.servicePort }} on an external IP address. Get the service external IP address by:
kubectl get svc --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }}
kubectl get svc --namespace {{ .Release.Namespace }} -l app={{ template "minio.fullname" . }}

Note that the public IP may take a couple of minutes to be available.

You can now access Minio server on http://<External-IP>:9000. Follow the below steps to connect to Minio server with mc client:

1. Download the Minio mc client - https://docs.minio.io/docs/minio-client-quickstart-guide

2. mc config host add {{ template "fullname" . }}-local http://<External-IP>:{{ .Values.servicePort }} {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4
2. mc config host add {{ template "minio.fullname" . }}-local http://<External-IP>:{{ .Values.servicePort }} {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4

3. mc ls {{ template "fullname" . }}-local
3. mc ls {{ template "minio.fullname" . }}-local

Alternately, you can use your browser or the Minio SDK to access the server - https://docs.minio.io/categories/17
{{- end }}

{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
Note: Since NetworkPolicy is enabled, only pods with label
{{ template "fullname" . }}-client=true"
{{ template "minio.fullname" . }}-client=true"
will be able to connect to this minio cluster.
{{- end }}
6 changes: 3 additions & 3 deletions stable/minio/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "minio.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- define "minio.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for networkpolicy.
*/}}
{{- define "networkPolicy.apiVersion" -}}
{{- define "minio.networkPolicy.apiVersion" -}}
{{- if and (ge .Capabilities.KubeVersion.Minor "4") (le .Capabilities.KubeVersion.Minor "6") -}}
{{- print "extensions/v1beta1" -}}
{{- else if ge .Capabilities.KubeVersion.Minor "7" -}}
Expand Down
20 changes: 10 additions & 10 deletions stable/minio/templates/minio_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -14,12 +14,12 @@ spec:
{{- end }}
selector:
matchLabels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
template:
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -34,16 +34,16 @@ spec:
- name: export
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
claimName: {{ template "minio.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
- name: minio-server-config
configMap:
name: {{ template "fullname" . }}-config-cm
name: {{ template "minio.fullname" . }}-config-cm
- name: minio-user
secret:
secretName: {{ template "fullname" . }}-user
secretName: {{ template "minio.fullname" . }}-user
containers:
- name: minio
image: {{ .Values.image }}:{{ .Values.imageTag }}
Expand All @@ -68,12 +68,12 @@ spec:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-user
name: {{ template "minio.fullname" . }}-user
key: accesskey
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-user
name: {{ template "minio.fullname" . }}-user
key: secretkey
livenessProbe:
tcpSocket:
Expand Down
10 changes: 5 additions & 5 deletions stable/minio/templates/minio_networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{{- if .Values.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ template "networkPolicy.apiVersion" . }}
apiVersion: {{ template "minio.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
podSelector:
matchLabels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
ingress:
- ports:
- port: {{ .Values.servicePort }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels:
{{ template "fullname" . }}-client: "true"
{{ template "minio.fullname" . }}-client: "true"
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion stable/minio/templates/minio_pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
spec:
accessModes:
{{- if eq .Values.mode "shared" }}
Expand Down
4 changes: 2 additions & 2 deletions stable/minio/templates/minio_secret.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}-user
name: {{ template "minio.fullname" . }}-user
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand Down
28 changes: 14 additions & 14 deletions stable/minio/templates/minio_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -17,39 +17,39 @@ spec:
targetPort: {{ .Values.servicePort }}
protocol: TCP
selector:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
serviceName: {{ template "fullname" . }}
serviceName: {{ template "minio.fullname" . }}
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
template:
metadata:
name: {{ template "fullname" . }}
name: {{ template "minio.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
volumes:
- name: minio-user
secret:
secretName: {{ template "fullname" . }}-user
secretName: {{ template "minio.fullname" . }}-user
- name: minio-server-config
configMap:
name: {{ template "fullname" . }}-config-cm
name: {{ template "minio.fullname" . }}-config-cm
- name: podinfo
downwardAPI:
items:
Expand All @@ -67,7 +67,7 @@ spec:
args:
- server
{{- range $i := until $nodeCount }}
- http://{{ template "fullname" $ }}-{{ $i }}.{{ template "fullname" $ }}.{{ $.Release.Namespace }}.svc.cluster.local{{ $.Values.mountPath }}
- http://{{ template "minio.fullname" $ }}-{{ $i }}.{{ template "minio.fullname" $ }}.{{ $.Release.Namespace }}.svc.cluster.local{{ $.Values.mountPath }}
{{- end }}
{{- end }}
volumeMounts:
Expand All @@ -85,12 +85,12 @@ spec:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-user
name: {{ template "minio.fullname" . }}-user
key: accesskey
- name: MINIO_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-user
name: {{ template "minio.fullname" . }}-user
key: secretkey
resources:
{{ toYaml .Values.resources | indent 12 }}
Expand Down
6 changes: 3 additions & 3 deletions stable/minio/templates/minio_svc.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
kind: Service
apiVersion: v1
metadata:
name: {{ template "fullname" . }}-svc
name: {{ template "minio.fullname" . }}-svc
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand All @@ -13,7 +13,7 @@ spec:
loadBalancerIP: {{ default "" .Values.minioLoadBalancerIP }}
{{- end }}
selector:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
ports:
- name: service
port: 9000
Expand Down
4 changes: 2 additions & 2 deletions stable/minio/templates/minioconfig_configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fullname" . }}-config-cm
name: {{ template "minio.fullname" . }}-config-cm
labels:
app: {{ template "fullname" . }}
app: {{ template "minio.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand Down