-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8s-example.yaml
More file actions
91 lines (89 loc) · 1.76 KB
/
k8s-example.yaml
File metadata and controls
91 lines (89 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
apiVersion: apps/v1
kind: Deployment
metadata:
name: xunity
spec:
replicas: 1
selector:
matchLabels:
app: xunity
template:
metadata:
labels:
app: xunity
spec:
containers:
- name: xunity
image: ghcr.io/returntofirst/xunity-autotranslator-openai:latest
imagePullPolicy: Always
env:
- name: BASE_URL
value: "https://api.openai.com/v1"
- name: API_KEY
value: "api_key_here"
- name: MODEL_NAME
value: "gpt-3.5-turbo"
- name: DB_TYPE
value: "postgres"
- name: POSTGRES_HOST
value: "xunity-db"
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_USER
value: "xunity"
- name: POSTGRES_PASSWORD
value: "xunity"
- name: POSTGRES_DB
value: "xunity"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: xunity-db
spec:
replicas: 1
selector:
matchLabels:
app: xunity-db
template:
metadata:
labels:
app: xunity-db
spec:
containers:
- name: xunity-db
image: postgres:alpine
imagePullPolicy: Always
env:
- name: POSTGRES_DB
value: "xunity"
- name: POSTGRES_USER
value: "xunity"
- name: POSTGRES_PASSWORD
value: "xunity"
---
apiVersion: v1
kind: Service
metadata:
name: xunity-db
spec:
type: ClusterIP
ports:
- port: 5432
protocol: TCP
selector:
app: xunity-db
---
apiVersion: v1
kind: Service
metadata:
name: xunity
spec:
type: NodePort
ports:
- port: 5000
targetPort: 5000
nodePort: 32001
protocol: TCP
selector:
app: xunity