- Opstart redis en minio werkt - Bezig om eigenlijke apps op te starten ... werkt nog niet.
232 lines
4.4 KiB
YAML
232 lines
4.4 KiB
YAML
# Redis and MinIO Services for EveAI Dev Environment
|
|
# File: redis-minio-services.yaml
|
|
---
|
|
# Redis Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: redis
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: redis
|
|
environment: dev
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: redis
|
|
tier: backend
|
|
spec:
|
|
containers:
|
|
- name: redis
|
|
image: redis:7.2.5
|
|
ports:
|
|
- containerPort: 6379
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- redis-cli
|
|
- ping
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- redis-cli
|
|
- ping
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
restartPolicy: Always
|
|
|
|
---
|
|
# Redis Service
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis-service
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 6379
|
|
targetPort: 6379
|
|
nodePort: 30006 # Maps to host port 3006
|
|
protocol: TCP
|
|
selector:
|
|
app: redis
|
|
|
|
---
|
|
# MinIO Persistent Volume Claim
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: minio-data-pvc
|
|
namespace: eveai-dev
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: local-storage
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
selector:
|
|
matchLabels:
|
|
app: minio
|
|
environment: dev
|
|
|
|
---
|
|
# MinIO Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: minio
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: minio
|
|
environment: dev
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: minio
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: minio
|
|
tier: backend
|
|
spec:
|
|
containers:
|
|
- name: minio
|
|
image: minio/minio
|
|
command:
|
|
- minio
|
|
- server
|
|
- /data
|
|
- --console-address
|
|
- ":9001"
|
|
ports:
|
|
- containerPort: 9000
|
|
name: api
|
|
- containerPort: 9001
|
|
name: console
|
|
env:
|
|
- name: MINIO_ROOT_USER
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: eveai-config
|
|
key: MINIO_ACCESS_KEY
|
|
- name: MINIO_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: eveai-secrets
|
|
key: MINIO_SECRET_KEY
|
|
volumeMounts:
|
|
- name: minio-data
|
|
mountPath: /data
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /minio/health/live
|
|
port: 9000
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 30
|
|
timeoutSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /minio/health/ready
|
|
port: 9000
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 30
|
|
timeoutSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "200m"
|
|
limits:
|
|
memory: "1Gi"
|
|
cpu: "1000m"
|
|
volumes:
|
|
- name: minio-data
|
|
persistentVolumeClaim:
|
|
claimName: minio-data-pvc
|
|
restartPolicy: Always
|
|
|
|
---
|
|
# MinIO Service (API)
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: minio-service
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: minio
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 9000
|
|
targetPort: 9000
|
|
nodePort: 30008 # Maps to host port 3008
|
|
protocol: TCP
|
|
name: api
|
|
selector:
|
|
app: minio
|
|
|
|
---
|
|
# MinIO Console Service
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: minio-console-service
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: minio
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 9001
|
|
targetPort: 9001
|
|
nodePort: 30009 # Maps to host port 3009
|
|
protocol: TCP
|
|
name: console
|
|
selector:
|
|
app: minio
|
|
|
|
---
|
|
# Redis Alias Service (for application compatibility)
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
namespace: eveai-dev
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 6379
|
|
targetPort: 6379
|
|
protocol: TCP
|
|
selector:
|
|
app: redis |