Files
charts/bitnami/spring-cloud-dataflow/templates/server/configmap.yaml

118 lines
5.9 KiB
YAML

{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (include "scdf.server.createConfigmap" .) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "scdf.fullname" . }}-server
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: server
namespace: {{ .Release.Namespace }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
application.yaml: |-
{{- if .Values.metrics.enabled }}
{{- $fullname := include "scdf.fullname" . }}
{{- $rsocketPort := int (coalesce .Values.metrics.service.ports.rsocket .Values.metrics.service.rsocketPort) }}
management:
metrics:
export:
prometheus:
enabled: true
rsocket:
enabled: true
host: {{ $fullname }}-prometheus-proxy
port: {{ $rsocketPort }}
{{- end }}
spring:
cloud:
dataflow:
{{- if .Values.server.applicationProperties }}
applicationProperties: {{- include "common.tplvalues.render" (dict "value" .Values.server.applicationProperties "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.server.configuration.batchEnabled }}
task:
platform:
kubernetes:
accounts:
{{ .Values.server.configuration.accountName }}:
{{- $environmentVariables := include "scdf.deployer.environmentVariables" . }}
{{- if $environmentVariables }}
environmentVariables: {{- $environmentVariables | trim | nindent 22 }}
{{- end }}
{{- if .Values.deployer.resources.limits }}
limits: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.resources.limits "context" $) | trim | nindent 22 }}
{{- end }}
{{- if .Values.deployer.resources.requests }}
requests: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.resources.requests "context" $) | trim | nindent 22 }}
{{- end }}
{{- if .Values.deployer.readinessProbe.initialDelaySeconds }}
readinessProbeDelay: {{ .Values.deployer.readinessProbe.initialDelaySeconds }}
{{- end }}
{{- if .Values.deployer.livenessProbe.initialDelaySeconds }}
livenessProbeDelay: {{ .Values.deployer.livenessProbe.initialDelaySeconds }}
{{- end }}
{{- if .Values.deployer.nodeSelector }}
nodeSelector: {{ .Values.deployer.nodeSelector }}
{{- end }}
{{- if .Values.deployer.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.tolerations "context" $) | nindent 22 }}
{{- end }}
{{- if .Values.deployer.volumeMounts }}
volumeMounts: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.volumeMounts "context" $) | nindent 22 }}
{{- end }}
{{- if .Values.deployer.volumes }}
volumes: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.volumes "context" $) | nindent 22 }}
{{- end }}
{{- if .Values.deployer.podSecurityContext.enabled }}
podSecurityContext: {{- omit .Values.deployer.podSecurityContext "enabled" | toYaml | nindent 22 }}
{{- end }}
{{- if .Values.deployer.imagePullSecrets }}
imagePullSecrets: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.imagePullSecrets "context" $) | nindent 22 }}
{{- end }}
{{- if .Values.deployer.secretRefs }}
secretRefs: {{- include "common.tplvalues.render" (dict "value" .Values.deployer.secretRefs "context" $) | nindent 22 }}
{{- end }}
{{- if .Values.deployer.entryPointStyle }}
entryPointStyle: {{ .Values.deployer.entryPointStyle }}
{{- end }}
{{- end }}
{{- if .Values.server.configuration.containerRegistries }}
container:
registry-configurations: {{- include "common.tplvalues.render" (dict "value" .Values.server.configuration.containerRegistries "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.server.configuration.metricsDashboard }}
metrics.dashboard:
url: {{ .Values.server.configuration.metricsDashboard }}
{{- else if .Values.server.configuration.grafanaInfo }}
metrics.dashboard:
url: {{ .Values.server.configuration.grafanaInfo }}
{{- end }}
task:
closecontextEnabled: true
{{- if .Values.externalDatabase.hibernateDialect }}
jpa:
properties:
hibernate:
dialect: {{- printf "%s" .Values.externalDatabase.hibernateDialect -}}
{{- end }}
datasource:
url: '{{ include "scdf.database.dataflow.url" . }}'
driverClassName: {{ include "scdf.database.driver" . }}
username: {{ include "scdf.database.server.user" . }}
{{ if .Values.externalDatabase.existingPasswordSecret }}
password: {{ .Values.externalDatabase.existingPasswordKey | default "datasource-password" | printf "${%s}" }}
{{- else -}}
password: ${mariadb-password}
{{- end }}
testOnBorrow: true
validationQuery: "SELECT 1"
flyway:
enabled: {{ .Values.flyway.enabled }}
{{ end }}