diff --git a/.github/workflows/kubernetes-charts-build.yaml b/.github/workflows/kubernetes-charts-build.yaml index 7c64764..a5f811b 100644 --- a/.github/workflows/kubernetes-charts-build.yaml +++ b/.github/workflows/kubernetes-charts-build.yaml @@ -20,34 +20,36 @@ 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' @@ -55,7 +57,8 @@ jobs: - 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 diff --git a/deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml b/deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml index 9a74ccd..1f75d14 100644 --- a/deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml +++ b/deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml @@ -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 diff --git a/deployment/kubernetes/charts/medcat-trainer-helm/templates/tests/test-connection.yaml b/deployment/kubernetes/charts/medcat-trainer-helm/templates/tests/test-connection.yaml index 8a9f4cb..d03f3b1 100644 --- a/deployment/kubernetes/charts/medcat-trainer-helm/templates/tests/test-connection.yaml +++ b/deployment/kubernetes/charts/medcat-trainer-helm/templates/tests/test-connection.yaml @@ -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 diff --git a/deployment/kubernetes/charts/medcat-trainer-helm/values.yaml b/deployment/kubernetes/charts/medcat-trainer-helm/values.yaml index c2d9f4e..610ca43 100644 --- a/deployment/kubernetes/charts/medcat-trainer-helm/values.yaml +++ b/deployment/kubernetes/charts/medcat-trainer-helm/values.yaml @@ -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 @@ -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" @@ -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 @@ -64,7 +64,7 @@ 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 @@ -72,20 +72,20 @@ persistence: # 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 @@ -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: [] @@ -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 @@ -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 @@ -253,4 +253,4 @@ tolerations: [] affinity: {} # Runtime class name for the pod (e.g., "nvidia" for GPU workloads) -runtimeClassName: "" \ No newline at end of file +runtimeClassName: ""