Skip to content

Commit

Permalink
Merge pull request #14 from equinor/controller_env_with_tpl
Browse files Browse the repository at this point in the history
Apply tpl for controller.env items
  • Loading branch information
koropets authored Jun 6, 2023
2 parents 80f5e48 + 2a3169f commit e4453c2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions charts/gordo/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: argo-workflows
repository: https://argoproj.github.io/argo-helm
version: 0.23.2
digest: sha256:4e60fa878198a71e902b75f42ebf5c7c5a39b4d48a60005005293dc41c1eda00
generated: "2023-04-12T16:50:58.520016976+03:00"
version: 0.29.1
digest: sha256:c18f244272ab5802d81d059d5dd7d0e94088a08fc9bc34a85daa13ac55abf000
generated: "2023-06-06T14:38:08.525618295+03:00"
4 changes: 2 additions & 2 deletions charts/gordo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v2
name: gordo
appVersion: "2.1.0"
version: 0.3.1
version: 0.4.0
description: A Helm chart for Gordo
type: application
home: https://github.com/equinor/gordo-helm
sources:
- https://github.com/equinor/gordo
dependencies:
- name: argo-workflows
version: 0.23.2
version: 0.29.1
repository: https://argoproj.github.io/argo-helm
condition: argo-workflows.enabled
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/gordo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,4 @@ pathPerfix for controller ingress.
{{ "/" }}{{- include "gordo.controller.fullname" . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
11 changes: 7 additions & 4 deletions charts/gordo/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ spec:
protocol: TCP
env:
{{- $defaultEnvs := fromJson (include "gordo.controller.defaultEnvs" .) -}}
{{- $context := . }}
{{- $env := mustMerge $defaultEnvs .Values.controller.env -}}
{{- range $name := keys $env | uniq | sortAlpha }}
- name: {{ $name | quote }}
value: {{ get $env $name | quote }}
{{- range (keys $env | uniq | sortAlpha) }}
{{- /* Added toString due to - wrong type for value; expected string; got float64 0_o */}}
{{- $value := get $env . | toString }}
- name: {{ . | quote }}
value: {{ tpl $value $context | quote }}
{{- end }}
{{- if .Values.controller.readinessProbe.enabled }}
readinessProbe:
Expand Down Expand Up @@ -109,4 +112,4 @@ spec:
{{- include "gordo.selectorLabels" (dict "context" $ "component" $.Values.controller.name) | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
7 changes: 3 additions & 4 deletions charts/gordo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

nameOverride: ""
fullnameOverride: ""

images:
pullPolicy: IfNotPresent
Expand All @@ -20,12 +22,9 @@ controller:
pullPolicy: ""
tag: ""

nameOverride: ""
fullnameOverride: ""

containerPort: 8888

rustLog: "debug,kube=debug"
rustLog: "info,kube=info"
defaultDeployEnvironment: {}

deployImage:
Expand Down

0 comments on commit e4453c2

Please sign in to comment.