| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  | apiVersion: apps/v1beta1
 | 
					
						
							|  |  |  | kind: StatefulSet
 | 
					
						
							|  |  |  | metadata:
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |   # This name uniquely identifies the StatefulSet
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |   name: minio
 | 
					
						
							|  |  |  | spec:
 | 
					
						
							|  |  |  |   serviceName: minio
 | 
					
						
							|  |  |  |   replicas: 4
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |   selector:
 | 
					
						
							|  |  |  |     matchLabels:
 | 
					
						
							|  |  |  |       app: minio # has to match .spec.template.metadata.labels
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |   template:
 | 
					
						
							|  |  |  |     metadata:
 | 
					
						
							|  |  |  |       labels:
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |         app: minio # has to match .spec.selector.matchLabels
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |     spec:
 | 
					
						
							|  |  |  |       containers:
 | 
					
						
							|  |  |  |       - name: minio
 | 
					
						
							|  |  |  |         env:
 | 
					
						
							|  |  |  |         - name: MINIO_ACCESS_KEY
 | 
					
						
							|  |  |  |           value: "minio"
 | 
					
						
							|  |  |  |         - name: MINIO_SECRET_KEY
 | 
					
						
							|  |  |  |           value: "minio123"
 | 
					
						
							| 
									
										
										
										
											2018-12-28 02:41:05 +08:00
										 |  |  |         image: minio/minio:RELEASE.2018-12-27T18-33-08Z
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         args:
 | 
					
						
							|  |  |  |         - server
 | 
					
						
							|  |  |  |         - http://minio-0.minio.default.svc.cluster.local/data
 | 
					
						
							|  |  |  |         - http://minio-1.minio.default.svc.cluster.local/data
 | 
					
						
							|  |  |  |         - http://minio-2.minio.default.svc.cluster.local/data
 | 
					
						
							|  |  |  |         - http://minio-3.minio.default.svc.cluster.local/data
 | 
					
						
							|  |  |  |         ports:
 | 
					
						
							|  |  |  |         - containerPort: 9000
 | 
					
						
							|  |  |  |         # These volume mounts are persistent. Each pod in the PetSet
 | 
					
						
							|  |  |  |         # gets a volume mounted based on this field.
 | 
					
						
							|  |  |  |         volumeMounts:
 | 
					
						
							|  |  |  |         - name: data
 | 
					
						
							|  |  |  |           mountPath: /data
 | 
					
						
							| 
									
										
										
										
											2018-03-15 12:25:02 +08:00
										 |  |  |         # Liveness probe detects situations where Minio server instance
 | 
					
						
							|  |  |  |         # is not working properly and needs restart. Kubernetes automatically
 | 
					
						
							|  |  |  |         # restarts the pods if liveness checks fail.
 | 
					
						
							|  |  |  |         livenessProbe:
 | 
					
						
							|  |  |  |           httpGet:
 | 
					
						
							|  |  |  |             path: /minio/health/live
 | 
					
						
							|  |  |  |             port: 9000
 | 
					
						
							|  |  |  |           initialDelaySeconds: 120
 | 
					
						
							|  |  |  |           periodSeconds: 20
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |   # These are converted to volume claims by the controller
 | 
					
						
							|  |  |  |   # and mounted at the paths mentioned above.
 | 
					
						
							|  |  |  |   volumeClaimTemplates:
 | 
					
						
							|  |  |  |   - metadata:
 | 
					
						
							|  |  |  |       name: data
 | 
					
						
							|  |  |  |     spec:
 | 
					
						
							|  |  |  |       accessModes:
 | 
					
						
							|  |  |  |         - ReadWriteOnce
 | 
					
						
							|  |  |  |       resources:
 | 
					
						
							|  |  |  |         requests:
 | 
					
						
							|  |  |  |           storage: 10Gi
 |