Skip to content

Commit a927692

Browse files
committed
Implement helm
1 parent 055638f commit a927692

File tree

5 files changed

+69
-2
lines changed

5 files changed

+69
-2
lines changed

deploy/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.4
18+
version: 0.1.5
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: develop
23+
appVersion: chatbot
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ .Values.chatbot.config.name }}
5+
labels:
6+
release: {{ .Release.Name }}
7+
{{- toYaml .Values.chatbot.config.labels | nindent 4 }}
8+
data:
9+
SERVER_PORT: {{ .Values.chatbot.port | quote }}
10+
TLS_ENABLED: {{ .Values.tlsEnabled | quote }}
11+
CHATBOT_OPENAI_API_KEY: {{ .Values.openAIApiKey | quote }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ .Values.chatbot.name }}
5+
labels:
6+
release: {{ .Release.Name }}
7+
{{- with .Values.chatbot.deploymentLabels }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
10+
spec:
11+
replicas: {{ .Values.chatbot.replicaCount }}
12+
selector:
13+
matchLabels:
14+
{{- toYaml .Values.chatbot.deploymentSelectorMatchLabels | nindent 6 }}
15+
template:
16+
metadata:
17+
labels:
18+
release: {{ .Release.Name }}
19+
{{- with .Values.chatbot.podLabels }}
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
spec:
23+
containers:
24+
- name: {{ .Values.chatbot.name }}
25+
image: {{ .Values.chatbot.image }}:{{ .Chart.AppVersion }}
26+
imagePullPolicy: {{ .Values.imagePullPolicy }}
27+
ports:
28+
- containerPort: {{ .Values.chatbot.port }}
29+
envFrom:
30+
- configMapRef:
31+
name: {{ .Values.chatbot.config.name }}
32+
{{- if .Values.chatbot.resources }}
33+
resources:
34+
{{- toYaml .Values.chatbot.resources | nindent 12 }}
35+
{{- end }}
36+
readinessProbe:
37+
tcpSocket:
38+
port: {{ .Values.chatbot.port }}
39+
initialDelaySeconds: 15
40+
periodSeconds: 10
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ .Values.chatbot.service.name }}
5+
labels:
6+
release: {{ .Release.Name }}
7+
{{- with .Values.chatbot.service.labels }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
10+
spec:
11+
ports:
12+
- port: {{ .Values.chatbot.port }}
13+
name: python
14+
selector:
15+
{{- toYaml .Values.chatbot.serviceSelectorLabels | nindent 4 }}

deploy/helm/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ apiGatewayServiceInstall: true
1111
apiGatewayPassword:
1212
tlsEnabled: false
1313
jwtExpiration: 604800000
14+
openAIApiKey: ""
1415

1516
waitForK8sResources:
1617
image: groundnuty/k8s-wait-for:v1.3

0 commit comments

Comments
 (0)