From 7d03876dc732bac1d4748d760e1dcd34d93d759d Mon Sep 17 00:00:00 2001 From: alhendrickson Date: Thu, 18 Jun 2026 09:54:00 +0000 Subject: [PATCH] fix(helm/medcat-trainer): Fix resources being duplicated for nginx, and move nginx image key --- helm-charts/medcat-trainer-helm/README.md | 14 +++++------ .../templates/medcat-trainer-deployment.yaml | 6 ++--- helm-charts/medcat-trainer-helm/values.yaml | 25 +++++++++++++------ 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/helm-charts/medcat-trainer-helm/README.md b/helm-charts/medcat-trainer-helm/README.md index 1d61ea5..c200214 100644 --- a/helm-charts/medcat-trainer-helm/README.md +++ b/helm-charts/medcat-trainer-helm/README.md @@ -84,14 +84,12 @@ These features are not yet existing but to be added in future: | livenessProbe.httpGet.port | string | `"api"` | | | medcatConfig | string | Default config for MedCAT Trainer | MedCAT config as described here: [MedCAT config](https://github.com/CogStack/cogstack-nlp/blob/main/medcat-v2/medcat/config/config.py) | | nameOverride | string | `""` | This is to override the chart name. | -| nginx.livenessProbe.httpGet.path | string | `"/nginx/health/live"` | | -| nginx.livenessProbe.httpGet.port | string | `"http"` | | -| nginx.readinessProbe.httpGet.path | string | `"/nginx/health/live"` | | -| nginx.readinessProbe.httpGet.port | string | `"http"` | | -| nginxImage | object | `{"pullPolicy":"IfNotPresent","repository":"nginx","tag":"1.29.1"}` | This sets the container image for the nginx server more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | -| nginxImage.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | -| nginxImage.repository | string | `"nginx"` | Image repository for the nginx server | -| nginxImage.tag | string | `"1.29.1"` | This sets the image tag for the nginx server | +| nginx | object | `{"image":{"pullPolicy":"IfNotPresent","repository":"nginx","tag":"1.29.1"},"livenessProbe":{"httpGet":{"path":"/nginx/health/live","port":"http"}},"readinessProbe":{"httpGet":{"path":"/nginx/health/live","port":"http"}},"resources":{}}` | Configuration for the UI pod running nginx. | +| nginx.image | object | `{"pullPolicy":"IfNotPresent","repository":"nginx","tag":"1.29.1"}` | This sets the container image for the nginx server more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | +| nginx.image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | +| nginx.image.repository | string | `"nginx"` | Image repository for the nginx server | +| nginx.image.tag | string | `"1.29.1"` | This sets the image tag for the nginx server | +| nginx.resources | object | `{}` | Resources for the nginx container. More information can be found here: https://kubernetes.io/docs/concepts/containers/ | | nginxUpdateStrategy.type | string | `"RollingUpdate"` | | | nodeSelector | object | `{}` | | | persistence.media.size | string | `"8Gi"` | | diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml b/helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml index 76aa68c..91f0b41 100644 --- a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml +++ b/helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml @@ -121,8 +121,8 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} - image: "{{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}" - imagePullPolicy: {{ .Values.nginxImage.pullPolicy }} + image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" + imagePullPolicy: {{ .Values.nginx.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -135,7 +135,7 @@ spec: readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.resources }} + {{- with .Values.nginx.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/helm-charts/medcat-trainer-helm/values.yaml b/helm-charts/medcat-trainer-helm/values.yaml index 2e42cf8..cceabfe 100644 --- a/helm-charts/medcat-trainer-helm/values.yaml +++ b/helm-charts/medcat-trainer-helm/values.yaml @@ -13,14 +13,6 @@ image: pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. # tag: "latest" -# -- This sets the container image for the nginx server more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ -nginxImage: - # -- Image repository for the nginx server - repository: nginx - # -- This sets the pull policy for images. - pullPolicy: IfNotPresent - # -- This sets the image tag for the nginx server - tag: "1.29.1" # -- Add any environment variables here that should be set in the medcat-trainer container env: @@ -296,7 +288,16 @@ startupProbe: periodSeconds: 10 initialDelaySeconds: 15 +# -- Configuration for the UI pod running nginx. nginx: + # -- Resources for the nginx container. More information can be found here: https://kubernetes.io/docs/concepts/containers/ + resources: {} + # limits: + # cpu: 1 # Recommended to leave unset + # memory: 500Mi + # requests: + # cpu: 100m # For reference loading the examples on startup measured to use 2CPU and 2Gi memory + # memory: 200Mi livenessProbe: httpGet: path: /nginx/health/live @@ -305,6 +306,14 @@ nginx: httpGet: path: /nginx/health/live port: http + # -- This sets the container image for the nginx server more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ + image: + # -- Image repository for the nginx server + repository: nginx + # -- This sets the pull policy for images. + pullPolicy: IfNotPresent + # -- This sets the image tag for the nginx server + tag: "1.29.1" # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ autoscaling: