Add minio support and forntend analitycs
This commit is contained in:
@@ -140,10 +140,9 @@ spec:
|
||||
name: pos-integration-secrets
|
||||
- secretRef:
|
||||
name: whatsapp-secrets
|
||||
volumeMounts:
|
||||
- name: model-storage
|
||||
mountPath: /app/models
|
||||
readOnly: true # Forecasting only reads models
|
||||
- secretRef:
|
||||
name: minio-secrets
|
||||
# Model storage now uses MinIO - no local volumeMounts needed
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
@@ -172,10 +171,7 @@ spec:
|
||||
secret:
|
||||
secretName: redis-tls-secret
|
||||
defaultMode: 0400
|
||||
- name: model-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: model-storage
|
||||
readOnly: true # Forecasting only reads models
|
||||
# Model storage migrated to MinIO - PVC no longer needed
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
@@ -56,6 +56,11 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: bakery-config
|
||||
key: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||
- name: SIGNOZ_OTEL_COLLECTOR_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: bakery-config
|
||||
key: SIGNOZ_OTEL_COLLECTOR_URL
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
app.kubernetes.io/part-of: bakery-ia
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
spec:
|
||||
# Init container to set up TLS certificates with correct permissions
|
||||
initContainers:
|
||||
- name: init-certs
|
||||
image: busybox:1.36
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /certs/CAs
|
||||
cp /certs-secret/minio-cert.pem /certs/public.crt
|
||||
cp /certs-secret/minio-key.pem /certs/private.key
|
||||
cp /certs-secret/ca-cert.pem /certs/CAs/ca.crt
|
||||
chmod 600 /certs/private.key
|
||||
chmod 644 /certs/public.crt /certs/CAs/ca.crt
|
||||
volumeMounts:
|
||||
- name: certs-secret
|
||||
mountPath: /certs-secret
|
||||
readOnly: true
|
||||
- name: certs
|
||||
mountPath: /certs
|
||||
containers:
|
||||
- name: minio
|
||||
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
|
||||
args:
|
||||
- server
|
||||
- /data
|
||||
- --console-address
|
||||
- :9001
|
||||
- --address
|
||||
- :9000
|
||||
- --certs-dir
|
||||
- /certs
|
||||
env:
|
||||
- name: MINIO_ROOT_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minio-secrets
|
||||
key: MINIO_ROOT_USER
|
||||
- name: MINIO_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minio-secrets
|
||||
key: MINIO_ROOT_PASSWORD
|
||||
# Enable TLS for MinIO
|
||||
- name: MINIO_SERVER_URL
|
||||
value: "https://minio.bakery-ia.svc.cluster.local:9000"
|
||||
- name: MINIO_BROWSER_REDIRECT_URL
|
||||
value: "https://minio-console.bakery-ia.svc.cluster.local:9001"
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: api
|
||||
- containerPort: 9001
|
||||
name: console
|
||||
volumeMounts:
|
||||
- name: minio-data
|
||||
mountPath: /data
|
||||
- name: certs
|
||||
mountPath: /certs
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /minio/health/live
|
||||
port: 9000
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /minio/health/ready
|
||||
port: 9000
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
volumes:
|
||||
- name: minio-data
|
||||
persistentVolumeClaim:
|
||||
claimName: minio-data
|
||||
- name: certs-secret
|
||||
secret:
|
||||
secretName: minio-tls
|
||||
- name: certs
|
||||
emptyDir: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 9000
|
||||
targetPort: 9000
|
||||
protocol: TCP
|
||||
name: api
|
||||
- port: 9001
|
||||
targetPort: 9001
|
||||
protocol: TCP
|
||||
name: console
|
||||
selector:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio-console
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 9001
|
||||
targetPort: 9001
|
||||
protocol: TCP
|
||||
name: console
|
||||
selector:
|
||||
app.kubernetes.io/name: minio
|
||||
app.kubernetes.io/component: storage
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: minio-data
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: minio-data
|
||||
app.kubernetes.io/component: storage
|
||||
app.kubernetes.io/part-of: bakery-ia
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
storageClassName: standard
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: minio-secrets
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: minio-secrets
|
||||
app.kubernetes.io/component: storage
|
||||
app.kubernetes.io/part-of: bakery-ia
|
||||
type: Opaque
|
||||
data:
|
||||
# MinIO Root Credentials (base64 encoded)
|
||||
MINIO_ROOT_USER: YWRtaW4= # admin
|
||||
MINIO_ROOT_PASSWORD: c2VjdXJlLXBhc3N3b3Jk # secure-password
|
||||
|
||||
# Service Account Credentials for applications
|
||||
MINIO_ACCESS_KEY: dHJhaW5pbmctc2VydmljZQ== # training-service
|
||||
MINIO_SECRET_KEY: dHJhaW5pbmctc2VjcmV0LWtleQ== # training-secret-key
|
||||
|
||||
# Forecasting Service Credentials
|
||||
FORECASTING_MINIO_ACCESS_KEY: Zm9yZWNhc3Rpbmctc2VydmljZQ== # forecasting-service
|
||||
FORECASTING_MINIO_SECRET_KEY: Zm9yZWNhc3Rpbmctc2VjcmV0LWtleQ== # forecasting-secret-key
|
||||
@@ -140,11 +140,11 @@ spec:
|
||||
name: pos-integration-secrets
|
||||
- secretRef:
|
||||
name: whatsapp-secrets
|
||||
- secretRef:
|
||||
name: minio-secrets
|
||||
volumeMounts:
|
||||
- name: tmp-storage
|
||||
mountPath: /tmp
|
||||
- name: model-storage
|
||||
mountPath: /app/models
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
@@ -176,9 +176,6 @@ spec:
|
||||
- name: tmp-storage
|
||||
emptyDir:
|
||||
sizeLimit: 4Gi # Increased from 2Gi to handle cmdstan temp files during optimization
|
||||
- name: model-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: model-storage
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: model-storage
|
||||
namespace: bakery-ia
|
||||
labels:
|
||||
app.kubernetes.io/name: model-storage
|
||||
app.kubernetes.io/component: storage
|
||||
app.kubernetes.io/part-of: bakery-ia
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce # Single node access (works with local Kubernetes)
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi # Adjust based on your needs
|
||||
storageClassName: standard # Use default local-path provisioner
|
||||
Reference in New Issue
Block a user