deploy/model-minio.yml

85 lines
1.6 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: model-minio
namespace: birbnetes
spec:
type: ClusterIP
ports:
- port: 9000
targetPort: 9000
protocol: TCP
selector:
app: model-minio
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-minio-model
namespace: birbnetes
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: model-minio
labels:
app: model-minio
namespace: birbnetes
data:
MINIO_ACCESS_KEY: "birbnetes-model-minio-access"
MINIO_SECRET_KEY: "birbnetes-model-supersecret"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: model-minio
namespace: birbnetes
spec:
selector:
matchLabels:
app: model-minio
strategy:
type: Recreate
template:
metadata:
labels:
app: model-minio
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-minio-model
containers:
- name: model-minio
volumeMounts:
- name: data
mountPath: "/data"
image: minio/minio:latest
args:
- server
- /data
envFrom:
- configMapRef:
name: model-minio
ports:
- containerPort: 9000
readinessProbe:
httpGet:
path: /minio/health/ready
port: 9000
initialDelaySeconds: 120
periodSeconds: 20
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
initialDelaySeconds: 120
periodSeconds: 20