31 lines
1.6 KiB
YAML
31 lines
1.6 KiB
YAML
{{/*
|
|
Generates deployment specs for K10 services and other services such as
|
|
"frontend" and "kanister".
|
|
*/}}
|
|
{{- include "singleAuth.check" . -}}
|
|
{{- $main_context := . -}}
|
|
{{- $stateless_services := include "get.enabledStatelessServices" . | splitList " " -}}
|
|
{{- $colocated_services := include "get.enabledColocatedServices" . | fromYaml -}}
|
|
{{ $service_list := include "get.enabledRestServices" . | splitList " " }}
|
|
{{- range $skip, $k10_service := $service_list }}
|
|
{{ if not (hasKey $colocated_services $k10_service ) }}
|
|
{{/* Set $stateful for stateful services when .Values.global.persistence.enabled is true */}}
|
|
{{- $stateful := and $.Values.global.persistence.enabled (not (has $k10_service $stateless_services)) -}}
|
|
{{ $replicas := get $.Values (printf "%sReplicas" $k10_service) | default 1 }}
|
|
{{ $tmp_contx := dict "main" $main_context "k10_service" $k10_service "stateful" $stateful "replicas" $replicas }}
|
|
{{ if eq $k10_service "metering" }}
|
|
{{- include "k10-metering" $tmp_contx -}}
|
|
{{ else }}
|
|
{{- include "k10-default" $tmp_contx -}}
|
|
{{ end }}
|
|
{{ end }}{{/* if not (hasKey $colocated_services $k10_service ) */}}
|
|
{{- end }}
|
|
{{/*
|
|
Generate deployment specs for additional services. These are stateless and have
|
|
1 replica.
|
|
*/}}
|
|
{{- range $skip, $k10_service := concat (include "get.enabledServices" . | splitList " ") (include "get.enabledAdditionalServices" . | splitList " ") }}
|
|
{{ $tmp_contx := dict "main" $main_context "k10_service" $k10_service "stateful" false "replicas" 1 }}
|
|
{{- include "k10-default" $tmp_contx -}}
|
|
{{- end }}
|