From 468213ddc95570fcecae0e91579954c63000aa42 Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:07:52 +0000 Subject: [PATCH 1/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/cogstack-ce-helm/README.md | 8 +++---- helm-charts/medcat-service-helm/README.md | 5 ++++ .../templates/asset-configmap.yaml | 14 +++++++++++ .../templates/deployment.yaml | 23 +++++++++++++++++-- helm-charts/medcat-service-helm/values.yaml | 20 ++++++++++++++++ 5 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 helm-charts/medcat-service-helm/templates/asset-configmap.yaml diff --git a/helm-charts/cogstack-ce-helm/README.md b/helm-charts/cogstack-ce-helm/README.md index cea5614..4d2af3a 100644 --- a/helm-charts/cogstack-ce-helm/README.md +++ b/helm-charts/cogstack-ce-helm/README.md @@ -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 | diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index 7344a41..d8e280e 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -2,6 +2,8 @@ A Helm chart to deploy CogStack medcat-service +**Homepage:** + ## Installation ```sh @@ -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 | `"## About\n\nMedCAT Service is part of the [CogStack](https://cogstack.org/) open-source NLP toolkit.\n\nFor support or enquiries, contact [contact@cogstack.org](mailto:contact@cogstack.org).\n\nSource code and documentation: [github.com/CogStack/cogstack-nlp](https://github.com/CogStack/cogstack-nlp).\n"` | Markdown contents used when existingConfigMap is not set. Mounted as demo-ui-footer.md. | +| 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. | | env.APP_ENABLE_DEMO_UI | bool | `true` | | | env.APP_ENABLE_METRICS | bool | `true` | Observability Env Vars | | env.APP_ENABLE_TRACING | bool | `false` | | diff --git a/helm-charts/medcat-service-helm/templates/asset-configmap.yaml b/helm-charts/medcat-service-helm/templates/asset-configmap.yaml new file mode 100644 index 0000000..d511cb0 --- /dev/null +++ b/helm-charts/medcat-service-helm/templates/asset-configmap.yaml @@ -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 }} diff --git a/helm-charts/medcat-service-helm/templates/deployment.yaml b/helm-charts/medcat-service-helm/templates/deployment.yaml index 60ecc4b..b1cc59a 100644 --- a/helm-charts/medcat-service-helm/templates/deployment.yaml +++ b/helm-charts/medcat-service-helm/templates/deployment.yaml @@ -68,6 +68,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 }} @@ -84,7 +88,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 }} @@ -93,6 +97,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: @@ -133,7 +143,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 }} @@ -142,6 +152,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: diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index 3d54ed3..a65f0d4 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -75,6 +75,26 @@ model: {} # Name of the model pack to save to. Will be stored at /models/ # 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. + 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 used when existingConfigMap is not set. Mounted as demo-ui-footer.md. + 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: From 30474e4c16a97904091078c128b04f2892bb9900 Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:10:26 +0000 Subject: [PATCH 2/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/medcat-service-helm/README.md | 2 +- helm-charts/medcat-service-helm/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index d8e280e..cd7ef4b 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -132,7 +132,7 @@ 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 | `"## About\n\nMedCAT Service is part of the [CogStack](https://cogstack.org/) open-source NLP toolkit.\n\nFor support or enquiries, contact [contact@cogstack.org](mailto:contact@cogstack.org).\n\nSource code and documentation: [github.com/CogStack/cogstack-nlp](https://github.com/CogStack/cogstack-nlp).\n"` | Markdown contents used when existingConfigMap is not set. Mounted as demo-ui-footer.md. | +| demoUi.footer.content | string | Default about footer for medcat service. | Markdown contents used when existingConfigMap is not set. Mounted as demo-ui-footer.md. | | 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. | | env.APP_ENABLE_DEMO_UI | bool | `true` | | diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index a65f0d4..8a62674 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -86,6 +86,7 @@ demoUi: # -- Optional key/subPath within the configmap (default: demo-ui-footer.md) # subPath: demo-ui-footer.md # -- Markdown contents used when existingConfigMap is not set. Mounted as demo-ui-footer.md. + # @default -- Default about footer for medcat service. content: | ## About From d402a022b21174fd232500349a12f91ba0250ec6 Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:12:03 +0000 Subject: [PATCH 3/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/medcat-service-helm/README.md | 4 ++-- helm-charts/medcat-service-helm/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index cd7ef4b..136cdc9 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -132,9 +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 used when existingConfigMap is not set. Mounted as demo-ui-footer.md. | +| 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. | +| 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` | | diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index 8a62674..3973548 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -79,13 +79,13 @@ 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. + # -- 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 used when existingConfigMap is not set. Mounted as demo-ui-footer.md. + # -- Markdown contents to be rendered in the demo UI. # @default -- Default about footer for medcat service. content: | ## About From 7fdd26f6b697f324872568a47b8ca0931767e2dd Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:36:16 +0000 Subject: [PATCH 4/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/medcat-service-helm/README.md | 2 +- .../templates/{asset-configmap.yaml => configmap.yaml} | 0 helm-charts/medcat-service-helm/templates/deployment.yaml | 3 ++- helm-charts/medcat-service-helm/values.yaml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) rename helm-charts/medcat-service-helm/templates/{asset-configmap.yaml => configmap.yaml} (100%) diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index 136cdc9..441bdd9 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -154,7 +154,7 @@ You should see the NVIDIA GPU device listing if the GPU is properly accessible. | extraManifests | list | `[]` | Additional manifests to deploy to kubernetes. Can be templated | | fullnameOverride | string | `""` | | | hostAliases | list | `[]` | Host aliases for the pod | -| image | object | `{"pullPolicy":"IfNotPresent","repository":"cogstacksystems/medcat-service"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | +| image | object | `{"pullPolicy":"IfNotPresent","repository":"cogstacksystems/medcat-service","tag":"latest"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | | image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | | image.repository | string | `"cogstacksystems/medcat-service"` | Image repository for the MedCAT service container | | imagePullSecrets | list | `[]` | This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ | diff --git a/helm-charts/medcat-service-helm/templates/asset-configmap.yaml b/helm-charts/medcat-service-helm/templates/configmap.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/asset-configmap.yaml rename to helm-charts/medcat-service-helm/templates/configmap.yaml diff --git a/helm-charts/medcat-service-helm/templates/deployment.yaml b/helm-charts/medcat-service-helm/templates/deployment.yaml index b1cc59a..d49935f 100644 --- a/helm-charts/medcat-service-helm/templates/deployment.yaml +++ b/helm-charts/medcat-service-helm/templates/deployment.yaml @@ -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 }} diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index 3973548..abcc4ae 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -13,7 +13,7 @@ image: # -- This sets the pull policy for images. pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - # tag: "latest" + tag: "latest" env: APP_ENABLE_DEMO_UI: true From 73754db74c173a29d7251a0126833e7f99525fcb Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:37:51 +0000 Subject: [PATCH 5/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/medcat-service-helm/README.md | 2 +- helm-charts/medcat-service-helm/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index 441bdd9..136cdc9 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -154,7 +154,7 @@ You should see the NVIDIA GPU device listing if the GPU is properly accessible. | extraManifests | list | `[]` | Additional manifests to deploy to kubernetes. Can be templated | | fullnameOverride | string | `""` | | | hostAliases | list | `[]` | Host aliases for the pod | -| image | object | `{"pullPolicy":"IfNotPresent","repository":"cogstacksystems/medcat-service","tag":"latest"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | +| image | object | `{"pullPolicy":"IfNotPresent","repository":"cogstacksystems/medcat-service"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | | image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | | image.repository | string | `"cogstacksystems/medcat-service"` | Image repository for the MedCAT service container | | imagePullSecrets | list | `[]` | This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ | diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index abcc4ae..3973548 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -13,7 +13,7 @@ image: # -- This sets the pull policy for images. pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "latest" + # tag: "latest" env: APP_ENABLE_DEMO_UI: true From 2a1e2f54203ad8708c6042fdec6f0771b21120a4 Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Wed, 29 Jul 2026 12:46:06 +0000 Subject: [PATCH 6/6] feat(helm): Medcat Service custom footer functionality --- helm-charts/medcat-service-helm/README.md | 2 +- helm-charts/medcat-service-helm/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-charts/medcat-service-helm/README.md b/helm-charts/medcat-service-helm/README.md index 136cdc9..fe958b5 100644 --- a/helm-charts/medcat-service-helm/README.md +++ b/helm-charts/medcat-service-helm/README.md @@ -132,7 +132,7 @@ 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.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` | | diff --git a/helm-charts/medcat-service-helm/values.yaml b/helm-charts/medcat-service-helm/values.yaml index 3973548..5567563 100644 --- a/helm-charts/medcat-service-helm/values.yaml +++ b/helm-charts/medcat-service-helm/values.yaml @@ -85,7 +85,7 @@ demoUi: # 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. + # -- Markdown contents to be rendered in the demo UI. # @default -- Default about footer for medcat service. content: | ## About