From fe06d22d4626da15fb1fdf77675de951fbfdddb8 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Wed, 1 Nov 2023 10:07:13 +0000 Subject: [PATCH] HPCC-31716 Improve formatting of Roxie YAML templates Signed-off-by: Richard Chapman --- helm/hpcc/templates/localroxie.yaml | 138 +++++----- helm/hpcc/templates/roxie.yaml | 404 ++++++++++++++-------------- 2 files changed, 271 insertions(+), 271 deletions(-) diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index e25b5765352..2b038b75fd0 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -34,27 +34,27 @@ data: version: 1.0 roxie: {{ toYaml (omit .me "logging" "tracing" "env") | indent 6 }} -{{- include "hpcc.generateLoggingConfig" . | indent 6 }} -{{- include "hpcc.generateTracingConfig" . | indent 6 }} -{{ include "hpcc.generateVaultConfig" . | indent 6 }} +{{- include "hpcc.generateLoggingConfig" . | indent 6 }} +{{- include "hpcc.generateTracingConfig" . | indent 6 }} +{{ include "hpcc.generateVaultConfig" . | indent 6 }} global: -{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} -{{- end -}} +{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} +{{- end -}}{{/* define "hpcc.localroxieConfigMap */}} -{{ range $roxie := $.Values.roxie -}} -{{- if not $roxie.disabled -}} -{{- $env := concat ($.Values.global.env | default list) (.env | default list) -}} -{{- $secretsCategories := list "system" "eclUser" "ecl" "storage" }} -{{- $enginePlaneDetails := dict -}} -{{- $_ := include "hpcc.getEnginePlanes" (dict "root" $ "me" . "result" $enginePlaneDetails) -}} -{{- $commonCtx := dict "root" $ "me" $roxie "includeCategories" $enginePlaneDetails.planeCategories "includeNames" $enginePlaneDetails.namedPlanes "secretsCategories" $secretsCategories "env" $env }} -{{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.localroxieConfigMap" "component" "roxie" "excludeKeys" "global")) }} -{{- include "hpcc.checkDefaultStoragePlane" $commonCtx }} -{{- $singleNode := (hasKey $roxie "singleNode") | ternary $roxie.singleNode ((hasKey $roxie "localAgent") | ternary $roxie.localAgent false) }} -{{- if $singleNode -}} -{{- $localAgent := ((hasKey $roxie "localAgent") | ternary $roxie.localAgent true) -}} -{{- $name := $roxie.name -}} -{{- $servername := printf "%s-server" $roxie.name -}} +{{ range $roxie := $.Values.roxie -}} +{{- if not $roxie.disabled -}} +{{- $env := concat ($.Values.global.env | default list) (.env | default list) -}} +{{- $secretsCategories := list "system" "eclUser" "ecl" "storage" }} +{{- $enginePlaneDetails := dict -}} +{{- $_ := include "hpcc.getEnginePlanes" (dict "root" $ "me" . "result" $enginePlaneDetails) -}} +{{- $commonCtx := dict "root" $ "me" $roxie "includeCategories" $enginePlaneDetails.planeCategories "includeNames" $enginePlaneDetails.namedPlanes "secretsCategories" $secretsCategories "env" $env }} +{{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.localroxieConfigMap" "component" "roxie" "excludeKeys" "global")) }} +{{- include "hpcc.checkDefaultStoragePlane" $commonCtx }} +{{- $singleNode := (hasKey $roxie "singleNode") | ternary $roxie.singleNode ((hasKey $roxie "localAgent") | ternary $roxie.localAgent false) }} +{{- if $singleNode -}} +{{- $localAgent := ((hasKey $roxie "localAgent") | ternary $roxie.localAgent true) -}} +{{- $name := $roxie.name -}} +{{- $servername := printf "%s-server" $roxie.name -}} apiVersion: apps/v1 kind: Deployment @@ -74,19 +74,19 @@ spec: accessDali: "yes" accessEsp: "yes" helmVersion: 9.7.0-trunk0 - {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} -{{- if hasKey . "labels" }} -{{ toYaml .labels | indent 8 }} -{{- end }} +{{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} +{{- if hasKey . "labels" }} +{{ toYaml .labels | indent 8 }} +{{- end }} annotations: checksum/config: {{ $configSHA }} - {{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} +{{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} spec: - {{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $roxie.name "target" $roxie.name "type" "roxie") | indent 6 }} +{{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $roxie.name "target" $roxie.name "type" "roxie") | indent 6 }} serviceAccountName: "hpcc-default" initContainers: - {{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} - {{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} +{{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} +{{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} containers: - name: {{ $roxie.name | quote }} workingDir: /var/lib/HPCCSystems @@ -99,58 +99,58 @@ spec: "--resolveLocally=false" ] env: -{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} +{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} - name: "SENTINEL" value: "/tmp/{{ $roxie.name }}.sentinel" -{{- $local := dict "first" true }} -{{- range $service := $roxie.services }} -{{- if ne (int $service.servicePort) 0 }} -{{- if $local.first }} -{{- $_ := set $local "first" false }} +{{- $local := dict "first" true }} +{{- range $service := $roxie.services }} +{{- if ne (int $service.servicePort) 0 }} +{{- if $local.first }} +{{- $_ := set $local "first" false }} ports: -{{- end }} +{{- end }} - name: {{ $service.name }} containerPort: {{ $service.servicePort }} -{{- end }} -{{- end }} -{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }} -{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} -{{- if not $omitResources }} -{{- include "hpcc.addResources" (dict "me" $roxie.resources) | indent 8 }} -{{- end }} -{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} +{{- end }} +{{- end }} +{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }} +{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} +{{- if not $omitResources }} +{{- include "hpcc.addResources" (dict "me" $roxie.resources) | indent 8 }} +{{- end }} +{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} volumeMounts: -{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }} -{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} -{{- include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" false) | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" true "includeRemote" true) | indent 8 }} -{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localudpkey" ) | indent 8 }} +{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }} +{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} +{{- include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" false) | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" true "includeRemote" true) | indent 8 }} +{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "name" $roxie.name "component" "localudpkey" ) | indent 8 }} volumes: -{{ include "hpcc.addConfigMapVolume" . | indent 6 }} -{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" false) | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" true "includeRemote" true) | indent 6 }} -{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localudpkey" ) | indent 6 }} +{{ include "hpcc.addConfigMapVolume" . | indent 6 }} +{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" false) | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localroxie" "external" true "includeRemote" true) | indent 6 }} +{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "name" $roxie.name "component" "localudpkey" ) | indent 6 }} --- -{{- range $service := $roxie.services }} -{{- if ne (int $service.servicePort) 0 }} -{{ include "hpcc.addService" ( dict "root" $ "name" $service.name "service" $service "selector" $servername "defaultPort" $service.servicePort ) }} +{{- range $service := $roxie.services }} +{{- if ne (int $service.servicePort) 0 }} +{{ include "hpcc.addService" ( dict "root" $ "name" $service.name "service" $service "selector" $servername "defaultPort" $service.servicePort ) }} --- -{{- end }} -{{- end }} +{{- end }} +{{- end }} kind: ConfigMap -{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.localroxieConfigMap")) }} +{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.localroxieConfigMap")) }} --- -{{ include "hpcc.addCertificate" (dict "root" $ "name" $roxie.name "services" $roxie.services "component" "localroxie" "external" false) }} -{{ include "hpcc.addCertificate" (dict "root" $ "name" $roxie.name "services" $roxie.services "component" "localroxie" "external" true "includeRemote" true) }} -{{ include "hpcc.addUDPCertificate" (dict "root" $ "name" $roxie.name "component" "localudpkey") }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $roxie.name "services" $roxie.services "component" "localroxie" "external" false) }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $roxie.name "services" $roxie.services "component" "localroxie" "external" true "includeRemote" true) }} +{{ include "hpcc.addUDPCertificate" (dict "root" $ "name" $roxie.name "component" "localudpkey") }} --- -{{ include "hpcc.addEgress" $commonCtx }} +{{ include "hpcc.addEgress" $commonCtx }} -{{- end }} -{{- end }} -{{- end }} +{{- end }}{{/* if singleNode */}} +{{- end }}{{/* if not disabled */}} +{{- end }}{{/* range */}} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index 80dda41882e..01776aaf261 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -34,37 +34,37 @@ data: {{ .me.name }}.yaml: version: 1.0 roxie: -{{- $root := .root -}} -{{- $component := .me }} +{{- $root := .root -}} +{{- $component := .me }} services: - {{- range $service := .me.services }} +{{- range $service := .me.services }} - name: {{ $service.name }} -{{ toYaml (omit $service "tls" "name") | indent 8 }} - {{- if ne (int $service.servicePort) 0 }} - {{- include "hpcc.addTLSServiceEntries" (dict "root" $root "service" $service "component" $component "visibility" $service.visibility "remoteClients" $service.remoteClients "trustClients" $service.trustClients "includeTrustedPeers" true "incluedRoxieAndEspServices" true) | indent 6 }} - {{- end }} - {{- end }} -{{ toYaml ( omit .me "logging" "tracing" "topoServer" "encryptInTransit" "env" "services") | indent 6 }} +{{ toYaml (omit $service "tls" "name") | indent 8 }} +{{- if ne (int $service.servicePort) 0 }} +{{- include "hpcc.addTLSServiceEntries" (dict "root" $root "service" $service "component" $component "visibility" $service.visibility "remoteClients" $service.remoteClients "trustClients" $service.trustClients "includeTrustedPeers" true "incluedRoxieAndEspServices" true) | indent 6 }} +{{- end }} +{{- end }} +{{ toYaml ( omit .me "logging" "tracing" "topoServer" "encryptInTransit" "env" "services") | indent 6 }} numChannels: {{ .numChannels }} topologyServers: "{{ .toponame }}:{{ .topoport }}" heartbeatInterval: {{ .heartbeatInterval }} resolveLocally: false -{{- $mtlsEnabled := (eq (include "hpcc.isMtlsEnabled" (dict "root" .root)) "true") -}} +{{- $mtlsEnabled := (eq (include "hpcc.isMtlsEnabled" (dict "root" .root)) "true") -}} {{/* By default use encryption if local certificates are enabled, but allow it to be turned off via roxie .encryptInTransit value */}} -{{- if (hasKey .me "encryptInTransit") -}} - {{- if and (.me.encryptInTransit) (not $mtlsEnabled) -}} - {{- $_ := fail (printf "Roxie %s encryptInTransit requires local cert-manager configuration." .me.name ) }} - {{- end }} +{{- if (hasKey .me "encryptInTransit") -}} +{{- if and (.me.encryptInTransit) (not $mtlsEnabled) -}} +{{- $_ := fail (printf "Roxie %s encryptInTransit requires local cert-manager configuration." .me.name ) }} +{{- end }} encryptInTransit: {{ .me.encryptInTransit }} -{{ else }} +{{ else }} encryptInTransit: {{ $mtlsEnabled }} -{{ end -}} -{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .me) | indent 6 }} +{{ end -}} +{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .me) | indent 6 }} {{- include "hpcc.generateTracingConfig" (dict "root" .root "me" .me) | indent 6 }} -{{ include "hpcc.generateVaultConfig" . | indent 6 }} +{{ include "hpcc.generateVaultConfig" . | indent 6 }} global: -{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} -{{- end -}} +{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} +{{- end -}}{{/*define "hpcc.roxieConfigMap"*/}} {{- define "hpcc.roxieTopoConfigMap" -}} apiVersion: v1 @@ -74,41 +74,41 @@ data: {{ .toponame }}.yaml: version: 1.0 toposerver: -{{ toYaml ( omit .toposerver "logging" "tracing" "env") | indent 6 }} -{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .toposerver) | indent 6 }} -{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" .toposerver) | indent 6 }} +{{ toYaml ( omit .toposerver "logging" "tracing" "env") | indent 6 }} +{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .toposerver) | indent 6 }} +{{- include "hpcc.generateTracingConfig" (dict "root" .root "me" .toposerver) | indent 6 }} global: -{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} -{{- end -}} +{{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }} +{{- end -}}{{/*define "hpcc.roxieConfigMap"*/}} -{{ range $roxie := $.Values.roxie -}} -{{- if not $roxie.disabled -}} -{{- $env := concat ($.Values.global.env | default list) (.env | default list) -}} -{{- $secretsCategories := list "system" "eclUser" "ecl" "storage" }} -{{- $toposerver := ($roxie.topoServer | default dict) -}} -{{- $enginePlaneDetails := dict -}} -{{- $_ := include "hpcc.getEnginePlanes" (dict "root" $ "me" . "result" $enginePlaneDetails) -}} -{{- $commonCtx := dict "root" $ "me" $roxie "includeCategories" $enginePlaneDetails.planeCategories "includeNames" $enginePlaneDetails.namedPlanes "secretsCategories" $secretsCategories "toposerver" $toposerver "env" $env }} -{{- $_ := set $commonCtx "toponame" (printf "%s-toposerver" $roxie.name) -}} -{{- $_ := set $commonCtx "numChannels" ($roxie.numChannels | int | default 1) -}} -{{- $_ := set $commonCtx "topoport" ($toposerver.port | int | default 9004) -}} -{{- $_ := set $commonCtx "heartbeatInterval" ($toposerver.heartbeatInterval | int | default 10000) -}} -{{- $_ := set $toposerver "name" $commonCtx.toponame -}} -{{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieConfigMap" "component" "roxie" "excludeKeys" "global")) }} -{{- $topoconfigSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieTopoConfigMap" "component" "toposerver" "excludeKeys" "global")) }} -{{- include "hpcc.checkDefaultStoragePlane" $commonCtx }} -{{- $singleNode := (hasKey $roxie "singleNode") | ternary $roxie.singleNode ((hasKey $roxie "localAgent") | ternary $roxie.localAgent false) }} -{{- if not $singleNode -}} -{{- $servername := printf "%s-server" $roxie.name -}} -{{- $udpkeyname := $roxie.name -}} -{{- range $service := $roxie.services }} - {{- range $remoteClient := $service.remoteClients }} - {{ include "hpcc.addExternalRemoteClientCertificate" (dict "root" $ "client" $remoteClient.name "organization" $remoteClient.organization "instance" $service.name "component" "roxie" "visibility" $service.visibility "secretTemplate" $remoteClient.secretTemplate) }} - {{- end }} - {{- if ne (int $service.servicePort) 0 }} - {{- $_ := set $service "port" $service.servicePort }} - {{- end }} -{{- end }} +{{ range $roxie := $.Values.roxie -}} +{{- if not $roxie.disabled -}} +{{- $env := concat ($.Values.global.env | default list) (.env | default list) -}} +{{- $secretsCategories := list "system" "eclUser" "ecl" "storage" }} +{{- $toposerver := ($roxie.topoServer | default dict) -}} +{{- $enginePlaneDetails := dict -}} +{{- $_ := include "hpcc.getEnginePlanes" (dict "root" $ "me" . "result" $enginePlaneDetails) -}} +{{- $commonCtx := dict "root" $ "me" $roxie "includeCategories" $enginePlaneDetails.planeCategories "includeNames" $enginePlaneDetails.namedPlanes "secretsCategories" $secretsCategories "toposerver" $toposerver "env" $env }} +{{- $_ := set $commonCtx "toponame" (printf "%s-toposerver" $roxie.name) -}} +{{- $_ := set $commonCtx "numChannels" ($roxie.numChannels | int | default 1) -}} +{{- $_ := set $commonCtx "topoport" ($toposerver.port | int | default 9004) -}} +{{- $_ := set $commonCtx "heartbeatInterval" ($toposerver.heartbeatInterval | int | default 10000) -}} +{{- $_ := set $toposerver "name" $commonCtx.toponame -}} +{{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieConfigMap" "component" "roxie" "excludeKeys" "global")) }} +{{- $topoconfigSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieTopoConfigMap" "component" "toposerver" "excludeKeys" "global")) }} +{{- include "hpcc.checkDefaultStoragePlane" $commonCtx }} +{{- $singleNode := (hasKey $roxie "singleNode") | ternary $roxie.singleNode ((hasKey $roxie "localAgent") | ternary $roxie.localAgent false) }} +{{- if not $singleNode -}} +{{- $servername := printf "%s-server" $roxie.name -}} +{{- $udpkeyname := $roxie.name -}} +{{- range $service := $roxie.services }} +{{- range $remoteClient := $service.remoteClients }} + {{ include "hpcc.addExternalRemoteClientCertificate" (dict "root" $ "client" $remoteClient.name "organization" $remoteClient.organization "instance" $service.name "component" "roxie" "visibility" $service.visibility "secretTemplate" $remoteClient.secretTemplate) }} +{{- end }} +{{- if ne (int $service.servicePort) 0 }} +{{- $_ := set $service "port" $service.servicePort }} +{{- end }} +{{- end }} apiVersion: apps/v1 kind: Deployment @@ -122,63 +122,63 @@ spec: template: metadata: labels: - {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} +{{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} helmVersion: 9.7.0-trunk0 -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} -{{- end }} -{{- if hasKey $toposerver "labels" }} -{{ toYaml $toposerver.labels | indent 8 }} -{{- end }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} +{{- end }} +{{- if hasKey $toposerver "labels" }} +{{ toYaml $toposerver.labels | indent 8 }} +{{- end }} annotations: checksum/config: {{ $topoconfigSHA }} - {{- include "hpcc.generateAnnotations" (dict "root" $commonCtx.root "me" $toposerver) | indent 8 }} -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} -{{- end }} +{{- include "hpcc.generateAnnotations" (dict "root" $commonCtx.root "me" $toposerver) | indent 8 }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} +{{- end }} spec: - {{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $commonCtx.toponame "target" $roxie.name "type" "roxie") | indent 6 }} +{{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $commonCtx.toponame "target" $roxie.name "type" "roxie") | indent 6 }} serviceAccountName: "hpcc-default" - {{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} +{{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} containers: - name: {{ $commonCtx.toponame | quote }} -{{ include "hpcc.addSentinelProbes" $toposerver | indent 8 }} -{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }} -{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} -{{- if not $omitResources }} -{{- $defaultResources := dict "cpu" "500m" "memory" "200Mi" }} -{{- include "hpcc.addResources" (dict "me" .topoResources "defaults" $defaultResources) | indent 8 }} -{{- end }} -{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} +{{ include "hpcc.addSentinelProbes" $toposerver | indent 8 }} +{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }} +{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} +{{- if not $omitResources }} +{{- $defaultResources := dict "cpu" "500m" "memory" "200Mi" }} +{{- include "hpcc.addResources" (dict "me" .topoResources "defaults" $defaultResources) | indent 8 }} +{{- end }} +{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} workingDir: /var/lib/HPCCSystems command: [ {{ include "hpcc.componentCommand" (dict "me" $toposerver "root" $ "process" "toposerver") }} ] args: [ {{- include "hpcc.componentStartArgs" (dict "me" $toposerver "root" $ "process" "toposerver") | nindent 16 }} {{ include "hpcc.configArg" $toposerver }} ] env: -{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} +{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} - name: "SENTINEL" value: "/tmp/{{ $commonCtx.toponame }}.sentinel" volumeMounts: -{{ include "hpcc.addConfigMapVolumeMount" $toposerver | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "topo" "name" $commonCtx.toponame "external" false) | indent 8 }} +{{ include "hpcc.addConfigMapVolumeMount" $toposerver | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "topo" "name" $commonCtx.toponame "external" false) | indent 8 }} volumes: -{{ include "hpcc.addConfigMapVolume" $toposerver | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "topo" "name" $commonCtx.toponame "external" false) | indent 6 }} +{{ include "hpcc.addConfigMapVolume" $toposerver | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "topo" "name" $commonCtx.toponame "external" false) | indent 6 }} --- -{{ include "hpcc.addCertificate" (dict "root" $ "name" $commonCtx.toponame "servicename" $commonCtx.toponame "component" "topo" "external" false) }} -{{ include "hpcc.addUDPCertificate" (dict "root" $ "name" $udpkeyname "component" "udpkey") }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $commonCtx.toponame "servicename" $commonCtx.toponame "component" "topo" "external" false) }} +{{ include "hpcc.addUDPCertificate" (dict "root" $ "name" $udpkeyname "component" "udpkey") }} --- -{{- range $service := $roxie.services }} -{{- if ne (int $service.servicePort) 0 }} -{{ include "hpcc.addService" ( dict "root" $ "name" $service.name "service" $service "selector" $servername "defaultPort" $service.servicePort) }} +{{- range $service := $roxie.services }} +{{- if ne (int $service.servicePort) 0 }} +{{ include "hpcc.addService" ( dict "root" $ "name" $service.name "service" $service "selector" $servername "defaultPort" $service.servicePort) }} --- -{{- end }} -{{- end }} +{{- end }} +{{- end }} apiVersion: v1 kind: Service @@ -186,7 +186,7 @@ metadata: name: {{ $commonCtx.toponame | quote }} labels: helmVersion: 9.7.0-trunk0 - {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} +{{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: - port: {{ $commonCtx.topoport }} @@ -221,15 +221,15 @@ spec: --- kind: ConfigMap -{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieConfigMap")) }} +{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieConfigMap")) }} --- kind: ConfigMap -{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieTopoConfigMap")) }} +{{ include "hpcc.generateConfig" ($commonCtx | merge (dict "configMapHelper" "hpcc.roxieTopoConfigMap")) }} --- -{{- $_ := set $commonCtx "instanceNames" list -}} -{{ if $roxie.serverReplicas -}} -{{ $_ := set $commonCtx "instanceNames" (list $servername) -}} +{{- $_ := set $commonCtx "instanceNames" list -}} +{{ if $roxie.serverReplicas -}} +{{ $_ := set $commonCtx "instanceNames" (list $servername) -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -248,28 +248,28 @@ spec: accessDali: "yes" accessEsp: "yes" helmVersion: 9.7.0-trunk0 - {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} -{{- end }} -{{- if hasKey $roxie "labels" }} -{{ toYaml $roxie.labels | indent 8 }} -{{- end }} +{{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} +{{- end }} +{{- if hasKey $roxie "labels" }} +{{ toYaml $roxie.labels | indent 8 }} +{{- end }} annotations: checksum/config: {{ $configSHA }} - {{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} -{{- end }} -{{- if hasKey $roxie "annotations" }} -{{ toYaml $roxie.annotations | indent 8 }} -{{- end }} +{{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} +{{- end }} +{{- if hasKey $roxie "annotations" }} +{{ toYaml $roxie.annotations | indent 8 }} +{{- end }} spec: - {{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $servername "target" $roxie.name "type" "roxie") | indent 6 }} +{{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $servername "target" $roxie.name "type" "roxie") | indent 6 }} serviceAccountName: "hpcc-default" initContainers: - {{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} - {{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} +{{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} +{{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} terminationGracePeriodSeconds: {{ add ($roxie.agentQueryReleaseDelaySeconds | default 60) 30 }} containers: - name: {{ $servername | quote }} @@ -280,63 +280,63 @@ spec: "--server=true" ] env: -{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} +{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} - name: "SENTINEL" value: "/tmp/{{ $roxie.name }}.sentinel" -{{- $local := dict "first" true }} -{{- range $service := $roxie.services }} -{{- if ne (int $service.servicePort) 0 }} -{{- if $local.first }} +{{- $local := dict "first" true }} +{{- range $service := $roxie.services }} +{{- if ne (int $service.servicePort) 0 }} +{{- if $local.first }} {{- $_ := set $local "first" false }} ports: -{{- end }} +{{- end }} - name: {{ $service.name }} containerPort: {{ $service.servicePort }} -{{- end }} -{{- end }} +{{- end }} +{{- end }} lifecycle: preStop: exec: command: ["testsocket", ".", "control:closedown"] -{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }} -{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }} -{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} -{{- if not $omitResources }} -{{- include "hpcc.addResources" (dict "me" ($roxie.serverResources | default $roxie.resources)) | indent 8 }} -{{- end }} -{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} +{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }} +{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }} +{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} +{{- if not $omitResources }} +{{- include "hpcc.addResources" (dict "me" ($roxie.serverResources | default $roxie.resources)) | indent 8 }} +{{- end }} +{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} volumeMounts: -{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }} -{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-server" "name" $servername "external" false) | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-server" "name" $servername "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 8 }} -{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "component" "udpkey" "name" $udpkeyname ) | indent 8 }} +{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }} +{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-server" "name" $servername "external" false) | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-server" "name" $servername "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 8 }} +{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "component" "udpkey" "name" $udpkeyname ) | indent 8 }} volumes: -{{ include "hpcc.addConfigMapVolume" $roxie | indent 6 }} -{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-server" "name" $servername "external" false) | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-server" "name" $servername "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 6 }} -{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "component" "udpkey" "name" $udpkeyname) | indent 6 }} +{{ include "hpcc.addConfigMapVolume" $roxie | indent 6 }} +{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-server" "name" $servername "external" false) | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-server" "name" $servername "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 6 }} +{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "component" "udpkey" "name" $udpkeyname) | indent 6 }} --- -{{ include "hpcc.addCertificate" (dict "root" $ "name" $servername "services" $roxie.services "component" "roxie-server" "external" false) }} -{{ include "hpcc.addCertificate" (dict "root" $ "name" $servername "services" $roxie.services "component" "roxie-server" "external" true "includeRemote" true) }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $servername "services" $roxie.services "component" "roxie-server" "external" false) }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $servername "services" $roxie.services "component" "roxie-server" "external" true "includeRemote" true) }} --- -{{ end -}} +{{ end -}}{{/* if serverReplicas */}} {{- $agentPublicCertName := printf "%s-agent" $roxie.name }} -{{ include "hpcc.addCertificate" (dict "root" $ "name" $agentPublicCertName "services" $roxie.services "component" "roxie-agent" "external" true "includeRemote" true) }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $agentPublicCertName "services" $roxie.services "component" "roxie-agent" "external" true "includeRemote" true) }} -{{ range $c, $e := until ($commonCtx.numChannels|int) -}} +{{ range $c, $e := until ($commonCtx.numChannels|int) -}} {{- $channel := add $c 1 -}} {{- $name := printf "%s-agent-%d" $roxie.name $channel }} {{- $_ := set $commonCtx "instanceNames" (append $commonCtx.instanceNames $name) }} -{{ include "hpcc.addCertificate" (dict "root" $ "name" $name "services" $roxie.services "component" "roxie-agent" "external" false) }} +{{ include "hpcc.addCertificate" (dict "root" $ "name" $name "services" $roxie.services "component" "roxie-agent" "external" false) }} --- apiVersion: apps/v1 kind: Deployment @@ -350,33 +350,33 @@ spec: template: metadata: labels: - {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-agent" "name" "roxie" "instance" $name) | indent 8 }} +{{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-agent" "name" "roxie" "instance" $name) | indent 8 }} run: {{ $name | quote}} -{{- if not $roxie.serverReplicas }} +{{- if not $roxie.serverReplicas }} server: {{ $servername | quote }} -{{- end }} +{{- end }} roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" helmVersion: 9.7.0-trunk0 -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} -{{- end }} -{{- if hasKey $roxie "labels" }} -{{ toYaml $roxie.labels | indent 8 }} -{{- end }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} +{{- end }} +{{- if hasKey $roxie "labels" }} +{{ toYaml $roxie.labels | indent 8 }} +{{- end }} annotations: checksum/config: {{ $configSHA }} - {{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} -{{- if hasKey $.Values.global "metrics" }} - {{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} -{{- end }} +{{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} +{{- if hasKey $.Values.global "metrics" }} +{{- include "hpcc.addPrometheusScrapeAnnotations" $.Values.global.metrics | nindent 8 }} +{{- end }} spec: - {{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $name "target" $roxie.name "type" "roxie") | indent 6 }} +{{- include "hpcc.placementsByPodTargetType" (dict "root" $ "pod" $name "target" $roxie.name "type" "roxie") | indent 6 }} serviceAccountName: "hpcc-default" initContainers: - {{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} - {{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} +{{- include "hpcc.createConfigInitContainers" $commonCtx | indent 6 }} +{{- include "hpcc.addImagePullSecrets" $commonCtx | nindent 6 -}} terminationGracePeriodSeconds: {{ add ($roxie.agentQueryReleaseDelaySeconds | default 60) 30 }} containers: - name: {{ $name | quote}} @@ -389,64 +389,64 @@ spec: "--server={{ not $roxie.serverReplicas }}", ] env: -{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} +{{ include "hpcc.mergeEnvironments" $env | indent 8 -}} - name: "SENTINEL" value: "/tmp/{{ $roxie.name }}.sentinel" -{{- if not $roxie.serverReplicas }} +{{- if not $roxie.serverReplicas }} {{- $local := dict "first" true }} -{{- range $service := $roxie.services }} -{{- if ne (int $service.servicePort) 0 }} -{{- if $local.first }} +{{- range $service := $roxie.services }} +{{- if ne (int $service.servicePort) 0 }} +{{- if $local.first }} {{- $_ := set $local "first" false }} ports: -{{- end }} +{{- end }} - name: {{ $service.name }} containerPort: {{ $service.servicePort }} -{{- end }} -{{- end }} +{{- end }} +{{- end }} lifecycle: preStop: exec: command: ["testsocket", ".", "control:closedown"] -{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }} -{{- end }} -{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }} -{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} -{{- if not $omitResources }} -{{- include "hpcc.addResources" (dict "me" ($roxie.channelResources | default $roxie.resources)) | indent 8 }} -{{- end }} -{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} +{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }} +{{- end }}{{/* not serverReplicas */}} +{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }} +{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }} +{{- if not $omitResources }} +{{- include "hpcc.addResources" (dict "me" ($roxie.channelResources | default $roxie.resources)) | indent 8 }} +{{- end }} +{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }} volumeMounts: -{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }} -{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} -{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} -{{- if not $roxie.serverReplicas }} +{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }} +{{ include "hpcc.addVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addSecretVolumeMounts" $commonCtx | indent 8 }} +{{ include "hpcc.addVaultClientCertificateVolumeMounts" $commonCtx | indent 8 }} +{{- if not $roxie.serverReplicas }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-agent" "name" $name "external" false) | indent 8 }} -{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-agent" "name" $agentPublicCertName "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 8 }} -{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "component" "udpkey" "name" $udpkeyname ) | indent 8 }} -{{- end }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-agent" "name" $name "external" false) | indent 8 }} +{{ include "hpcc.addCertificateVolumeMount" (dict "root" $ "component" "roxie-agent" "name" $agentPublicCertName "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 8 }} +{{ include "hpcc.addUDPCertificateVolumeMount" (dict "root" $ "component" "udpkey" "name" $udpkeyname ) | indent 8 }} +{{- end }}{{/* not serverReplicas */}} volumes: -{{ include "hpcc.addConfigMapVolume" $roxie | indent 6 }} -{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} -{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} -{{- if not $roxie.serverReplicas }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-agent" "name" $name "external" false) | indent 6 }} -{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-agent" "name" $agentPublicCertName "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 6 }} -{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "component" "udpkey" "name" $udpkeyname) | indent 6 }} -{{- end }} +{{ include "hpcc.addConfigMapVolume" $roxie | indent 6 }} +{{ include "hpcc.addVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addSecretVolumes" $commonCtx | indent 6 }} +{{ include "hpcc.addVaultClientCertificateVolumes" $commonCtx | indent 6 }} +{{- if not $roxie.serverReplicas }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-agent" "name" $name "external" false) | indent 6 }} +{{ include "hpcc.addCertificateVolume" (dict "root" $ "component" "roxie-agent" "name" $agentPublicCertName "certificate" $roxie.certificate "external" true "includeRemote" true) | indent 6 }} +{{ include "hpcc.addUDPCertificateVolume" (dict "root" $ "component" "udpkey" "name" $udpkeyname) | indent 6 }} +{{- end }}{{/* not serverReplicas */}} --- -{{- end }} -{{- end }} +{{- end }} +{{- end }}{{/* if not singlenode */}} --- -{{ include "hpcc.addEgress" (dict "root" $ "me" $roxie "labels" $commonCtx.instanceNames) }} -{{- if hasKey . "hpa" }} - {{- include "hpcc.addHorizontalPodAutoscaler" (dict "name" $roxie.name "kind" "Deployment" "hpa" $roxie.hpa) }} -{{- end }} -{{- end }} -{{- end }} +{{ include "hpcc.addEgress" (dict "root" $ "me" $roxie "labels" $commonCtx.instanceNames) }} +{{- if hasKey . "hpa" }} +{{- include "hpcc.addHorizontalPodAutoscaler" (dict "name" $roxie.name "kind" "Deployment" "hpa" $roxie.hpa) }} +{{- end }} +{{- end }}{{/* if not disabled */}} +{{- end }}{{/* range */}}