File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 24
24
{{- range $teamId, $team := $v.teamConfig.teams }}
25
25
{{- if hasKey $team "services" -}}
26
26
{{- range $s := $team.services -}}
27
- {{- $sd := dict -}}
28
- {{- with $s.name -}}{{ $sd = set $sd "name" . }}{{- end }}
29
- {{- with $s.type -}}{{ $sd = set $sd "type" . }}{{- end }}
27
+ {{- $sd := dict "teamId" $teamId -}}
28
+ {{- if hasKey $s "name" -}}{{ $sd = set $sd "name" $s.name }}
29
+ {{- if hasKey $s "type" -}}
30
+ {{ $sd = set $sd "ingress" (dict "type" $s.type "domain" $v.cluster.domainSuffix "subdomain" (printf "%s.team-%s" $s.name $teamId)) }}
31
+ {{- end }}
32
+ {{- end }}
30
33
{{- if hasKey $s "ksvc" -}}{{ $sd = set $sd "ksvc" true }}{{- end }}
31
- {{- with $s.port -}}{{ $sd = set $sd "port" . }}{{- end }}
34
+ {{- if hasKey $s "ownHost" -}}{{ $sd = set $sd "ownHost" $s.ownHost }}{{- end }}
32
35
{{ $teamServices = append $teamServices $sd }}
33
36
{{- end }}
34
37
{{- end }}
35
38
{{- end }}
36
39
{{- end }}
40
+
37
41
# fromJson does not yet exist in helmfile: https://github.com/roboll/helmfile/issues/1557
38
42
# so we get package.json version in two regexFind steps:
39
43
{{- $version := (readFile "../../package.json") | regexFind "\"version\": \"([0-9.]+)\"" | regexFind "[0-9]+.[0-9]+.[0-9]+" -}}
68
72
TEAM_SERVICES: '{{ $teamServices | toJson }}'
69
73
TEAMS: '{{ keys $v.teamConfig.teams | sortAlpha | toJson }}'
70
74
71
-
72
75
podAnnotations:
73
76
policy.otomi.io/ignore: "banned-image-tags,psp-allowed-users"
74
77
policy.otomi.io/ignore.wget: "container-limits"
You can’t perform that action at this time.
0 commit comments