Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions helm-charts/cogstack-ce-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ kubectl delete namespace cogstack

| Repository | Name | Version |
|------------|------|---------|
| file://../cogstack-jupyterhub-helm | cogstack-jupyterhub(cogstack-jupyterhub-helm) | 0.0.1 |
| file://../medcat-service-helm | medcat-service(medcat-service-helm) | 0.0.1 |
| file://../medcat-service-helm | anoncat-service(medcat-service-helm) | 0.0.1 |
| file://../medcat-trainer-helm | medcat-trainer(medcat-trainer-helm) | 0.0.1 |
| file://../cogstack-jupyterhub-helm | cogstack-jupyterhub(cogstack-jupyterhub-helm) | >=0.0.1 |
| file://../medcat-service-helm | medcat-service(medcat-service-helm) | >=0.0.1 |
| file://../medcat-service-helm | anoncat-service(medcat-service-helm) | >=0.0.1 |
| file://../medcat-trainer-helm | medcat-trainer(medcat-trainer-helm) | >=0.0.1 |
| https://opensearch-project.github.io/helm-charts/ | opensearch | 3.5.0 |
| https://opensearch-project.github.io/helm-charts/ | opensearch-dashboards | 3.5.0 |

Expand Down
5 changes: 5 additions & 0 deletions helm-charts/medcat-service-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Helm chart to deploy CogStack medcat-service

**Homepage:** <https://docs.cogstack.org/>

## Installation

```sh
Expand Down Expand Up @@ -130,6 +132,9 @@ You should see the NVIDIA GPU device listing if the GPU is properly accessible.
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| demoUi.footer.content | string | Default about footer for medcat service. | Markdown contents to be rendered in the demo UI. |
| demoUi.footer.custom | bool | `false` | Set to true to mount a custom markdown footer for the DemoUI. |
| demoUi.footer.existingConfigMap | object | `{}` | Optional: Reference an existing configmap for the custom footer markdown. Overrides demoUi.footer.content. |
| env.APP_ENABLE_DEMO_UI | bool | `true` | |
| env.APP_ENABLE_METRICS | bool | `true` | Observability Env Vars |
| env.APP_ENABLE_TRACING | bool | `false` | |
Expand Down
14 changes: 14 additions & 0 deletions helm-charts/medcat-service-helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.demoUi.footer.custom }}
{{- if not .Values.demoUi.footer.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "medcat-service.fullname" . }}-demoui-config
labels:
{{- include "medcat-service.labels" . | nindent 4 }}
app.kubernetes.io/component: medcat-service
data:
demo-ui-footer.md: |
{{ .Values.demoUi.footer.content | indent 4 }}
{{- end }}
{{- end }}
26 changes: 23 additions & 3 deletions helm-charts/medcat-service-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ spec:
strategy: {{ toYaml .Values.updateStrategy | nindent 4 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
labels:
{{- include "medcat-service.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
Expand Down Expand Up @@ -68,6 +69,10 @@ spec:
- name: "APP_MEDCAT_MODEL_PACK"
value: {{ .Values.env.APP_MEDCAT_MODEL_PACK | quote }}
{{- end}}
{{- if .Values.demoUi.footer.custom }}
- name: APP_DEMO_UI_CUSTOM_MARKDOWN_PATH
value: /config/demo-ui-footer.md
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
Expand All @@ -84,7 +89,7 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.model.downloadUrl .Values.volumeMounts }}
{{- if or .Values.model.downloadUrl .Values.volumeMounts .Values.demoUi.footer.custom }}
volumeMounts:
{{- if .Values.volumeMounts }}
{{- toYaml .Values.volumeMounts | nindent 12 }}
Expand All @@ -93,6 +98,12 @@ spec:
- name: models
mountPath: /models
{{- end }}
{{- if .Values.demoUi.footer.custom }}
- name: demoui-config
mountPath: /config/demo-ui-footer.md
subPath: {{ .Values.demoUi.footer.existingConfigMap.subPath | default "demo-ui-footer.md" }}
readOnly: true
{{- end }}
{{- end }}
{{- if or .Values.extraInitContainers .Values.model.downloadUrl }}
initContainers:
Expand Down Expand Up @@ -133,7 +144,7 @@ spec:
{{- with .Values.extraInitContainers }}
{{- tpl (toYaml .) $root | nindent 8 }}
{{- end }}
{{- if or .Values.model.downloadUrl .Values.volumes }}
{{- if or .Values.model.downloadUrl .Values.volumes .Values.demoUi.footer.custom }}
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
Expand All @@ -142,6 +153,15 @@ spec:
- name: models
emptyDir: {}
{{- end }}
{{- if .Values.demoUi.footer.custom }}
- name: demoui-config
configMap:
{{- if .Values.demoUi.footer.existingConfigMap.name }}
name: {{ .Values.demoUi.footer.existingConfigMap.name }}
{{- else }}
name: {{ include "medcat-service.fullname" . }}-demoui-config
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
21 changes: 21 additions & 0 deletions helm-charts/medcat-service-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ model: {}
# Name of the model pack to save to. Will be stored at /models/<name>
# name: my-model.zip

demoUi:
footer:
# -- Set to true to mount a custom markdown footer for the DemoUI.
custom: false
# -- Optional: Reference an existing configmap for the custom footer markdown. Overrides demoUi.footer.content.
existingConfigMap: {}
# -- The name of an existing configmap. Contains markdown under the key "demo-ui-footer.md"
# name: ""
# -- Optional key/subPath within the configmap (default: demo-ui-footer.md)
# subPath: demo-ui-footer.md
# -- Markdown contents to be rendered in the demo UI.
# @default -- Default about footer for medcat service.
content: |
## About

MedCAT Service is part of the [CogStack](https://cogstack.org/) open-source NLP toolkit.

For support or enquiries, contact [contact@cogstack.org](mailto:contact@cogstack.org).

Source code and documentation: [github.com/CogStack/cogstack-nlp](https://github.com/CogStack/cogstack-nlp).

# -- Allow setting env values from field/configmap/secret references. Defaults to include k8s details for observability.
envValueFrom:
K8S_NODE_NAME:
Expand Down
Loading