Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Introduced a comprehensive deployment guide for AdvisoryAI, detailing local builds, remote inference toggles, and scaling guidance. - Created a multi-role Dockerfile for building WebService and Worker images. - Added a docker-compose file for local and offline deployment. - Implemented a Helm chart for Kubernetes deployment with persistence and remote inference options. - Established a new API endpoint `/advisories/summary` for deterministic summaries of observations and linksets. - Introduced a JSON schema for risk profiles and a validator to ensure compliance with the schema. - Added unit tests for the risk profile validator to ensure functionality and error handling.
72 lines
2.9 KiB
YAML
72 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "stellaops-advisoryai.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "stellaops-advisoryai.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "stellaops-advisoryai.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "stellaops-advisoryai.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
- name: ASPNETCORE_URLS
|
|
value: "http://0.0.0.0:{{ .Values.service.port }}"
|
|
- name: ADVISORYAI__INFERENCE__MODE
|
|
value: "{{ .Values.inference.mode }}"
|
|
- name: ADVISORYAI__INFERENCE__REMOTE__BASEADDRESS
|
|
value: "{{ .Values.inference.remote.baseAddress }}"
|
|
- name: ADVISORYAI__INFERENCE__REMOTE__ENDPOINT
|
|
value: "{{ .Values.inference.remote.endpoint }}"
|
|
- name: ADVISORYAI__INFERENCE__REMOTE__APIKEY
|
|
value: "{{ .Values.inference.remote.apiKey }}"
|
|
- name: ADVISORYAI__INFERENCE__REMOTE__TIMEOUT
|
|
value: "{{ printf "00:00:%d" .Values.inference.remote.timeoutSeconds }}"
|
|
- name: ADVISORYAI__STORAGE__PLANCACHEDIRECTORY
|
|
value: {{ .Values.storage.planCachePath | quote }}
|
|
- name: ADVISORYAI__STORAGE__OUTPUTDIRECTORY
|
|
value: {{ .Values.storage.outputPath | quote }}
|
|
- name: ADVISORYAI__QUEUE__DIRECTORYPATH
|
|
value: {{ .Values.storage.queuePath | quote }}
|
|
envFrom:
|
|
{{- if .Values.extraEnvFrom }}
|
|
- secretRef:
|
|
name: {{ .Values.extraEnvFrom | first }}
|
|
{{- end }}
|
|
{{- if .Values.extraEnv }}
|
|
{{- range .Values.extraEnv }}
|
|
- name: {{ .name }}
|
|
value: {{ .value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- containerPort: {{ .Values.service.port }}
|
|
volumeMounts:
|
|
- name: advisoryai-data
|
|
mountPath: /app/data
|
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
|
volumes:
|
|
- name: advisoryai-data
|
|
{{- if .Values.storage.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.storage.persistence.existingClaim | default (printf "%s-data" (include "stellaops-advisoryai.fullname" .)) }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
|
|
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
|
|
affinity: {{- toYaml .Values.affinity | nindent 8 }}
|