blob: 6cea998deed88bdef335b7534b3d77121161b630 [file] [log] [blame]
# Minio
apiVersion: v1
kind: Service
metadata:
name: minio
namespace: nonrtric
labels:
run: minio
prodtest: minio
spec:
clusterIP: None
selector:
run: minio
---
apiVersion: v1
kind: Service
metadata:
name: minio-ext
namespace: nonrtric
labels:
prodtest: minio
spec:
type: NodePort
selector:
statefulset.kubernetes.io/pod-name: minio-0
ports:
- protocol: TCP
port: 9001
targetPort: 9001
nodePort: 31768
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: minio
namespace: nonrtric
labels:
run: minio
prodtest: minio
spec:
serviceName: minio
replicas: $NUM_MINIO
selector:
matchLabels:
run: minio
template:
metadata:
labels:
run: minio
prodtest: minio
spec:
initContainers:
- name: init
image: alpine:latest
imagePullPolicy: IfNotPresent
command: ["ash","-c"]
args: ["IDX=${HOSTNAME##*-} && mkdir -p /data/$IDX && rm -rf /data/$IDX/*"]
volumeMounts:
- mountPath: /data
name: data-vol
containers:
- name: minio
image: minio/minio:latest
imagePullPolicy: IfNotPresent
args:
- server
- "--console-address"
- ":9001"
- $MINIO_SERVER_CONF
# $MINIO_SERVER_0
# $MINIO_SERVER_1
# $MINIO_SERVER_2
# $MINIO_SERVER_3
# $MINIO_SERVER_4
# $MINIO_SERVER_5
# $MINIO_SERVER_6
# $MINIO_SERVER_7
# $MINIO_SERVER_8
# $MINIO_SERVER_9
env:
- name: MINIO_ROOT_USER
value: admin
- name: MINIO_ROOT_PASSWORD
value: adminadmin
volumeMounts:
- mountPath: /data
name: data-vol
volumes:
#MINIO_EMPTY_DIR_START
- name: data-vol
emptyDir: {}
#MINIO_EMPTY_DIR_STOP
#MINIO_HOSTPATH_DIR_START
- name: data-vol
hostPath:
path: $MINIO_MNT/minio
type: DirectoryOrCreate
#MINIO_HOSTPATH_DIR_STOP