Skip to content

Commit

Permalink
fix: sops detection [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Jun 29, 2021
1 parent 04c0b53 commit 2032a04
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions values/otomi-api/otomi-api.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
{{- $hasGitea := $g | get "enabled" true }}
{{- $giteaValuesUrl := print "gitea." $v.cluster.domainSuffix }}
{{- $teamConfig := dict "services" $v.teamConfig.services }}
# so we get package.json version in two regexFind steps:
{{- $version := (readFile "../../package.json") | regexFind "\"version\": \"([0-9.]+)\"" | regexFind "[0-9]+.[0-9]+.[0-9]+" -}}
{{- $coreVersion := (printf "v%s" $version) }}
{{- $sopsEnv := tpl (readFile "../../helmfile.d/snippets/sops-env.gotmpl") ($v | get "kms.sops" dict) }}
{{- $skipVerify := eq ($cm | get "stage" "production") "staging" }}
{{- $sopsEnabled := $v | get "kms.sops" nil | ternary true false }}
{{- $pkgVersion := (exec "bash" (list "-c" "require('./package.json').version")) }}
{{- $coreVersion := (printf "v%s" $pkgVersion) }}
{{- $sopsEnabled := ne ($v | get "kms.sops" "") "" }}

replicaCount: 1

Expand Down Expand Up @@ -49,7 +47,7 @@ env:
{{- if hasKey $o "disableSync" }}
DISABLE_SYNC: true
{{- end }}
USE_SOPS: {{ $v | get "kms.sops" nil | ternary true false }}
USE_SOPS: {{ $sopsEnabled }}
CORE_VERSION: '{{ $version }}'
{{- if (not ($v.charts.keycloak | get "enabled" true)) }}
NO_AUTHZ: true
Expand Down

0 comments on commit 2032a04

Please sign in to comment.