Skip to content

Commit 41de94f

Browse files
build(helm): Fix helm chart testing. Fix lint issues. Bump trainer version (#43)
1 parent 30e1616 commit 41de94f

4 files changed

Lines changed: 51 additions & 44 deletions

File tree

.github/workflows/kubernetes-charts-build.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,45 @@ jobs:
2020
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.repository == 'CogStack/cogstack-platform-toolkit'
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v5.0.0
2424
with:
2525
fetch-depth: 0
2626

2727
- name: Set up Helm
28-
uses: azure/setup-helm@v4.3.0
29-
with:
30-
version: v3.18.3
28+
uses: azure/setup-helm@v4.3.1
3129

32-
- uses: actions/setup-python@v5.3.0
30+
- uses: actions/setup-python@v6.0.0
3331
with:
3432
python-version: '3.x'
3533
check-latest: true
3634

3735
- name: Set up chart-testing
38-
uses: helm/chart-testing-action@v2.7.0
36+
uses: helm/chart-testing-action@v2.8.0
3937

4038
- name: Run chart-testing (list-changed)
4139
id: list-changed
40+
working-directory: .
4241
run: |
43-
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch}})
42+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts)
4443
if [[ -n "$changed" ]]; then
45-
echo "changed=true" >> "$GITHUB_UTPUT"
44+
echo "changed=true" >> "$GITHUB_OUTPUT"
4645
fi
4746
4847
- name: Run chart-testing (lint)
4948
if: steps.list-changed.outputs.changed == 'true'
50-
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
49+
working-directory: .
50+
env:
51+
CT_CHECK_VERSION_INCREMENT: "false"
52+
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deployment/kubernetes/charts
5153

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

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

6063
helm-publish:
6164
runs-on: ubuntu-latest

deployment/kubernetes/charts/medcat-trainer-helm/Chart.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ version: 0.0.1
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "latest"
24+
appVersion: "3.5.1"
25+
26+
maintainers:
27+
- name: alhendrickson
28+
email: alistair@cogstack.org
2529

2630
# Chart.yaml
2731
dependencies:
28-
- name: solr
29-
version: "9.6.10"
30-
repository: "oci://registry-1.docker.io/bitnamicharts"
31-
- name: postgresql
32-
version: 16.7.27
33-
repository: "oci://registry-1.docker.io/bitnamicharts"
34-
condition: postgresql.enabled
32+
- name: solr
33+
version: "9.6.10"
34+
repository: "oci://registry-1.docker.io/bitnamicharts"
35+
- name: postgresql
36+
version: 16.7.27
37+
repository: "oci://registry-1.docker.io/bitnamicharts"
38+
condition: postgresql.enabled

deployment/kubernetes/charts/medcat-trainer-helm/templates/tests/test-connection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ spec:
1111
- name: wget
1212
image: busybox
1313
command: ['wget']
14-
args: ['{{ include "medcat-trainer-helm.fullname" . }}-nginx:{{ .Values.service.port }}/nginx/health/live', '-U helm-test {{ .Chart.Name }}-v{{ .Chart.Version }}']
14+
args: ['{{ include "medcat-trainer-helm.fullname" . }}-medcat-trainer:{{ .Values.service.port }}/nginx/health/live', '-U helm-test {{ .Chart.Name }}-v{{ .Chart.Version }}']
1515
restartPolicy: Never

