Skip to content

Commit

Permalink
Fix turing whitespace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shydefoo committed Sep 29, 2023
1 parent 68065d0 commit 3fe2908
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/turing/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ maintainers:
- email: [email protected]
name: caraml-dev
name: turing
version: 0.3.0
version: 0.3.1
16 changes: 8 additions & 8 deletions charts/turing/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion charts/turing/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
45 changes: 45 additions & 0 deletions charts/turing/tests/turing_config_secret_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 3fe2908

Please sign in to comment.