Skip to content

Commit

Permalink
Merge pull request #45 from helxplatform/develop
Browse files Browse the repository at this point in the history
Release 5.2.0
  • Loading branch information
YaphetKG authored Aug 14, 2024
2 parents e0c773c + ddcce5d commit cb00c4b
Show file tree
Hide file tree
Showing 9 changed files with 531 additions and 311 deletions.
20 changes: 10 additions & 10 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 5.1.0
version: 5.2.0
engine: gotpl


appVersion: "2.10.2"
appVersion: "v2.13.2"

# For dynamic updates to dependencies, versions must specify a range.
# Apart from version constrains operators = != > < >= <= the following shorthand notations are supported:
Expand All @@ -29,26 +29,26 @@ appVersion: "2.10.2"

dependencies:
- name: airflow
version: "^8.6.1"
version: "8.8.0"
condition: airflow.enabled
repository: "https://airflow-helm.github.io/charts"
- name: elasticsearch
version: "^8.5.1"
version: "8.5.1"
repository: "https://helm.elastic.co"
condition: elasticsearch.enabled
- name: redis
version: "^18.1.1"
version: "18.1.1"
repository: "https://charts.bitnami.com/bitnami"
condition: redis.enabled
- name: tranql
version: "^0.4.2"
version: "0.4.2"
condition: tranql.enabled
repository: "@helx-charts"
- name: redis-insight
version: "^0.1.0"
version: "0.1.0"
condition: redis-insight.enabled
repository: "@helx-charts"
- name: ui
condition: ui.enabled
version: "^1.3.0"
repository: "@helx-charts"
version: "^1.4.0"
repository: "@helx-charts"
378 changes: 102 additions & 276 deletions README.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

### Architecture of Search Chart

For full architeture overview please refer to our documentation [here](https://dug.readthedocs.io/en/latest/architecture/roger/).

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}


{{ template "chart.valuesSection" . }}
19 changes: 18 additions & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,27 @@ Environment vars for API pods
{{- end }}
{{- end }}
{{- if .Values.api.deployment.extraEnv }}
{{- toYaml .Values.api.deployment.extraEnv | nindent 10 }}
{{- toYaml .Values.api.deployment.extraEnv | nindent 0 }}
{{- end }}
- name: ROOT_PATH
value: /search-api
{{ if .Values.config.program_config }}
- name: PROGRAM_DESCRIPTION
value: {{ .Values.config.program_config | toJson | quote }}
{{ end }}
{{ if .Values.config.consent_id_config }}
- name: CONSENT_ID_PATH
value: "/home/dug/dug/consent-id.json"
{{ end }}
{{ if .Values.config.missing_programs }}
- name: MISSING_PROGRAM_PATH
value: "/home/dug/dug/missing_programs.json"
{{ end }}
{{ if .Values.config.missing_studies }}
- name: MISSING_STUDIES_PATH
value: "/home/dug/dug/missing_studies.json"
{{ end }}

{{- end -}}