deployment/kubernetes/charts/medcat-trainer-helm/values.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ image:
1111
# This sets the pull policy for images.
1212
pullPolicy: Always
1313
# Overrides the image tag whose default is the chart appVersion.
14-
tag: "latest"
14+
# tag: "latest"
1515
nginxImage:
1616
repository: nginx
1717
pullPolicy: IfNotPresent
@@ -26,7 +26,7 @@ env:
2626
EMAIL_PORT: "465"
2727
EMAIL_USER: "example@cogstack.org"
2828
ENV: "non-prod"
29-
LOAD_EXAMPLES: "1"
29+
LOAD_EXAMPLES: "0"
3030
LOAD_NUM_DOC_PAGES: "10"
3131
MAX_DATASET_SIZE: "10000"
3232
MAX_MEDCAT_MODELS: "2"
@@ -55,7 +55,7 @@ postgresql:
5555
repository: bitnamilegacy/postgresql
5656
# Pin legacy version of postgresql following bitnami change to remove free images. Match prefect version
5757
tag: 17.6.0-debian-12-r4
58-
58+
5959
persistence:
6060
media:
6161
# Size of PVC for files like model packs and other media downloaded by medcat trainer
@@ -64,28 +64,28 @@ persistence:
6464
# Size of the PVC for the static HTML site
6565
size: 100Mi
6666
sqlite:
67-
# Size of the PVC for the Sqlite database
67+
# Size of the PVC for the Sqlite database
6868
size: 100Mi
6969
# Size of the PVC for the Sqlite backups
7070
backupDbSize: 300Mi
7171
storageClassName: ""
7272

7373
# MedCAT config as described here: https://github.com/CogStack/cogstack-nlp/blob/main/medcat-v2/medcat/config/config.py
7474
medcatConfig: |
75-
cat.linking.optim = {'type': 'standard', 'lr': 0.1}
76-
cat.linking.filter_before_disamb = True
77-
# 20 - INFO; 10 - DEBUG
78-
cat.general.log_level = 20
79-
# Recommended is to have this one negative
80-
cat.linking.similarity_threshold = -5
81-
# And this one to be used as the real th
82-
cat.linking.similarity_threshold_trainer = -5
83-
# Used for limiting the number of occ of a concept in a project
84-
cat.general.cui_count_limit = 100000000
85-
# Is unlink full
86-
cat.general.full_unlink = False
87-
# use this spacy model
88-
cat.general.spacy_model = 'en_core_web_md'
75+
cat.linking.optim = {'type': 'standard', 'lr': 0.1}
76+
cat.linking.filter_before_disamb = True
77+
# 20 - INFO; 10 - DEBUG
78+
cat.general.log_level = 20
79+
# Recommended is to have this one negative
80+
cat.linking.similarity_threshold = -5
81+
# And this one to be used as the real th
82+
cat.linking.similarity_threshold_trainer = -5
83+
# Used for limiting the number of occ of a concept in a project
84+
cat.general.cui_count_limit = 100000000
85+
# Is unlink full
86+
cat.general.full_unlink = False
87+
# use this spacy model
88+
cat.general.spacy_model = 'en_core_web_md'
8989
9090
solr:
9191
replicaCount: 1
@@ -109,10 +109,10 @@ solr:
109109
image:
110110
repository: bitnamilegacy/zookeeper
111111
tag: 3.9.3-debian-12-r22
112-
replicaCount: 1 #
112+
replicaCount: 1
113113
persistence:
114-
size: 1Gi # Default is 8Gi
115-
114+
# Set size of the PVC for zookeper. Default is 8Gi
115+
size: 1Gi
116116

117117
# 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/
118118
imagePullSecrets: []
@@ -164,9 +164,10 @@ service:
164164
type: ClusterIP
165165
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
166166
port: 8001
167-
apiPort: 8000 # Note medcat-trainer API is currently hardcoded on 8000 in the run.sh script
167+
# Note medcat-trainer API is currently hardcoded on 8000 in the run.sh script
168+
apiPort: 8000
168169
# nodePort: 30001
169-
170+
170171
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
171172
ingress:
172173
enabled: false
@@ -224,7 +225,6 @@ nginx:
224225
path: /nginx/health/live
225226
port: http
226227

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

255255
# Runtime class name for the pod (e.g., "nvidia" for GPU workloads)
256-
runtimeClassName: ""
256+
runtimeClassName: ""

0 commit comments

Comments
 (0)