-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
314 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v2 | ||
name: danswer-azimuth | ||
description: An self-service platform for Retrieval-Augmented Generation. | ||
type: application | ||
version: 0.1.0 | ||
appVersion: 0.1.0 | ||
icon: https://raw.githubusercontent.com/danswer-ai/danswer/1fabd9372d66cd54238847197c33f091a724803b/DanswerWithName.png | ||
|
||
# TODO: Switch to upstream Danswer chart if/when the following patches are accepted: | ||
# - https://github.com/danswer-ai/danswer/pull/1605 | ||
# - https://github.com/danswer-ai/danswer/pull/1606 | ||
# - https://github.com/danswer-ai/danswer/pull/1608 | ||
# - https://github.com/danswer-ai/danswer/pull/1726 | ||
# - https://github.com/danswer-ai/danswer/pull/1754 | ||
dependencies: | ||
- name: danswer-stack | ||
version: 0.5.10 | ||
repository: https://stackhpc.github.io/danswer | ||
|
||
annotations: | ||
azimuth.stackhpc.com/label: Danswer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Danswer Azimuth | ||
|
||
This Helm chart deploys a Danswer instance that is exposed to users | ||
via the Azimuth Platforms page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
controls: {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "danswer-azimuth.name" -}} | ||
{{- .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
*/}} | ||
{{- define "danswer-azimuth.fullname" -}} | ||
{{- if contains .Chart.Name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "danswer-azimuth.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels for a chart-level resource. | ||
*/}} | ||
{{- define "danswer-azimuth.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "danswer-azimuth.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Labels for a chart-level resource. | ||
*/}} | ||
{{- define "danswer-azimuth.labels" -}} | ||
helm.sh/chart: {{ include "danswer-azimuth.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
{{ include "danswer-azimuth.selectorLabels" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: zenith.stackhpc.com/v1alpha1 | ||
kind: Client | ||
metadata: | ||
name: {{ include "danswer-azimuth.fullname" . }} | ||
labels: {{ include "danswer-azimuth.labels" . | nindent 4 }} | ||
spec: | ||
reservationName: {{ include "danswer-azimuth.fullname" . }} | ||
upstream: | ||
serviceName: {{ .Release.Name }}-nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ .Release.Name }}-danswer-fixup | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
# Need to keep around for post-delete hooks | ||
helm.sh/resource-policy: keep | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- persistentvolumeclaims | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- statefulsets | ||
- deployments | ||
verbs: | ||
- get | ||
- patch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ .Release.Name }}-danswer-fixup | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
# Need to keep around for post-delete hooks | ||
helm.sh/resource-policy: keep | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ .Release.Name }}-danswer-fixup | ||
subjects: | ||
# Namespace is unique to Azimuth app so using default | ||
# service account is fine. | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: {{ .Release.Name }} | ||
--- | ||
# Delete stateful set PVCs since upstream Helm chart doesn't expose this config option | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: pvc-cleanup | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
helm.sh/hook: post-delete | ||
helm.sh/hook-weight: "0" | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: pvc-deleter | ||
image: gcr.io/google_containers/hyperkube:v1.18.0 | ||
command: | ||
- kubectl | ||
- delete | ||
- -n | ||
- {{ .Release.Name }} | ||
- pvc | ||
- --all | ||
restartPolicy: Never | ||
serviceAccountName: default | ||
--- | ||
# Until https://github.com/unoplat/vespa-helm-charts/pull/23 | ||
# is merged, we need to patch vespa stateful set after deployment | ||
# so that service label selectors match correctly. | ||
# Since Danswer API pod gives up on Vespa application package | ||
# init request after just 5 retries we also need to restart the API | ||
# deployment to trigger a retry on the Vespa setup by the API pod | ||
# after labels are corrected. | ||
# Use three separate hooks with different hook-weights to control ordering. | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: vespa-label-updater | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
helm.sh/hook: post-install,post-upgrade,post-rollback | ||
helm.sh/hook-weight: "1" | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: label-updater | ||
image: gcr.io/google_containers/hyperkube:v1.18.0 | ||
command: | ||
- kubectl | ||
- patch | ||
- -n | ||
- {{ .Release.Name }} | ||
- statefulset/vespa | ||
- -p | ||
- {{ printf "{'spec':{'template':{'metadata':{'labels':{'app.kubernetes.io/instance':'%s'}}}}}" .Release.Name | replace "'" "\"" | squote }} | ||
restartPolicy: Never | ||
serviceAccountName: default | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: vespa-waiter | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
helm.sh/hook: post-install,post-upgrade,post-rollback | ||
helm.sh/hook-weight: "2" | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: waiter | ||
image: gcr.io/google_containers/hyperkube:v1.18.0 | ||
command: | ||
- kubectl | ||
- wait | ||
- -n | ||
- {{ .Release.Name }} | ||
- --for=condition=Ready | ||
- pod/vespa-0 | ||
restartPolicy: Never | ||
serviceAccountName: default | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: danswer-api-restarter | ||
namespace: {{ .Release.Name }} | ||
annotations: | ||
helm.sh/hook: post-install,post-upgrade,post-rollback | ||
helm.sh/hook-weight: "3" | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: restarter | ||
image: gcr.io/google_containers/hyperkube:v1.18.0 | ||
command: | ||
- kubectl | ||
- rollout | ||
- restart | ||
- -n | ||
- {{ .Release.Name }} | ||
- {{ printf "deployment/%s-danswer-stack-api-deployment" .Release.Name }} | ||
restartPolicy: Never | ||
serviceAccountName: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: zenith.stackhpc.com/v1alpha1 | ||
kind: Reservation | ||
metadata: | ||
name: {{ include "danswer-azimuth.fullname" . }} | ||
labels: {{ include "danswer-azimuth.labels" . | nindent 4 }} | ||
annotations: | ||
azimuth.stackhpc.com/service-label: {{ quote .Values.zenithClient.label }} | ||
azimuth.stackhpc.com/service-icon-url: {{ .Values.zenithClient.iconUrl }} | ||
{{- with .Values.zenithClient.description }} | ||
azimuth.stackhpc.com/service-description: {{ quote . }} | ||
{{- end }} | ||
spec: | ||
credentialSecretName: {{ include "danswer-azimuth.fullname" . }}-credential |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"properties": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
zenithClient: | ||
iconUrl: https://raw.githubusercontent.com/danswer-ai/danswer/1fabd9372d66cd54238847197c33f091a724803b/Danswer.png | ||
description: | ||
label: "Danswer" | ||
|
||
vespaVolumeSize: &vespa-capacity 10Gi | ||
|
||
danswer-stack: | ||
# appVersionOverride: # e.g. v0.5.1 | ||
configMap: | ||
AUTH_TYPE: basic | ||
DISABLE_TELEMETRY: true | ||
DISABLE_LLM_CHOOSE_SEARCH: true | ||
nginx: | ||
service: | ||
type: ClusterIP | ||
vespa: | ||
service: | ||
type: ClusterIP | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: vespa-storage | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: *vespa-capacity | ||
|