diff --git a/charts/turing/Chart.yaml b/charts/turing/Chart.yaml index a7e5de7d..d4fcc77b 100644 --- a/charts/turing/Chart.yaml +++ b/charts/turing/Chart.yaml @@ -22,4 +22,4 @@ maintainers: - email: caraml-dev@caraml.dev name: caraml-dev name: turing -version: 0.3.0 +version: 0.3.1 diff --git a/charts/turing/templates/_config.tpl b/charts/turing/templates/_config.tpl index 716ed7dd..0ed65dfc 100644 --- a/charts/turing/templates/_config.tpl +++ b/charts/turing/templates/_config.tpl @@ -20,19 +20,19 @@ BatchEnsemblingConfig: 3.10.*: {{ printf "%s%s:%s" $ensmblerJobPrefix "3.10" $ensemblerTag }} KanikoConfig: BuildContextURI: {{ printf "%s/%s" "git://github.com/caraml-dev/turing.git#refs/tags" $tag }} -{{- end -}} +{{- end }} EnsemblerServiceBuilderConfig: ClusterName: products-production ImageBuildingConfig: BaseImageRef: - 3.7.*: {{ printf "%s%s:%s" $servicePrefix "3.7" $ensemblerTag }} - 3.8.*: {{ printf "%s%s:%s" $servicePrefix "3.8" $ensemblerTag }} - 3.9.*: {{printf "%s%s:%s" $servicePrefix "3.9" $ensemblerTag }} - 3.10.*: {{ printf "%s%s:%s" $servicePrefix "3.10" $ensemblerTag }} + 3.7.*: {{ printf "%s%s:%s" $servicePrefix "3.7" $ensemblerTag }} + 3.8.*: {{ printf "%s%s:%s" $servicePrefix "3.8" $ensemblerTag }} + 3.9.*: {{printf "%s%s:%s" $servicePrefix "3.9" $ensemblerTag }} + 3.10.*: {{ printf "%s%s:%s" $servicePrefix "3.10" $ensemblerTag }} KanikoConfig: &kanikoConfig BuildContextURI: {{ printf "%s/%s" "git://github.com/caraml-dev/turing.git#refs/tags" $tag }} RouterDefaults: Image: ghcr.io/caraml-dev/turing/turing-router:{{ printf "%s" $tag }} -{{- end -}} -{{- end -}} -{{- end -}} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/turing/templates/_helpers.tpl b/charts/turing/templates/_helpers.tpl index 97510af9..1c1cad4c 100644 --- a/charts/turing/templates/_helpers.tpl +++ b/charts/turing/templates/_helpers.tpl @@ -255,5 +255,5 @@ OpenapiConfig: {{- define "turing.config" -}} {{- $defaultConfig := include "turing.defaultConfig" . | fromYaml -}} {{- $renderedConfig := include "turing.renderedConfig" (list $ . .Values.rendered ) | fromYaml -}} -{{- merge $renderedConfig $defaultConfig .Values.config | toYaml }} +{{- merge $defaultConfig $renderedConfig .Values.config | toYaml }} {{- end -}} diff --git a/charts/turing/tests/turing_config_secret_test.yaml b/charts/turing/tests/turing_config_secret_test.yaml index 54ca0c65..204a92c0 100644 --- a/charts/turing/tests/turing_config_secret_test.yaml +++ b/charts/turing/tests/turing_config_secret_test.yaml @@ -125,3 +125,48 @@ tests: - matchRegex: path: stringData.[config.yaml] pattern: "3.10\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.10:some-ensembler-tag" + - it: should use rendered version when BatchEnsemblingConfig is enabled + set: + rendered: + releasedVersion: v1.0.0-test-release + ensemblerTag: some-ensembler-tag + config: + BatchEnsemblingConfig: + Enabled: true + asserts: + - isKind: + of: Secret + - matchRegex: + path: metadata.name + pattern: my-release-turing-config$ + - matchRegex: + path: stringData.[config.yaml] + pattern: "BuildContextURI: git://github.com/caraml-dev/turing.git#refs/tags/v1.0.0-test-release" + - matchRegex: + path: stringData.[config.yaml] + pattern: "Image: ghcr.io/caraml-dev/turing/turing-router:v1.0.0-test-release" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.7\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.7:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.8\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.8:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.9\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.9:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.10\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.10:some-ensembler-tag" + # + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.7\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.7:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.8\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.8:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.9\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.9:some-ensembler-tag" + - matchRegex: + path: stringData.[config.yaml] + pattern: "3.10\\.\\*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.10:some-ensembler-tag"