Skip to content

Commit

Permalink
feat: added enabled flag to core apps dynamically for console [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Mar 18, 2021
1 parent 762c44c commit ca81dd9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
17 changes: 2 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.12.4](https://github.com/redkubes/otomi-core/compare/v0.12.3...v0.12.4) (2021-03-18)


### Features

* set vault url path to indicate oidc auth ([540ce22](https://github.com/redkubes/otomi-core/commit/540ce226b5f880db38d5c0346e91df4f7489b193))


### Bug Fixes

* gen-drone, gitea double [ci skip] ([f3bc6b6](https://github.com/redkubes/otomi-core/commit/f3bc6b6ab717270629b2b4b231dd3f9039f2cd60))

### [0.12.3](https://github.com/redkubes/otomi-core/compare/v0.12.2...v0.12.3) (2021-03-18)


### Bug Fixes

* tools version ([1a34807](https://github.com/redkubes/otomi-core/commit/1a348072e0b833199834a5e0246eaa1776006d7d))
* vault resource validation error ([#357](https://github.com/redkubes/otomi-core/issues/357)) ([#369](https://github.com/redkubes/otomi-core/issues/369)) ([4eb0a8c](https://github.com/redkubes/otomi-core/commit/4eb0a8cc232929512eb1c15fcad731aee43516ff))
- tools version ([1a34807](https://github.com/redkubes/otomi-core/commit/1a348072e0b833199834a5e0246eaa1776006d7d))
- vault resource validation error ([#357](https://github.com/redkubes/otomi-core/issues/357)) ([#369](https://github.com/redkubes/otomi-core/issues/369)) ([4eb0a8c](https://github.com/redkubes/otomi-core/commit/4eb0a8cc232929512eb1c15fcad731aee43516ff))

### [0.12.2](https://github.com/redkubes/otomi-core/compare/v0.12.1...v0.12.2) (2021-03-18)

Expand Down
3 changes: 2 additions & 1 deletion helmfile.d/snippets/defaults.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ helmDefaults:
wait: true
timeout: 1200
force: false
cleanupOnFail: true
cleanupOnFail: false
skipDeps: true
disableValidation: true
{{- $v := (readFile "../env/env/clusters.yaml" | fromYaml) }}
environments:
Expand Down
10 changes: 0 additions & 10 deletions helmfile.d/utils/addIgnorePolicyAnnotation.gotmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# To use this function you must provide the following arguments:
# "policies" - (required) list of policies [ "policy-id-1,policy-id-2" ]
# "type" - (optional) type of annotation [ "pod" | "sidecar" | "container" ]
# "name" - (optional) in case type=container [ "container-name" ]
#
# Example Yaml:
# podAnnotations:
# \{ \{- tpl $addIgnorePolicyAnnotation (dict "type" "container" "name" "wget" "policies" (list "banned-image-tags" "psp-allowed-users")) | nindent 2 }}
#
#
{{- $joinTpl := readFile "../../helmfile.d/utils/joinListWithSep.gotmpl" }}
{{- $policies := (readFile "../../env/env/policies.yaml" | fromYaml) | get "policies" dict }}
{{- $activatePolicies := list -}}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@
"tag": true
}
},
"version": "0.12.4"
"version": "0.12.3"
}
18 changes: 17 additions & 1 deletion values/otomi-console/otomi-console.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
{{- $clusters = append $clusters $cluster -}}
{{- end -}}
{{- end -}}
{{- $services := list -}}
{{- range $s := $v.services -}}
{{- if hasKey $v.charts $s.name -}}
{{- $enabled := ($v.charts | get $s.name) | get "enabled" true -}}
{{- $s := set $s "enabled" $enabled -}}
{{- $services = append $services $s -}}
{{- end }}
{{- end }}
{{- $teamServices := list -}}
{{- range $s := $v.teamConfig.services -}}
{{- if hasKey $v.charts $s.name -}}
{{- $enabled := ($v.charts | get $s.name) | get "enabled" true -}}
{{- $s := set $s "enabled" $enabled -}}
{{- $teamServices = append $teamServices $s -}}
{{- end }}
{{- end }}
# fromJson does not yet exist in helmfile: https://github.com/roboll/helmfile/issues/1557
# 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]+" -}}
Expand Down Expand Up @@ -42,7 +58,7 @@ env:
CONSOLE_MODE: {{ and (ne ($v.otomi | get "pullSecret" "") "") (ne ($v.otomi | get "mode" "ee") "ce") | ternary "ee" "ce" }}
CLUSTER_ID: '{{ printf "%s/%s" $c.provider $c.name }}'
CLUSTERS: '{{ $clusters | toJson }}'
CORE: '{"services":{{ $v.services | toJson }},"teamConfig":{"services":{{ $v.teamConfig.services | toJson }}}}'
CORE: '{"services":{{ $services | toJson }},"teamConfig":{"services":{{ $teamServices | toJson }}}}'
CORE_VERSION: '{{ $version }}'
TEAMS: '{{ keys $v.teamConfig.teams | sortAlpha | toJson }}'

Expand Down

0 comments on commit ca81dd9

Please sign in to comment.