Files
charts/bitnami/spring-cloud-dataflow/templates/server/configmap.yaml
Grzegorz Kołakowski a09c51b4c4 [bitnami/spring-cloud-dataflow] Support taskServiceAccountName (#26450)
* [bitnami/spring-cloud-dataflow] Support taskServiceAccountName

Signed-off-by: Grzegorz Kołakowski <grzegorz8@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: Grzegorz Kołakowski <grzegorz8@gmail.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
2024-06-03 14:46:33 +02:00

137 lines
7.1 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (include "scdf.server.createConfigmap" .) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "scdf.server.fullname" . }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: server
namespace: {{ include "common.names.namespace" . | quote }}
{{- 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 "common.names.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 }}
{{- 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 }}
{{- else if ne .Values.deployer.resourcesPreset "none" }}
{{- include "common.resources.preset" (dict "type" .Values.deployer.resourcesPreset) | nindent 20 }}
{{- 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: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.deployer.podSecurityContext "context" $) | 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 }}
{{- if .Values.deployer.taskServiceAccountName }}
taskServiceAccountName: {{ .Values.deployer.taskServiceAccountName }}
{{- 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 }}
{{- if .Values.server.security.authorization }}
security:
authorization: {{- include "common.tplvalues.render" (dict "value" .Values.server.security.authorization) | nindent 14 }}
{{- 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" . }}
{{- $secretName := coalesce .Values.externalDatabase.dataflow.existingSecret .Values.externalDatabase.existingPasswordSecret -}}
{{- $secretPasswordKey := coalesce .Values.externalDatabase.dataflow.existingSecretPasswordKey .Values.externalDatabase.existingPasswordKey -}}
{{- if .Values.mariadb.enabled }}
password: ${mariadb-password}
{{- else if and $secretName $secretPasswordKey }}
password: {{ printf "${%s}" $secretPasswordKey }}
{{- else }}
password: ${datasource-password}
{{- end }}
testOnBorrow: true
validationQuery: "SELECT 1"
flyway:
enabled: {{ .Values.flyway.enabled }}
{{- if .Values.server.security.oauth2 }}
security:
oauth2: {{- include "common.tplvalues.render" (dict "value" .Values.server.security.oauth2) | nindent 10 }}
{{- end }}
{{ end }}