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
23 changes: 13 additions & 10 deletions .github/workflows/kubernetes-charts-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,45 @@ jobs:
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.repository == 'CogStack/cogstack-platform-toolkit'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v4.3.0
with:
version: v3.18.3
uses: azure/setup-helm@v4.3.1

- uses: actions/setup-python@v5.3.0
- uses: actions/setup-python@v6.0.0
with:
python-version: '3.x'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
uses: helm/chart-testing-action@v2.8.0

- name: Run chart-testing (list-changed)
id: list-changed
working-directory: .
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch}})
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_UTPUT"
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
working-directory: .
env:
CT_CHECK_VERSION_INCREMENT: "false"
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.12.0

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
working-directory: .
run: ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts

helm-publish:
runs-on: ubuntu-latest
Expand Down
20 changes: 12 additions & 8 deletions deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ version: 0.0.1
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "latest"
appVersion: "3.5.1"

maintainers:
- name: alhendrickson
email: alistair@cogstack.org

# Chart.yaml
dependencies:
- name: solr
version: "9.6.10"
repository: "oci://registry-1.docker.io/bitnamicharts"
- name: postgresql
version: 16.7.27
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: postgresql.enabled
- name: solr
version: "9.6.10"
repository: "oci://registry-1.docker.io/bitnamicharts"
- name: postgresql
version: 16.7.27
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: postgresql.enabled
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "medcat-trainer-helm.fullname" . }}-nginx:{{ .Values.service.port }}/nginx/health/live', '-U helm-test {{ .Chart.Name }}-v{{ .Chart.Version }}']
args: ['{{ include "medcat-trainer-helm.fullname" . }}-medcat-trainer:{{ .Values.service.port }}/nginx/health/live', '-U helm-test {{ .Chart.Name }}-v{{ .Chart.Version }}']
restartPolicy: Never
50 changes: 25 additions & 25 deletions deployment/kubernetes/charts/medcat-trainer-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
# This sets the pull policy for images.
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
# tag: "latest"
nginxImage:
repository: nginx
pullPolicy: IfNotPresent
Expand All @@ -26,7 +26,7 @@ env:
EMAIL_PORT: "465"
EMAIL_USER: "example@cogstack.org"
ENV: "non-prod"
LOAD_EXAMPLES: "1"
LOAD_EXAMPLES: "0"
LOAD_NUM_DOC_PAGES: "10"
MAX_DATASET_SIZE: "10000"
MAX_MEDCAT_MODELS: "2"
Expand Down Expand Up @@ -55,7 +55,7 @@ postgresql:
repository: bitnamilegacy/postgresql
# Pin legacy version of postgresql following bitnami change to remove free images. Match prefect version
tag: 17.6.0-debian-12-r4

persistence:
media:
# Size of PVC for files like model packs and other media downloaded by medcat trainer
Expand All @@ -64,28 +64,28 @@ persistence:
# Size of the PVC for the static HTML site
size: 100Mi
sqlite:
# Size of the PVC for the Sqlite database
# Size of the PVC for the Sqlite database
size: 100Mi
# Size of the PVC for the Sqlite backups
backupDbSize: 300Mi
storageClassName: ""

# MedCAT config as described here: https://github.com/CogStack/cogstack-nlp/blob/main/medcat-v2/medcat/config/config.py
medcatConfig: |
cat.linking.optim = {'type': 'standard', 'lr': 0.1}
cat.linking.filter_before_disamb = True
# 20 - INFO; 10 - DEBUG
cat.general.log_level = 20
# Recommended is to have this one negative
cat.linking.similarity_threshold = -5
# And this one to be used as the real th
cat.linking.similarity_threshold_trainer = -5
# Used for limiting the number of occ of a concept in a project
cat.general.cui_count_limit = 100000000
# Is unlink full
cat.general.full_unlink = False
# use this spacy model
cat.general.spacy_model = 'en_core_web_md'
cat.linking.optim = {'type': 'standard', 'lr': 0.1}
cat.linking.filter_before_disamb = True
# 20 - INFO; 10 - DEBUG
cat.general.log_level = 20
# Recommended is to have this one negative
cat.linking.similarity_threshold = -5
# And this one to be used as the real th
cat.linking.similarity_threshold_trainer = -5
# Used for limiting the number of occ of a concept in a project
cat.general.cui_count_limit = 100000000
# Is unlink full
cat.general.full_unlink = False
# use this spacy model
cat.general.spacy_model = 'en_core_web_md'

solr:
replicaCount: 1
Expand All @@ -109,10 +109,10 @@ solr:
image:
repository: bitnamilegacy/zookeeper
tag: 3.9.3-debian-12-r22
replicaCount: 1 #
replicaCount: 1
persistence:
size: 1Gi # Default is 8Gi

# Set size of the PVC for zookeper. Default is 8Gi
size: 1Gi

# 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/
imagePullSecrets: []
Expand Down Expand Up @@ -164,9 +164,10 @@ service:
type: ClusterIP
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
port: 8001
apiPort: 8000 # Note medcat-trainer API is currently hardcoded on 8000 in the run.sh script
# Note medcat-trainer API is currently hardcoded on 8000 in the run.sh script
apiPort: 8000
# nodePort: 30001

# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
Expand Down Expand Up @@ -224,7 +225,6 @@ nginx:
path: /nginx/health/live
port: http


# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
autoscaling:
enabled: false
Expand Down Expand Up @@ -253,4 +253,4 @@ tolerations: []
affinity: {}

# Runtime class name for the pod (e.g., "nvidia" for GPU workloads)
runtimeClassName: ""
runtimeClassName: ""
Loading