Skip to content

Commit

Permalink
New Tenant CRD with multi Statefulset Support
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia committed Jul 22, 2020
1 parent c6a3690 commit ea7721a
Show file tree
Hide file tree
Showing 42 changed files with 1,149 additions and 555 deletions.
8 changes: 4 additions & 4 deletions examples/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ metadata:
name: minio
spec:
zones:
- name: "zone-0"
## Number of MinIO servers/pods in zone-0.
- volumesPerServer: 4
## Number of MinIO servers/pods in zone 0.
servers: 4
- name: "zone-1"
## Number of MinIO servers/pods in zone-1.
- volumesPerServer: 4
## Number of MinIO servers/pods in zone 1.
servers: 4
61 changes: 30 additions & 31 deletions examples/tenant-mcs.yaml → examples/tenant-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,30 @@ spec:
credsSecret:
name: minio-creds-secret
zones:
- name: "zone-0"
- volumesPerServer: 4
## Number of MinIO servers/pods in this zone.
## For standalone mode, supply 1. For distributed mode, supply 4 or more.
## Note that the operator does not support upgrading from standalone to distributed mode.
servers: 4
## Supply number of volumes to be mounted per MinIO server instance.
volumesPerServer: 4
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
## Mount path where PV will be mounted inside container(s). Defaults to "/export".
mountPath: /export
## Sub path inside Mount path where MinIO starts. Defaults to "".
# subPath: /data
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti

## Define configuration for MCS (Graphical user interface for MinIO)
mcs:
console:
image: minio/mcs:v0.2.0
replicas: 2
mcsSecret:
Expand All @@ -110,22 +109,22 @@ spec:
commonName: ""
organizationName: []
dnsNames: []
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:4"
## Configure resource requests and limits for MinIO containers
# resources:
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:4"
## Configure resource requests and limits for MinIO containers
# resources:
# requests:
# memory: 20Gi
# memory: 20Gi
## Liveness probe detects situations where MinIO server instance
## is not working properly and needs restart. Kubernetes automatically
## restarts the pods if liveness checks fail.
Expand Down
62 changes: 31 additions & 31 deletions examples/tenant-kes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,31 @@ spec:
credsSecret:
name: minio-creds-secret
zones:
- name: "zone-0"
- volumesPerServer: 4
## Number of MinIO servers/pods in this zone.
## For standalone mode, supply 1. For distributed mode, supply 4 or more.
## Note that the operator does not support upgrading from standalone to distributed mode.
servers: 4
## Supply number of volumes to be mounted per MinIO server instance.
volumesPerServer: 4
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti

## Mount path where PV will be mounted inside container(s). Defaults to "/export".
mountPath: /export
## Sub path inside Mount path where MinIO starts. Defaults to "".
# subPath: /data
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti

## Define configuration for MCS (Graphical user interface for MinIO)
mcs:
console:
image: minio/mcs:v0.2.0
replicas: 2
mcsSecret:
Expand Down Expand Up @@ -123,22 +123,22 @@ spec:
commonName: ""
organizationName: []
dnsNames: []
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:4"
## Configure resource requests and limits for MinIO containers
# resources:
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:4"
## Configure resource requests and limits for MinIO containers
# resources:
# requests:
# memory: 20Gi
# memory: 20Gi
## Liveness probe detects situations where MinIO server instance
## is not working properly and needs restart. Kubernetes automatically
## restarts the pods if liveness checks fail.
Expand Down
30 changes: 14 additions & 16 deletions examples/tenant-pod-security-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rules:
- "minio-pods-policy"
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: minio-pods-binding
roleRef:
Expand Down Expand Up @@ -100,29 +100,27 @@ spec:
## Service account to be used for all the MinIO Pods
serviceAccountName: minio-pods
zones:
- name: "zone-0"
- volumesPerServer: 4
## Number of MinIO servers/pods in this zone.
## For standalone mode, supply 1. For distributed mode, supply 4 or more.
## Note that the operator does not support upgrading from standalone to distributed mode.
servers: 4
## Supply number of volumes to be mounted per MinIO server instance.
volumesPerServer: 4
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
## Mount path where PV will be mounted inside container(s). Defaults to "/export".
mountPath: /export
## Sub path inside Mount path where MinIO starts. Defaults to "".
# subPath: /data
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
## Secret with credentials to be used by MinIO instance.
credsSecret:
name: minio-creds-secret
Expand Down
59 changes: 27 additions & 32 deletions examples/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,24 @@ spec:
## A ClusterIP Service will be created with the given name
serviceName: minio-internal-service
zones:
- name: "zone-0"
## Number of MinIO servers/pods in this zone.
## For standalone mode, supply 1. For distributed mode, supply 4 or more.
## Note that the operator does not support upgrading from standalone to distributed mode.
servers: 4
## Supply number of volumes to be mounted per MinIO server instance.
volumesPerServer: 4
- servers: 4
volumesPerServer: 4
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
## Mount path where PV will be mounted inside container(s). Defaults to "/export".
mountPath: /export
## Sub path inside Mount path where MinIO starts. Defaults to "".
# subPath: /data
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
## Secret with credentials to be used by MinIO instance.
credsSecret:
name: minio-creds-secret
Expand All @@ -90,22 +85,22 @@ spec:
commonName: ""
organizationName: []
dnsNames: []
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:2"
## Configure resource requests and limits for MinIO containers
# resources:
# requests:
# memory: 20Gi
## Used to specify a toleration for a pod
# tolerations:
# - effect: NoSchedule
# key: dedicated
# operator: Equal
# value: storage
## Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
# env:
# - name: MINIO_BROWSER
# value: "off" # to turn-off browser
# - name: MINIO_STORAGE_CLASS_STANDARD
# value: "EC:2"
## Configure resource requests and limits for MinIO containers
# resources:
# requests:
# memory: 20Gi
## Liveness probe detects situations where MinIO server instance
## is not working properly and needs restart. Kubernetes automatically
## restarts the pods if liveness checks fail.
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ require (
k8s.io/api v0.18.0
k8s.io/apimachinery v0.18.0
k8s.io/client-go v0.18.0
k8s.io/code-generator v0.18.6 // indirect
k8s.io/klog v1.0.0
)
Loading

0 comments on commit ea7721a

Please sign in to comment.