mirror of
https://github.com/ghndrx/starlane-router.git
synced 2026-02-10 06:45:01 +00:00
feat: initial commit for starlane-router (FastAPI + Gradient)
This commit is contained in:
19
k8s/config-secrets.yaml
Normal file
19
k8s/config-secrets.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: a2a-config
|
||||
labels:
|
||||
app: a2a-router
|
||||
data:
|
||||
ROUTE_KEYWORDS: "ai,model,ml,gpt,router,gradient"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: a2a-secrets
|
||||
labels:
|
||||
app: a2a-router
|
||||
stringData:
|
||||
GRADIENT_ENDPOINT_URL: "https://REPLACE/api/infer"
|
||||
GRADIENT_API_KEY: "REPLACE_ME"
|
||||
GRADIENT_AUTH_SCHEME: "authorization_bearer"
|
||||
59
k8s/deployment.yaml
Normal file
59
k8s/deployment.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: a2a-router
|
||||
labels:
|
||||
app: a2a-router
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: a2a-router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: a2a-router
|
||||
spec:
|
||||
containers:
|
||||
- name: a2a-router
|
||||
image: REPLACE_WITH_IMAGE
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: GRADIENT_ENDPOINT_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: a2a-secrets
|
||||
key: GRADIENT_ENDPOINT_URL
|
||||
- name: GRADIENT_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: a2a-secrets
|
||||
key: GRADIENT_API_KEY
|
||||
- name: GRADIENT_AUTH_SCHEME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: a2a-secrets
|
||||
key: GRADIENT_AUTH_SCHEME
|
||||
- name: ROUTE_KEYWORDS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: a2a-config
|
||||
key: ROUTE_KEYWORDS
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: a2a-router
|
||||
labels:
|
||||
app: a2a-router
|
||||
spec:
|
||||
selector:
|
||||
app: a2a-router
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
20
k8s/ingress.yaml
Normal file
20
k8s/ingress.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: a2a-router
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "2m"
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||
spec:
|
||||
rules:
|
||||
- host: REPLACE_WITH_DOMAIN
|
||||
http:
|
||||
paths:
|
||||
- path: /(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: a2a-router
|
||||
port:
|
||||
number: 80
|
||||
Reference in New Issue
Block a user