Skip to content

Commit ca81dd9

Browse files
author
Maurice Faber
committed
feat: added enabled flag to core apps dynamically for console [ci skip]
1 parent 762c44c commit ca81dd9

File tree

6 files changed

+23
-29
lines changed

6 files changed

+23
-29
lines changed

CHANGELOG.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,12 @@
22

33
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.
44

5-
### [0.12.4](https://github.com/redkubes/otomi-core/compare/v0.12.3...v0.12.4) (2021-03-18)
6-
7-
8-
### Features
9-
10-
* set vault url path to indicate oidc auth ([540ce22](https://github.com/redkubes/otomi-core/commit/540ce226b5f880db38d5c0346e91df4f7489b193))
11-
12-
13-
### Bug Fixes
14-
15-
* gen-drone, gitea double [ci skip] ([f3bc6b6](https://github.com/redkubes/otomi-core/commit/f3bc6b6ab717270629b2b4b231dd3f9039f2cd60))
16-
175
### [0.12.3](https://github.com/redkubes/otomi-core/compare/v0.12.2...v0.12.3) (2021-03-18)
186

19-
207
### Bug Fixes
218

22-
* tools version ([1a34807](https://github.com/redkubes/otomi-core/commit/1a348072e0b833199834a5e0246eaa1776006d7d))
23-
* 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))
9+
- tools version ([1a34807](https://github.com/redkubes/otomi-core/commit/1a348072e0b833199834a5e0246eaa1776006d7d))
10+
- 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))
2411

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

helmfile.d/snippets/defaults.gotmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ helmDefaults:
44
wait: true
55
timeout: 1200
66
force: false
7-
cleanupOnFail: true
7+
cleanupOnFail: false
8+
skipDeps: true
89
disableValidation: true
910
{{- $v := (readFile "../env/env/clusters.yaml" | fromYaml) }}
1011
environments:

helmfile.d/utils/addIgnorePolicyAnnotation.gotmpl

-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
# To use this function you must provide the following arguments:
2-
# "policies" - (required) list of policies [ "policy-id-1,policy-id-2" ]
3-
# "type" - (optional) type of annotation [ "pod" | "sidecar" | "container" ]
4-
# "name" - (optional) in case type=container [ "container-name" ]
5-
#
6-
# Example Yaml:
7-
# podAnnotations:
8-
# \{ \{- tpl $addIgnorePolicyAnnotation (dict "type" "container" "name" "wget" "policies" (list "banned-image-tags" "psp-allowed-users")) | nindent 2 }}
9-
#
10-
#
111
{{- $joinTpl := readFile "../../helmfile.d/utils/joinListWithSep.gotmpl" }}
122
{{- $policies := (readFile "../../env/env/policies.yaml" | fromYaml) | get "policies" dict }}
133
{{- $activatePolicies := list -}}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@
6969
"tag": true
7070
}
7171
},
72-
"version": "0.12.4"
72+
"version": "0.12.3"
7373
}

values/otomi-console/otomi-console.gotmpl

+17-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@
1212
{{- $clusters = append $clusters $cluster -}}
1313
{{- end -}}
1414
{{- end -}}
15+
{{- $services := list -}}
16+
{{- range $s := $v.services -}}
17+
{{- if hasKey $v.charts $s.name -}}
18+
{{- $enabled := ($v.charts | get $s.name) | get "enabled" true -}}
19+
{{- $s := set $s "enabled" $enabled -}}
20+
{{- $services = append $services $s -}}
21+
{{- end }}
22+
{{- end }}
23+
{{- $teamServices := list -}}
24+
{{- range $s := $v.teamConfig.services -}}
25+
{{- if hasKey $v.charts $s.name -}}
26+
{{- $enabled := ($v.charts | get $s.name) | get "enabled" true -}}
27+
{{- $s := set $s "enabled" $enabled -}}
28+
{{- $teamServices = append $teamServices $s -}}
29+
{{- end }}
30+
{{- end }}
1531
# fromJson does not yet exist in helmfile: https://github.com/roboll/helmfile/issues/1557
1632
# so we get package.json version in two regexFind steps:
1733
{{- $version := (readFile "../../package.json") | regexFind "\"version\": \"([0-9.]+)\"" | regexFind "[0-9]+.[0-9]+.[0-9]+" -}}
@@ -42,7 +58,7 @@ env:
4258
CONSOLE_MODE: {{ and (ne ($v.otomi | get "pullSecret" "") "") (ne ($v.otomi | get "mode" "ee") "ce") | ternary "ee" "ce" }}
4359
CLUSTER_ID: '{{ printf "%s/%s" $c.provider $c.name }}'
4460
CLUSTERS: '{{ $clusters | toJson }}'
45-
CORE: '{"services":{{ $v.services | toJson }},"teamConfig":{"services":{{ $v.teamConfig.services | toJson }}}}'
61+
CORE: '{"services":{{ $services | toJson }},"teamConfig":{"services":{{ $teamServices | toJson }}}}'
4662
CORE_VERSION: '{{ $version }}'
4763
TEAMS: '{{ keys $v.teamConfig.teams | sortAlpha | toJson }}'
4864

0 commit comments

Comments
 (0)