fsal's picture
first commit
c8ebe28
raw
history blame
3.63 kB
apiVersion: apps/v1
kind: Deployment
metadata:
name: langchain-streamlit-demo-deployment
spec:
replicas: 1
selector:
matchLabels:
app: langchain-streamlit-demo
template:
metadata:
labels:
app: langchain-streamlit-demo
spec:
containers:
- name: langchain-streamlit-demo
image: joshuasundance/langchain-streamlit-demo:2.1.4
imagePullPolicy: Always
resources:
requests:
cpu: "100m"
memory: "200Mi"
limits:
cpu: "500m"
memory: "500Mi"
env:
- name: AZURE_OPENAI_BASE_URL
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_BASE_URL
- name: AZURE_OPENAI_API_VERSION
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_API_VERSION
- name: AZURE_OPENAI_DEPLOYMENT_NAME
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_DEPLOYMENT_NAME
- name: AZURE_OPENAI_EMB_DEPLOYMENT_NAME
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_EMB_DEPLOYMENT_NAME
- name: AZURE_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_API_KEY
- name: AZURE_OPENAI_MODEL_VERSION
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: AZURE_OPENAI_MODEL_VERSION
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: OPENAI_API_KEY
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: ANTHROPIC_API_KEY
- name: ANYSCALE_API_KEY
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: ANYSCALE_API_KEY
- name: LANGCHAIN_API_KEY
valueFrom:
secretKeyRef:
name: langchain-streamlit-demo-secret
key: LANGCHAIN_API_KEY
- name: LANGCHAIN_PROJECT
value: "langchain-streamlit-demo"
- name: SHOW_LANGSMITH_OPTIONS
value: "False"
- name: SHOW_AZURE_OPTIONS
value: "False"
securityContext:
runAsNonRoot: true
---
apiVersion: v1
kind: Service
metadata:
name: langchain-streamlit-demo-service
# configure on Azure and uncomment below to use a vnet
# annotations:
# service.beta.kubernetes.io/azure-load-balancer-internal: "true"
# service.beta.kubernetes.io/azure-load-balancer-ipv4: vnet.ip.goes.here
# service.beta.kubernetes.io/azure-dns-label-name: "langchain-streamlit-demo"
spec:
selector:
app: langchain-streamlit-demo
ports:
- protocol: TCP
port: 80
targetPort: 7860
type: LoadBalancer
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: langchain-streamlit-demo-network-policy
spec:
podSelector:
matchLabels:
app: langchain-streamlit-demo
policyTypes:
- Ingress
ingress:
- from: [] # An empty array here means it will allow traffic from all sources.
ports:
- protocol: TCP
port: 7860