Skip to content

Transform the Pod into a Deployment #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions infra/installation_script.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,40 @@ data:
OPENAI_API_VERSION=2023-05-15
OPENAI_API_BASE=${endpoint}
---
apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: chatbot
azure.workload.identity/use: "true"
name: chatbot
namespace: chatbot
spec:
serviceAccountName: chatbot
containers:
- image: ${registry}.azurecr.io/chatbot:latest
imagePullPolicy: Always
name: chatbot
ports:
- containerPort: 8501
protocol: TCP
volumeMounts:
- mountPath: /app/.env
name: chatbot-config
subPath: .env
volumes:
- name: chatbot-config
configMap:
name: chatbot-config
replicas: 1
selector:
matchLabels:
run: chatbot
template:
metadata:
labels:
run: chatbot
azure.workload.identity/use: "true"
spec:
serviceAccountName: chatbot
containers:
- image: ${registry}.azurecr.io/chatbot:latest
imagePullPolicy: Always
name: chatbot
ports:
- containerPort: 8501
protocol: TCP
volumeMounts:
- mountPath: /app/.env
name: chatbot-config
subPath: .env
volumes:
- name: chatbot-config
configMap:
name: chatbot-config
---
apiVersion: v1
kind: Service
Expand Down