diff --git a/examples/tenant-encryption.yaml b/examples/tenant-encryption.yaml index 9c7acd96e00..4191a664ff2 100644 --- a/examples/tenant-encryption.yaml +++ b/examples/tenant-encryption.yaml @@ -102,10 +102,12 @@ metadata: prometheus.io/path: /minio/prometheus/metrics prometheus.io/port: "9000" prometheus.io/scrape: "true" + ## If a scheduler is specified here, Tenant pods will be dispatched by specified scheduler. ## If not specified, the Tenant pods will be dispatched by default scheduler. # scheduler: # name: my-custom-scheduler + spec: ## Registry location and Tag to download MinIO Server image image: minio/minio:RELEASE.2020-09-26T03-44-56Z @@ -122,8 +124,10 @@ spec: ## 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 - ## volumesPerServer specifies the number of volumes attached per MinIO Tenant Pod / Server. + + ## volumesPerServer specifies the number of volumes attached per MinIO Tenant Pod / Server. volumesPerServer: 4 + ## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO Tenant in this ## Zone. volumeClaimTemplate: @@ -135,6 +139,43 @@ spec: resources: requests: storage: 1Ti + + ## Used to specify a toleration for a pod + # tolerations: + # - effect: NoSchedule + # key: dedicated + # operator: Equal + # value: storage + + ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be + ## eligible to run on a node, the node must have each of the + ## indicated key-value pairs as labels. + ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # nodeSelector: + # disktype: ssd + + ## Affinity settings for MinIO pods. Read more about affinity + ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. + # affinity: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/hostname + # operator: In + # values: + # - hostname1 + # - hostname2 + + ## Configure resource requests and limits for MinIO containers + # resources: + # requests: + # cpu: 250m + # memory: 16Gi + # limits: + # cpu: 500m + # memory: 16Gi + ## Mount path where PV will be mounted inside container(s). mountPath: /export ## Sub path inside Mount path where MinIO stores data. @@ -162,12 +203,6 @@ spec: ## Refer https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy ## for details. podManagementPolicy: Parallel - ## 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: @@ -176,15 +211,6 @@ spec: # - name: MINIO_STORAGE_CLASS_STANDARD # value: "EC:2" - ## Configure resource requests and limits for MinIO containers - # resources: - # requests: - # cpu: 250m - # memory: 16Gi - # limits: - # cpu: 500m - # memory: 16Gi - ## Liveness probe detects situations where MinIO tenant ## is not working properly and needs restart. Kubernetes automatically ## restarts the pods if liveness checks fail. @@ -193,17 +219,6 @@ spec: periodSeconds: 10 timeoutSeconds: 10 - ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be - ## eligible to run on a node, the node must have each of the - ## indicated key-value pairs as labels. - ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - # nodeSelector: - # disktype: ssd - - ## Affinity settings for MinIO pods. Read more about affinity - ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. - # affinity: - ## PriorityClassName indicates the Pod priority and hence importance of a Pod relative to other Pods. ## This is applied to MinIO pods only. ## Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass/ @@ -212,7 +227,7 @@ spec: ## Define configuration for Console (Graphical user interface for MinIO) ## Refer https://github.com/minio/console console: - image: minio/console:v0.3.17 + image: minio/console:v0.3.26 replicas: 2 consoleSecret: name: console-secret @@ -220,7 +235,7 @@ spec: ## Define configuration for KES (stateless and distributed key-management system) ## Refer https://github.com/minio/kes kes: - image: minio/kes:v0.11.0 + image: minio/kes:v0.12.0 replicas: 2 kesSecret: name: kes-config diff --git a/examples/tenant.yaml b/examples/tenant.yaml index 070f70300e8..59a602bf11a 100644 --- a/examples/tenant.yaml +++ b/examples/tenant.yaml @@ -41,10 +41,12 @@ metadata: prometheus.io/path: /minio/prometheus/metrics prometheus.io/port: "9000" prometheus.io/scrape: "true" + ## If a scheduler is specified here, Tenant pods will be dispatched by specified scheduler. ## If not specified, the Tenant pods will be dispatched by default scheduler. # scheduler: # name: my-custom-scheduler + spec: ## Registry location and Tag to download MinIO Server image image: minio/minio:RELEASE.2020-09-26T03-44-56Z @@ -61,8 +63,10 @@ spec: ## 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 - ## volumesPerServer specifies the number of volumes attached per MinIO Tenant Pod / Server. + + ## volumesPerServer specifies the number of volumes attached per MinIO Tenant Pod / Server. volumesPerServer: 4 + ## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO Tenant in this ## Zone. volumeClaimTemplate: @@ -74,6 +78,43 @@ spec: resources: requests: storage: 1Ti + + ## Used to specify a toleration for a pod + # tolerations: + # - effect: NoSchedule + # key: dedicated + # operator: Equal + # value: storage + + ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be + ## eligible to run on a node, the node must have each of the + ## indicated key-value pairs as labels. + ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # nodeSelector: + # disktype: ssd + + ## Affinity settings for MinIO pods. Read more about affinity + ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. + # affinity: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/hostname + # operator: In + # values: + # - hostname1 + # - hostname2 + + ## Configure resource requests and limits for MinIO containers + # resources: + # requests: + # cpu: 250m + # memory: 16Gi + # limits: + # cpu: 500m + # memory: 16Gi + ## Mount path where PV will be mounted inside container(s). mountPath: /export ## Sub path inside Mount path where MinIO stores data. @@ -101,12 +142,6 @@ spec: ## Refer https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy ## for details. podManagementPolicy: Parallel - ## 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: @@ -115,15 +150,6 @@ spec: # - name: MINIO_STORAGE_CLASS_STANDARD # value: "EC:2" - ## Configure resource requests and limits for MinIO containers - # resources: - # requests: - # cpu: 250m - # memory: 16Gi - # limits: - # cpu: 500m - # memory: 16Gi - ## Liveness probe detects situations where MinIO tenant ## is not working properly and needs restart. Kubernetes automatically ## restarts the pods if liveness checks fail. @@ -132,17 +158,6 @@ spec: periodSeconds: 10 timeoutSeconds: 10 - ## nodeSelector parameters for MinIO Pods. It specifies a map of key-value pairs. For the pod to be - ## eligible to run on a node, the node must have each of the - ## indicated key-value pairs as labels. - ## Read more here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - # nodeSelector: - # disktype: ssd - - ## Affinity settings for MinIO pods. Read more about affinity - ## here: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. - # affinity: - ## PriorityClassName indicates the Pod priority and hence importance of a Pod relative to other Pods. ## This is applied to MinIO pods only. ## Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass/ @@ -151,10 +166,7 @@ spec: ## Define configuration for Console (Graphical user interface for MinIO) ## Refer https://github.com/minio/console console: - image: minio/console:v0.3.17 + image: minio/console:v0.3.26 replicas: 2 consoleSecret: name: console-secret - metadata: - labels: - app: console diff --git a/pkg/resources/statefulsets/minio-statefulset.go b/pkg/resources/statefulsets/minio-statefulset.go index 0a8645e91fa..f492d9f7eb9 100644 --- a/pkg/resources/statefulsets/minio-statefulset.go +++ b/pkg/resources/statefulsets/minio-statefulset.go @@ -421,6 +421,7 @@ func NewForMinIOZone(t *miniov1.Tenant, wsSecret *v1.Secret, zone *miniov1.Zone, Volumes: podVolumes, RestartPolicy: corev1.RestartPolicyAlways, Affinity: zone.Affinity, + NodeSelector: zone.NodeSelector, SchedulerName: t.Scheduler.Name, Tolerations: minioZoneTolerations(zone), SecurityContext: minioSecurityContext(t),