forked from innovacion/Mayacontigo
42
apps/inversionistas/.k8s/deployment.yaml
Normal file
42
apps/inversionistas/.k8s/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mayacontigo-inversionistas
|
||||
namespace: apps
|
||||
labels:
|
||||
app: mayacontigo-inversionistas
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mayacontigo-inversionistas
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mayacontigo-inversionistas
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry-cred
|
||||
containers:
|
||||
- name: mayacontigo-inversionistas
|
||||
image: gitea.ia-innovacion.work/innovacion/mayacontigo-inversionistas:latest
|
||||
env:
|
||||
- name: VAULT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mayacontigo-inversionistas-secret
|
||||
key: VAULT_TOKEN
|
||||
ports:
|
||||
- containerPort: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
19
apps/inversionistas/.k8s/ingress.yaml
Normal file
19
apps/inversionistas/.k8s/ingress.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mayacontigo-inversionistas-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: mayacontigo-inversionistas.app.ia-innovacion.work
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mayacontigo-inversionistas-service
|
||||
port:
|
||||
number: 80
|
||||
17
apps/inversionistas/.k8s/secrets.yaml
Normal file
17
apps/inversionistas/.k8s/secrets.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: mayacontigo-inversionistas-vault
|
||||
namespace: apps
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-backend
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: mayacontigo-inversionistas-secret
|
||||
data:
|
||||
- secretKey: VAULT_TOKEN
|
||||
remoteRef:
|
||||
key: mayacontigo-inversionistas
|
||||
property: VAULT_TOKEN
|
||||
14
apps/inversionistas/.k8s/service.yaml
Normal file
14
apps/inversionistas/.k8s/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mayacontigo-inversionistas-service
|
||||
labels:
|
||||
app: mayacontigo-inversionistas
|
||||
spec:
|
||||
selector:
|
||||
app: mayacontigo-inversionistas
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
type: ClusterIP
|
||||
@@ -6,8 +6,8 @@ from fastapi.responses import StreamingResponse
|
||||
from pydantic import BaseModel
|
||||
|
||||
from . import services
|
||||
from .config import config
|
||||
from .agent import MayaInversionistas
|
||||
from .config import config
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -49,5 +49,12 @@ async def send(message: Message, stream: bool = False):
|
||||
generator = sse_stream(agent, message.prompt, message.conversation_id)
|
||||
return StreamingResponse(generator, media_type="text/event-stream")
|
||||
else:
|
||||
response = await services.generate(agent, message.prompt, message.conversation_id)
|
||||
response = await services.generate(
|
||||
agent, message.prompt, message.conversation_id
|
||||
)
|
||||
return response
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def health():
|
||||
return {"status": "ok"}
|
||||
|
||||
42
apps/ocp/.k8s/deployment.yaml
Normal file
42
apps/ocp/.k8s/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mayacontigo-ocp
|
||||
namespace: apps
|
||||
labels:
|
||||
app: mayacontigo-ocp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mayacontigo-ocp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mayacontigo-ocp
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry-cred
|
||||
containers:
|
||||
- name: mayacontigo-ocp
|
||||
image: gitea.ia-innovacion.work/innovacion/mayacontigo-ocp:latest
|
||||
env:
|
||||
- name: VAULT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mayacontigo-ocp-secret
|
||||
key: VAULT_TOKEN
|
||||
ports:
|
||||
- containerPort: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
19
apps/ocp/.k8s/ingress.yaml
Normal file
19
apps/ocp/.k8s/ingress.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mayacontigo-ocp-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: mayacontigo-ocp.app.ia-innovacion.work
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mayacontigo-ocp-service
|
||||
port:
|
||||
number: 80
|
||||
17
apps/ocp/.k8s/secrets.yaml
Normal file
17
apps/ocp/.k8s/secrets.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: mayacontigo-ocp-vault
|
||||
namespace: apps
|
||||
spec:
|
||||
refreshInterval: "15s"
|
||||
secretStoreRef:
|
||||
name: vault-backend
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: mayacontigo-ocp-secret
|
||||
data:
|
||||
- secretKey: VAULT_TOKEN
|
||||
remoteRef:
|
||||
key: mayacontigo-ocp
|
||||
property: VAULT_TOKEN
|
||||
14
apps/ocp/.k8s/service.yaml
Normal file
14
apps/ocp/.k8s/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mayacontigo-ocp-service
|
||||
labels:
|
||||
app: mayacontigo-ocp
|
||||
spec:
|
||||
selector:
|
||||
app: mayacontigo-ocp
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
type: ClusterIP
|
||||
@@ -55,3 +55,8 @@ async def send(message: Message, stream: bool = False):
|
||||
else:
|
||||
response = await services.generate(message.prompt, message.conversation_id)
|
||||
return response
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def health():
|
||||
return {"status": "ok"}
|
||||
|
||||
Submodule apps/redes-sociales deleted from ab2229fa26
Reference in New Issue
Block a user