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: 8 additions & 0 deletions .github/linters/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://github.com/helm/chart-testing#configuration
remote: origin
target-branch: main
chart-dirs:
- deployment/kubernetes/charts
helm-extra-args: --timeout 1000s
chart-repos:
- opensearch=https://opensearch-project.github.io/helm-charts
6 changes: 3 additions & 3 deletions .github/workflows/kubernetes-charts-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: list-changed
working-directory: .
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts)
changed=$(ct list-changed --config .github/linters/ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
Expand All @@ -66,7 +66,7 @@ jobs:
working-directory: .
env:
CT_CHECK_VERSION_INCREMENT: "false"
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts
run: ct lint --config .github/linters/ct.yaml

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
working-directory: .
run: ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts
run: ct install --config .github/linters/ct.yaml

helm-publish:
runs-on: ubuntu-latest
Expand Down
10 changes: 8 additions & 2 deletions deployment/kubernetes/charts/cogstack-helm-ce/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ dependencies:
- name: medcat-trainer-helm
repository: file://../medcat-trainer-helm
version: 0.0.1
digest: sha256:08371a768a9f330606777903fab163ca84918222bbe3f516fab2772f5563d390
generated: "2026-02-26T15:00:09.073243923Z"
- name: opensearch
repository: https://opensearch-project.github.io/helm-charts/
version: 3.5.0
- name: opensearch-dashboards
repository: https://opensearch-project.github.io/helm-charts/
version: 3.5.0
digest: sha256:5c0bf142e8060c45f3045a9a925a3801813f23b7f0a37d100ffe2a3ab3d387e7
generated: "2026-02-27T14:25:01.321704435Z"
8 changes: 8 additions & 0 deletions deployment/kubernetes/charts/cogstack-helm-ce/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ dependencies:
alias: medcat-trainer
version: "0.0.1"
repository: "file://../medcat-trainer-helm"
- name: opensearch
condition: opensearch.enabled
version: "3.5.0"
repository: "https://opensearch-project.github.io/helm-charts/"
- name: opensearch-dashboards
condition: opensearch-dashboards.enabled
version: "3.5.0"
repository: "https://opensearch-project.github.io/helm-charts/"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Note Helm Chart Testing is preconfigured to use any values in the ci folder.
# https://github.com/helm/chart-testing/blob/b4897a48501b16fc1f4fd9d08197bc884f0fd38c/doc/ct_lint.md
opensearch:
replicas: 1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $TR
export CONTAINER_PORT_API=$(kubectl get pod --namespace {{ .Release.Namespace }} $TRAINER_POD_NAME -o jsonpath="{.spec.containers[?(@.name==\"medcat-trainer\")].ports[0].containerPort}")
kubectl --namespace {{ .Release.Namespace }} port-forward $TRAINER_POD_NAME 8000:$CONTAINER_PORT 8001:$CONTAINER_PORT_API &

{{- if .Values.opensearch.enabled }}
# 4. Opensearch
export OPENSEARCH_SERVICE={{ template "opensearch.serviceName" .Subcharts.opensearch }}
export OPENSEARCH_PORT={{ .Values.opensearch.httpPort }}
kubectl --namespace {{ .Release.Namespace }} port-forward svc/$OPENSEARCH_SERVICE 9200:$OPENSEARCH_PORT &
{{- end }}

{{- if index .Values "opensearch-dashboards" "enabled" }}
export OPENSEARCH_DASHBOARD_SERVICE={{ include "opensearch-dashboards.fullname" (index .Subcharts "opensearch-dashboards" ) }}
export OPENSEARCH_DASHBOARD_PORT={{ index .Values "opensearch-dashboards" "service" "port" }}
kubectl --namespace {{ .Release.Namespace }} port-forward svc/$OPENSEARCH_DASHBOARD_SERVICE 5601:$OPENSEARCH_DASHBOARD_PORT &
{{- end }}

echo "Visit http://127.0.0.1:5000 to use MedCAT Service"
echo "Visit http://127.0.0.1:5001 to use AnonCAT"
echo "Visit http://127.0.0.1:8000 to use MedCAT Trainer"
echo "Visit http://127.0.0.1:8000 to use MedCAT Trainer"
{{ if .Values.opensearch.enabled }}echo "Call https://127.0.0.1:9200 to use OpenSearch"{{- end }}
{{ if index .Values "opensearch-dashboards" "enabled" }}echo "Visit http://127.0.0.1:5601 to use OpenSearch Dashboards"{{- end }}
9 changes: 9 additions & 0 deletions deployment/kubernetes/charts/cogstack-helm-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ medcat-service:
image:
repository: cogstacksystems/medcat-service
tag: "1.2.0"

opensearch:
enabled: true
extraEnvs:
- name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
value: "opensearch-312$A"

opensearch-dashboards:
enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ replicaCount: 1
image:
repository: cogstacksystems/medcat-trainer
# This sets the pull policy for images.
pullPolicy: Always
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "latest"
nginxImage:
Expand Down
5 changes: 3 additions & 2 deletions deployment/kubernetes/local_dev_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ minikube addons enable metrics-server
minikube dashboard --url=true &

helm upgrade medcat-service ./medcat-service-helm --install --recreate-pods --wait --timeout 5m0s # Install if it doesnt already exist, else upgrade

helm test medcat-service --logs

# Run CT Lint
Expand All @@ -21,7 +20,9 @@ helm test medcat-service --logs
# Test medcat trainer
# kubectl port-forward svc/nginx 8000:8000

helm upgrade x ./medcat-trainer-helm --install --wait --timeout 5m0s # Install if it doesnt already exist, else upgrade
# helm upgrade x ./medcat-trainer-helm --install --wait --timeout 5m0s # Install if it doesnt already exist, else upgrade
# kubectl port-forward svc/medcat-trainer-solr 8983:8983

## helm install trainer-registry oci://registry-1.docker.io/cogstacksystems/medcat-trainer-helm --wait --timeout 5m0s

helm upgrade cogstack-helm-ce ./cogstack-helm-ce --install --render-subchart-notes --wait --timeout 5m0s
Loading