commit inicial
This commit is contained in:
9
k8s/overlays/box/configmaps.yaml
Normal file
9
k8s/overlays/box/configmaps.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: litellm-env
|
||||
namespace: litellm
|
||||
data:
|
||||
DATABASE_URL: postgresql://litellm:litellm@postgres:5432/litellm
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
27
k8s/overlays/box/kustomization.yaml
Normal file
27
k8s/overlays/box/kustomization.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: litellm
|
||||
resources:
|
||||
- ../../base
|
||||
- postgres.yaml
|
||||
- redis.yaml
|
||||
- configmaps.yaml
|
||||
configMapGenerator:
|
||||
- name: litellm-config
|
||||
files:
|
||||
- config.yaml=../../service-config/config.box/config.yaml
|
||||
patches:
|
||||
- target:
|
||||
kind: Ingress
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/rules/0/host
|
||||
value: litellm.box.local
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/replicas
|
||||
value: 1
|
||||
4
k8s/overlays/box/namespace.yaml
Normal file
4
k8s/overlays/box/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: litellm
|
||||
60
k8s/overlays/box/postgres.yaml
Normal file
60
k8s/overlays/box/postgres.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: litellm
|
||||
- name: POSTGRES_USER
|
||||
value: litellm
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: litellm
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-pvc
|
||||
namespace: litellm
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
53
k8s/overlays/box/redis.yaml
Normal file
53
k8s/overlays/box/redis.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: redis-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: redis-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: redis-pvc
|
||||
namespace: litellm
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
9
k8s/overlays/dev/configmaps.yaml
Normal file
9
k8s/overlays/dev/configmaps.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: litellm-env
|
||||
namespace: litellm
|
||||
data:
|
||||
DATABASE_URL: postgresql://litellm:litellm@postgres:5432/litellm
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
28
k8s/overlays/dev/kustomization.yaml
Normal file
28
k8s/overlays/dev/kustomization.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
- postgres.yaml
|
||||
- redis.yaml
|
||||
- configmaps.yaml
|
||||
- ../../service-config/Secrets/litellm-secrets-dev.yaml
|
||||
configMapGenerator:
|
||||
- name: litellm-config
|
||||
files:
|
||||
- config.yaml=../../service-config/config.dev/config.yaml
|
||||
patches:
|
||||
- target:
|
||||
kind: Ingress
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/rules/0/host
|
||||
value: litellm.dev.local
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/replicas
|
||||
value: 1
|
||||
- path: litellm-patch.yaml
|
||||
15
k8s/overlays/dev/litellm-patch.yaml
Normal file
15
k8s/overlays/dev/litellm-patch.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: litellm
|
||||
namespace: litellm
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: litellm
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: litellm-env
|
||||
- secretRef:
|
||||
name: litellm-secrets-dev
|
||||
47
k8s/overlays/dev/postgres.yaml
Normal file
47
k8s/overlays/dev/postgres.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: litellm
|
||||
- name: POSTGRES_USER
|
||||
value: litellm
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: litellm
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
40
k8s/overlays/dev/redis.yaml
Normal file
40
k8s/overlays/dev/redis.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: redis-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: redis-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
8
k8s/overlays/prd/configmaps.yaml
Normal file
8
k8s/overlays/prd/configmaps.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: litellm-env
|
||||
namespace: litellm
|
||||
data:
|
||||
REDIS_HOST: redis-cluster-placeholder
|
||||
REDIS_PORT: "6379"
|
||||
26
k8s/overlays/prd/kustomization.yaml
Normal file
26
k8s/overlays/prd/kustomization.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
- configmaps.yaml
|
||||
- ../../service-config/Secrets/litellm-secrets-prd.yaml
|
||||
configMapGenerator:
|
||||
- name: litellm-config
|
||||
files:
|
||||
- config.yaml=../../service-config/config.prd/config.yaml
|
||||
patches:
|
||||
- target:
|
||||
kind: Ingress
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/rules/0/host
|
||||
value: litellm.prd.local
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/replicas
|
||||
value: 3
|
||||
- path: litellm-patch.yaml
|
||||
15
k8s/overlays/prd/litellm-patch.yaml
Normal file
15
k8s/overlays/prd/litellm-patch.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: litellm
|
||||
namespace: litellm
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: litellm
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: litellm-env
|
||||
- secretRef:
|
||||
name: litellm-secrets-prd
|
||||
9
k8s/overlays/qat/configmaps.yaml
Normal file
9
k8s/overlays/qat/configmaps.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: litellm-env
|
||||
namespace: litellm
|
||||
data:
|
||||
DATABASE_URL: postgresql://litellm:litellm@postgres:5432/litellm
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
29
k8s/overlays/qat/kustomization.yaml
Normal file
29
k8s/overlays/qat/kustomization.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
- postgres.yaml
|
||||
- redis.yaml
|
||||
- configmaps.yaml
|
||||
- namespace.yaml
|
||||
- ../../service-config/Secrets/litellm-secrets-qat.yaml
|
||||
configMapGenerator:
|
||||
- name: litellm-config
|
||||
files:
|
||||
- config.yaml=../../service-config/config.qat/config.yaml
|
||||
patches:
|
||||
- target:
|
||||
kind: Ingress
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/rules/0/host
|
||||
value: litellm.qat.local
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: litellm
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/replicas
|
||||
value: 1
|
||||
- path: litellm-patch.yaml
|
||||
15
k8s/overlays/qat/litellm-patch.yaml
Normal file
15
k8s/overlays/qat/litellm-patch.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: litellm
|
||||
namespace: litellm
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: litellm
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: litellm-env
|
||||
- secretRef:
|
||||
name: litellm-secrets-qat
|
||||
47
k8s/overlays/qat/postgres.yaml
Normal file
47
k8s/overlays/qat/postgres.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: litellm
|
||||
- name: POSTGRES_USER
|
||||
value: litellm
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: litellm
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
40
k8s/overlays/qat/redis.yaml
Normal file
40
k8s/overlays/qat/redis.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: redis-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: redis-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: litellm
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
Reference in New Issue
Block a user