130 lines
2.6 KiB
YAML
130 lines
2.6 KiB
YAML
# -----------------------------------------------------------------------
|
|
# VOLUMES
|
|
# -----------------------------------------------------------------------
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: PersistentVolume
|
|
metadata:
|
|
name: minio-pv
|
|
spec:
|
|
storageClassName: ""
|
|
capacity:
|
|
storage: 10Gi
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
persistentVolumeReclaimPolicy: Retain
|
|
claimRef:
|
|
namespace: default
|
|
name: minio-pvc
|
|
hostPath:
|
|
path: "/var/lib/rancher/k3s/storage/minio-pv"
|
|
type: DirectoryOrCreate
|
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
apiVersion: v1
|
|
metadata:
|
|
name: minio-pvc
|
|
spec:
|
|
volumeName: minio-pv
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
|
|
---
|
|
|
|
# -----------------------------------------------------------------------
|
|
# DEPLOYMENTS
|
|
# -----------------------------------------------------------------------
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: minio
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: minio
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: minio
|
|
|
|
spec:
|
|
containers:
|
|
- name: minio
|
|
image: docker.io/minio/minio:latest
|
|
command: ['minio']
|
|
args: ['server', '/data']
|
|
env:
|
|
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
|
value: public
|
|
- name: MINIO_CONSOLE_ADDRESS
|
|
value: :9090
|
|
- name: MINIO_ROOT_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio
|
|
key: MINIO_ROOT_USER
|
|
- name: MINIO_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio
|
|
key: MINIO_ROOT_PASSWORD
|
|
ports:
|
|
- name: console
|
|
containerPort: 9090
|
|
protocol: TCP
|
|
- name: api
|
|
containerPort: 9000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /minio/health/live
|
|
port: 9000
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /minio/health/ready
|
|
port: 9000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 20
|
|
successThreshold: 2
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: minio-storage
|
|
|
|
volumes:
|
|
- name: minio-storage
|
|
persistentVolumeClaim:
|
|
claimName: minio-pvc
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: minio-service
|
|
labels:
|
|
app: minio
|
|
spec:
|
|
ports:
|
|
- name: api
|
|
port: 9000
|
|
protocol: TCP
|
|
targetPort: 9000
|
|
- name: console
|
|
port: 9090
|
|
protocol: TCP
|
|
targetPort: 9090
|
|
selector:
|
|
app: minio
|