{{/*
Expand Down
44 changes: 44 additions & 0 deletions templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ spec:
resources:
{{- toYaml .Values.api.deployment.resources | nindent 10 }}
volumeMounts:
{{ if .Values.config.program_config }}
- name: program-config
mountPath: "/home/dug/dug/program-names.json"
subPath: "program_names.json"
{{ end }}
{{ if .Values.config.consent_id_config }}
- name: consent-id-config
mountPath: "/home/dug/dug/consent-id.json"
subPath: "consent_id.json"
{{ end }}
{{ if .Values.config.missing_studies }}
- name: missing-studies-config
mountPath: "/home/dug/dug/missing_studies.json"
subPath: "missing_studies.json"
{{ end }}
{{ if .Values.config.missing_programs }}
- name: missing-programs-config
mountPath: "/home/dug/dug/missing_programs.json"
subPath: "missing_programs.json"
{{ end }}
- name: gunicorn-config
mountPath: "/home/dug/dug/uvicorn_custom.py"
subPath: "uvicorn_custom.py"
Expand All @@ -51,6 +71,30 @@ spec:
configMap:
name: {{ include "search.api.web.fullname" . }}-gunicorn-conf
defaultMode: 0777
{{ if .Values.config.program_config }}
- name: program-config
configMap:
name: {{ include "search.api.web.fullname" . }}-program-names
defaultMode: 0777
{{ end }}
{{ if .Values.config.consent_id_config }}
- name: consent-id-config
configMap:
name: {{ include "search.api.web.fullname" . }}-consent-id-config
defaultMode: 0777
{{ end }}
{{ if .Values.config.missing_programs }}
- name: missing-programs-config
configMap:
name: {{ include "search.api.web.fullname" . }}-missing-programs-config
defaultMode: 0777
{{ end }}
{{ if .Values.config.missing_studies }}
- name: missing-studies-config
configMap:
name: {{ include "search.api.web.fullname" . }}-missing-studies-config
defaultMode: 0777
{{ end }}
- name: elastic-ca
secret:
secretName: {{ include "search.api.elasticsearch.uname" . }}-certs
Expand Down
25 changes: 24 additions & 1 deletion templates/api-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,27 @@ spec:
targetPort: {{ .Values.api.deployment.apiPort }}
selector:
app: {{ .Values.api.appName }}
type: {{ .Values.api.service.type }}
type: {{ .Values.api.service.type }}
---
{{ if .Values.chat.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "search.api.web.fullname" . }}-chat
{{- if .Values.api.service.annotations }}
annotations:
{{- toYaml .Values.api.service.annotations | nindent 4}}
{{- end }}
labels:
app: {{ .Values.api.appName }}-chat
{{- include "search.api.labels" . | nindent 4 }}
spec:
ports:
- name: chat-port
protocol: TCP
port: {{ .Values.chat.apiPort }}
targetPort: {{ .Values.chat.apiPort }}
selector:
app: {{ .Values.api.appName }}-chat
type: {{ .Values.chat.service.type }}
{{ end }}
41 changes: 41 additions & 0 deletions templates/chat-bot-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{ if .Values.chat.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "search.api.web.fullname" . }}-chat
labels:
app: {{ .Values.api.appName}}
spec:
replicas: {{ .Values.chat.replicas }}
selector:
matchLabels:
app: {{ .Values.api.appName }}-chat
template:
metadata:
labels:
app: {{ .Values.api.appName}}-chat
spec:
imagePullSecrets:
{{- toYaml .Values.api.deployment.imagePullSecrets | nindent 8 }}
containers:
- image: {{ .Values.chat.image.repository }}:{{ .Values.chat.image.tag }}
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
name: {{ include "search.api.web.fullname" . }}-container
env:
- name: API_URL
value: {{ .Values.chat.config.api_url }}
- name: SCRIPT_NAME
value: {{ .Values.chat.root_path }}
ports:
- containerPort: {{ .Values.chat.apiPort }}
command: [
"gunicorn",
"app:app",
"-b",
"0.0.0.0:{{ .Values.chat.apiPort }}"
]
tty: true
stdin: true
resources:
{{- toYaml .Values.chat.resources | nindent 10 }}
{{ end }}
47 changes: 47 additions & 0 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ data:
annotator_monarch_url: {{ .Values.config.annotation.monarch.url | quote }}
annotator_sapbert_classification_url: {{ .Values.config.annotation.sapbert.classification_url | quote }}
annotator_sapbert_annotator_url: {{ .Values.config.annotation.sapbert.annotator_url | quote }}
annotator_sapbert_bagel_enabled: {{ .Values.config.annotation.sapbert.bagel.enabled | quote }}
annotator_sapbert_bagel_url: {{ .Values.config.annotation.sapbert.bagel.url | quote }}
annotator_sapbert_bagel_prompt: {{ .Values.config.annotation.sapbert.bagel.prompt | quote }}
annotator_sapbert_bagel_llm_model_name: {{ .Values.config.annotation.sapbert.bagel.llm_args.llm_model_name | quote }}
annotator_sapbert_bagel_llm_organization: {{ .Values.config.annotation.sapbert.bagel.llm_args.organization | quote }}
annotator_sapbert_bagel_llm_access_key: {{ .Values.config.annotation.sapbert.bagel.llm_args.access_key | quote }}
annotator_sapbert_score_threshold: {{ .Values.config.annotation.sapbert.score_threshold | quote }}
s3_access_key: {{ .Values.config.s3.access_key }}
s3_bucket: {{ .Values.config.s3.bucket }}
s3_host: {{ .Values.config.s3.host }}
Expand Down Expand Up @@ -68,4 +75,44 @@ data:
from uvicorn.workers import UvicornWorker
class SubPathWorker(UvicornWorker):
CONFIG_KWARGS = {"root_path": "/search-api" }
{{ if .Values.config.program_config }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "search.api.web.fullname" . }}-program-names
data:
program_names.json: |-
{{ .Values.config.program_config | toJson }}
{{ end }}

{{ if .Values.config.consent_id_config }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "search.api.web.fullname" . }}-consent-id-config
data:
consent_id.json: |-
{{ .Values.config.consent_id_config | toJson }}
{{ end }}
---
{{ if .Values.config.missing_studies }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "search.api.web.fullname" . }}-missing-studies-config
data:
missing_studies.json: |-
{{ .Values.config.missing_studies | toJson }}
{{ end }}
---
{{ if .Values.config.missing_programs }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "search.api.web.fullname" . }}-missing-programs-config
data:
missing_programs.json: |-
{{ .Values.config.missing_programs | toJson }}
{{ end }}
Loading

0 comments on commit cb00c4b

Please sign in to comment.