Make charts - minio

pull/389/head
Daniel Valdivia 2022-05-26 08:10:54 -07:00
parent 11c4b4e150
commit 19b6a90b75
19 changed files with 9355 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,22 @@
# 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
.vscode/

View File

@ -0,0 +1,22 @@
annotations:
catalog.cattle.io/certified: partner
catalog.cattle.io/display-name: Minio Operator
catalog.cattle.io/release-name: minio-operator
apiVersion: v2
appVersion: v4.4.17
description: A Helm chart for MinIO Operator
home: https://min.io
icon: https://min.io/resources/img/logo/MINIO_wordmark.png
keywords:
- storage
- object-storage
- S3
kubeVersion: '>=1.19.0-0'
maintainers:
- email: dev@minio.io
name: MinIO, Inc
name: minio-operator
sources:
- https://github.com/minio/operator
type: application
version: 4.4.1700

View File

@ -0,0 +1,45 @@
# MinIO ![license](https://img.shields.io/badge/license-AGPL%20V3-blue)
[MinIO](https://min.io) is a High Performance Object Storage released under GNU AGPLv3 or later. It is API compatible
with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics
and application data workloads.
For more detailed documentation please visit [here](https://docs.minio.io/)
Introduction
------------
This chart bootstraps MinIO Operator on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Configure MinIO Helm repo
--------------------
```bash
helm repo add minio https://operator.min.io/
```
Installing the Chart
--------------------
Install this chart using:
```bash
helm install \
--namespace minio-operator \
--create-namespace \
minio-operator minio/operator
```
The command deploys MinIO Operator on the Kubernetes cluster in the default configuration.
Creating a Tenant
-----------------
Once the MinIO Operator Chart is successfully installed, create a MinIO Tenant using:
```bash
helm install --namespace tenant-ns \
--create-namespace tenant minio/tenant
```
This creates a 4 Node MinIO Tenant (cluster). To change the default values, take a look at various [values.yaml](https://github.com/minio/operator/blob/master/helm/tenant/values.yaml).

View File

@ -0,0 +1,78 @@
# MinIO Operator
MinIO is a Kubernetes-native high performance object store with an S3-compatible API. The
MinIO Kubernetes Operator supports deploying MinIO Tenants onto private and public
cloud infrastructures ("Hybrid" Cloud).
## Procedure
### 1) Verify installation the MinIO Operator
Run the following command to verify the status of the Operator:
```sh
kubectl get pods -n minio-operator
```
The output resembles the following:
```sh
NAME READY STATUS RESTARTS AGE
console-6b6cf8946c-9cj25 1/1 Running 0 99s
minio-operator-69fd675557-lsrqg 1/1 Running 0 99s
```
The `console-*` pod runs the MinIO Operator Console, a graphical user
interface for creating and managing MinIO Tenants.
The `minio-operator-*` pod runs the MinIO Operator itself.
### 2) Access the Operator Console
Get the service-account token to access the UI:
```sh
kubectl -n minio-operator get secret $(kubectl -n minio-operator get serviceaccount console-sa -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode
```
Run the following command to create a local proxy to the MinIO Operator
Console:
```sh
kubectl -n minio-operator port-forward svc/console 9090
```
Open your browser to http://localhost:9090 and use the JWT token to log in
to the Operator Console.
Click **+ Create Tenant** to open the Tenant Creation workflow.
### 3) Build the Tenant Configuration
The Operator Console **Create New Tenant** walkthrough builds out
a MinIO Tenant. The following list describes the basic configuration sections.
- **Name** - Specify the *Name*, *Namespace*, and *Storage Class* for the new Tenant.
The *Storage Class* must correspond to a [Storage Class](#default-storage-class) that corresponds to [Local Persistent Volumes](#local-persistent-volumes) that can support the MinIO Tenant.
The *Namespace* must correspond to an existing [Namespace](#minio-tenant-namespace) that does *not* contain any other MinIO Tenant.
Enable *Advanced Mode* to access additional advanced configuration options.
- **Tenant Size** - Specify the *Number of Servers*, *Number of Drives per Server*, and *Total Size* of the Tenant.
The *Resource Allocation* section summarizes the Tenant configuration
based on the inputs above.
Additional configuration inputs may be visible if *Advanced Mode* was enabled
in the previous step.
- **Preview Configuration** - summarizes the details of the new Tenant.
After configuring the Tenant to your requirements, click **Create** to create the new tenant.
The Operator Console displays credentials for connecting to the MinIO Tenant. You *must* download and secure these credentials at this stage. You cannot trivially retrieve these credentials later.
You can monitor Tenant creation from the Operator Console.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
1. Get the JWT for logging in to the console:
kubectl get secret $(kubectl get serviceaccount console-sa --namespace {{ .Release.Namespace }} -o jsonpath="{.secrets[0].name}") --namespace {{ .Release.Namespace }} -o jsonpath="{.data.token}" | base64 --decode
2. Get the Operator Console URL by running these commands:
kubectl --namespace {{ .Release.Namespace }} port-forward svc/console 9090:9090
echo "Visit the Operator Console at http://127.0.0.1:9090"

View File

@ -0,0 +1,84 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "minio-operator.name" -}}
{{- default .Chart.Name | 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).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "minio-operator.fullname" -}}
{{- $name := default .Chart.Name -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Expand the name of the Operator Console.
*/}}
{{- define "minio-operator.console-name" -}}
{{- printf "%s-%s" .Chart.Name "console" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified console name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "minio-operator.console-fullname" -}}
{{- printf "%s-%s" .Release.Name "console" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "minio-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels for operator
*/}}
{{- define "minio-operator.labels" -}}
helm.sh/chart: {{ include "minio-operator.chart" . }}
{{ include "minio-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels Operator
*/}}
{{- define "minio-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "minio-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Common labels for console
*/}}
{{- define "minio-operator.console-labels" -}}
helm.sh/chart: {{ include "minio-operator.chart" . }}
{{ include "minio-operator.console-selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels Operator
*/}}
{{- define "minio-operator.console-selectorLabels" -}}
app.kubernetes.io/name: {{ include "minio-operator.name" . }}
app.kubernetes.io/instance: {{ printf "%s-%s" .Release.Name "console" }}
{{- end -}}

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: minio-operator-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: minio-operator-role
subjects:
- kind: ServiceAccount
name: minio-operator
namespace: {{ .Release.Namespace }}

View File

@ -0,0 +1,129 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: minio-operator-role
rules:
- apiGroups:
- "apiextensions.k8s.io"
resources:
- customresourcedefinitions
verbs:
- get
- update
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- update
- list
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- pods
- services
- events
- configmaps
verbs:
- get
- watch
- patch
- create
- list
- delete
- deletecollection
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- watch
- create
- update
- list
- delete
- deletecollection
- apiGroups:
- apps
resources:
- statefulsets
- deployments
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- "certificates.k8s.io"
resources:
- "certificatesigningrequests"
- "certificatesigningrequests/approval"
- "certificatesigningrequests/status"
verbs:
- update
- create
- get
- delete
- apiGroups:
- certificates.k8s.io
resourceNames:
- kubernetes.io/legacy-unknown
- kubernetes.io/kube-apiserver-client
- kubernetes.io/kubelet-serving
resources:
- signers
verbs:
- approve
- sign
- apiGroups:
- minio.min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- monitoring.coreos.com
resources:
- prometheuses
verbs:
- '*'
- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- update
- create

View File

@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "console"
namespace: {{ .Release.Namespace }}
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.console.replicaCount }}
selector:
matchLabels:
{{- include "minio-operator.console-selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "minio-operator.console-selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.operator.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: console-sa
{{- with .Values.console.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.console.image.repository }}:{{ .Values.console.image.tag }}"
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
ports:
- containerPort: 9090
name: http
- containerPort: 9443
name: https
args:
- server
env:
- name: CONSOLE_OPERATOR_MODE
value: "on"
{{- with .Values.console.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.console.resources | nindent 12 }}
volumeMounts:
{{- with .Values.console.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
{{- with .Values.console.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end}}

View File

@ -0,0 +1,50 @@
{{- if .Values.console.ingress.enabled }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "minio-operator.console-fullname" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.console.ingress.labels }}
labels: {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.console.ingress.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.console.ingress.ingressClassName }}
ingressClassName: {{ .Values.console.ingress.ingressClassName }}
{{- end }}
{{- if .Values.console.ingress.tls }}
tls:
{{- range .Values.console.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.console.ingress.host }}
http:
paths:
- path: {{ .Values.console.ingress.path }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
pathType: Prefix
backend:
service:
name: "console"
port:
name: http
{{- else }}
backend:
serviceName: "console"
servicePort: http
{{ end }}
{{ end }}

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: "console"
namespace: {{ .Release.Namespace }}
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
spec:
ports:
- name: http
port: 9090
- name: https
port: 9443
selector:
{{- include "minio-operator.console-selectorLabels" . | nindent 4 }}

View File

@ -0,0 +1,262 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: console-sa
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: console-sa-role
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- watch
- create
- list
- patch
- update
- deletecollection
- apiGroups:
- ""
resources:
- namespaces
- services
- events
- resourcequotas
- nodes
verbs:
- get
- watch
- create
- list
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- create
- list
- patch
- delete
- deletecollection
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- deletecollection
- list
- get
- watch
- update
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- watch
- create
- list
- patch
- apiGroups:
- apps
resources:
- statefulsets
- deployments
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
- certificatesigningrequests/approval
- certificatesigningrequests/status
verbs:
- update
- create
- get
- apiGroups:
- minio.min.io
resources:
- '*'
verbs:
- '*'
- apiGroups:
- min.io
resources:
- '*'
verbs:
- '*'
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- list
- watch
- create
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- list
- watch
- update
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
verbs:
- get
- list
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotcontents
verbs:
- get
- list
- apiGroups:
- storage.k8s.io
resources:
- csinodes
verbs:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- volumeattachments
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- direct.csi.min.io
resources:
- volumes
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- direct.csi.min.io
resources:
- directcsidrives
- directcsivolumes
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- ""
resources:
- pod
- pods/log
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: console-sa-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: console-sa-role
subjects:
- kind: ServiceAccount
name: console-sa
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"
kind: ConfigMap
metadata:
name: console-env
namespace: {{ .Release.Namespace }}

View File

@ -0,0 +1,67 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "minio-operator"
namespace: {{ .Release.Namespace }}
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.operator.replicaCount }}
selector:
matchLabels:
{{- include "minio-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "minio-operator.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.operator.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: minio-operator
{{- with .Values.operator.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag }}"
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
{{- with .Values.operator.env }}
env:
{{ toYaml . | nindent 10 }}
{{- end }}
resources:
{{- toYaml .Values.operator.resources | nindent 12 }}
{{- with .Values.operator.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end}}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: name
operator: In
values:
- minio-operator
topologyKey: kubernetes.io/hostname

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: "operator"
namespace: {{ .Release.Namespace }}
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 4222
name: https
selector:
operator: leader
{{- include "minio-operator.selectorLabels" . | nindent 4 }}

View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: minio-operator
namespace: {{ .Release.Namespace }}
labels:
{{ include "minio-operator.labels" . | nindent 4 }}

View File

@ -0,0 +1,60 @@
# Default values for minio-operator.
operator:
## Setup environment variables for the Operator
# env:
# - name: MINIO_OPERATOR_TLS_ENABLE
# value: "off"
# - name: CLUSTER_DOMAIN
# value: "cluster.domain"
# - name: WATCHED_NAMESPACE
# value: ""
image:
repository: minio/operator
tag: v4.4.17
pullPolicy: IfNotPresent
imagePullSecrets: [ ]
initcontainers: [ ]
replicaCount: 2
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
fsGroup: 1000
nodeSelector: { }
affinity: { }
tolerations: [ ]
topologySpreadConstraints: [ ]
resources:
requests:
cpu: 200m
memory: 256Mi
ephemeral-storage: 500Mi
console:
image:
repository: minio/console
tag: v0.16.1
pullPolicy: IfNotPresent
imagePullSecrets: [ ]
initcontainers: [ ]
replicaCount: 1
nodeSelector: { }
affinity: { }
tolerations: [ ]
topologySpreadConstraints: [ ]
resources: { }
securityContext:
runAsUser: 1000
runAsNonRoot: true
ingress:
enabled: false
ingressClassName: ""
labels: { }
annotations: { }
tls: [ ]
host: console.local
path: /
volumes: [ ]
volumeMounts: [ ]

View File

@ -2901,6 +2901,33 @@ entries:
urls: urls:
- assets/linkerd/linkerd2-2.11.0.tgz - assets/linkerd/linkerd2-2.11.0.tgz
version: 2.11.0 version: 2.11.0
minio-operator:
- annotations:
catalog.cattle.io/certified: partner
catalog.cattle.io/display-name: Minio Operator
catalog.cattle.io/release-name: minio-operator
apiVersion: v2
appVersion: v4.4.17
created: "2022-05-26T08:10:52.276674-07:00"
description: A Helm chart for MinIO Operator
digest: 32bb04a65a54bcdace7f0c7deaf0c236dcb401c3f2902e564bad5df8bca559a3
home: https://min.io
icon: https://min.io/resources/img/logo/MINIO_wordmark.png
keywords:
- storage
- object-storage
- S3
kubeVersion: '>=1.19.0-0'
maintainers:
- email: dev@minio.io
name: MinIO, Inc
name: minio-operator
sources:
- https://github.com/minio/operator
type: application
urls:
- assets/minio/minio-operator-4.4.1700.tgz
version: 4.4.1700
nats: nats:
- annotations: - annotations:
catalog.cattle.io/certified: partner catalog.cattle.io/certified: partner