53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
labels:
|
|
app: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
{{- include "cocopilot.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
spec:
|
|
containers:
|
|
- name: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
image: {{ include "cocopilot.image" . | quote}}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- if .Values.resources }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 10 }}
|
|
{{- end }}
|
|
ports:
|
|
- containerPort: {{ .Values.config.port }}
|
|
name: svc
|
|
env:
|
|
- name: OVERRIDE_CODEX_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
key: password
|
|
- name: OVERRIDE_CHAT_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
key: password
|
|
{{- if .Values.env }}
|
|
{{- toYaml .Values.env | nindent 8 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /app/config.json
|
|
subPath: config.json
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "cocopilot.fullname" . | printf "%s-cocopilot"}}
|
|
items:
|
|
- key: config.json
|
|
path: config.json
|