Files
charts/bitnami/spring-cloud-dataflow/templates/skipper/configmap.yaml
Victor Senior e798a90a58 [bitnami/spring-cloud-dataflow] Fix variables definition sensitive to Helm 'release-name' (#26315)
* Fix variables definition sensitive to Helm 'release-name'

Wrong variables definition in the skipper's ConfigMap.
The variables are sensitive to 'release-name' provided with Heml installation command.
This fix issue reported with ticket [https://github.com/bitnami/charts/issues/26169].

Signed-off-by: Victor Senior <152206004+vicSenior@users.noreply.github.com>

* Update version in Chart.yaml

Chart version increased in according to [semver] 

Signed-off-by: Victor Senior <152206004+vicSenior@users.noreply.github.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: Victor Senior <152206004+vicSenior@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
2024-05-23 20:30:21 +02:00

144 lines
8.4 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (include "scdf.skipper.createConfigmap" .) (.Values.skipper.enabled) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "scdf.skipper.fullname" . }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.skipper.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: skipper
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:
skipper:
server:
platform:
kubernetes:
accounts:
{{ .Values.skipper.configuration.accountName }}:
{{- $environmentVariables := include "scdf.deployer.environmentVariables" . }}
{{- if or (.Values.rabbitmq.enabled) (.Values.externalRabbitmq.enabled) }}
{{- $rabbitmqHost := include "scdf.rabbitmq.host" . }}
{{- $rabbitmqPort := include "scdf.rabbitmq.port" . }}
{{- $rabbitmqUser := include "scdf.rabbitmq.user" . }}
{{- $rabbitmqVhost := include "scdf.rabbitmq.vhost" . }}
environmentVariables:
- SPRING_RABBITMQ_HOST={{ $rabbitmqHost }}
- SPRING_RABBITMQ_PORT={{ $rabbitmqPort }}
- SPRING_RABBITMQ_USERNAME={{ $rabbitmqUser }}
- SPRING_RABBITMQ_VIRTUAL_HOST={{ $rabbitmqVhost }}
{{- $secretName := coalesce .Values.externalRabbitmq.existingSecret .Values.externalRabbitmq.existingPasswordSecret -}}
{{- if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.enabled $secretName .Values.externalRabbitmq.existingSecretPasswordKey }}
- SPRING_RABBITMQ_PASSWORD={{ printf "${%s}" .Values.externalRabbitmq.existingSecretPasswordKey }}
{{- else }}
- SPRING_RABBITMQ_PASSWORD=${rabbitmq-password}
{{- end }}
{{- if $environmentVariables }}
{{- $environmentVariables | nindent 22 }}
{{- end }}
{{- else if .Values.kafka.enabled }}
environmentVariables:
- SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=${{ printf "{" }}{{ regexReplaceAll "\\W+" (upper .Release.Name) "_" }}_KAFKA_SERVICE_HOST}:${{ printf "{" }}{{ regexReplaceAll "\\W+" (upper .Release.Name) "_" }}_KAFKA_SERVICE_PORT}
- SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES=${{ printf "{" }}{{ regexReplaceAll "\\W+" (upper .Release.Name) "_" }}_ZOOKEEPER_SERVICE_HOST}:${{ printf "{" }}{{ regexReplaceAll "\\W+" (upper .Release.Name) "_" }}_ZOOKEEPER_SERVICE_PORT}
{{- if $environmentVariables }}
{{- $environmentVariables | nindent 22 }}
{{- end }}
{{- else if .Values.externalKafka.enabled }}
environmentVariables:
- SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS={{ .Values.externalKafka.brokers }}
- SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES={{ .Values.externalKafka.zkNodes }}
{{- if $environmentVariables }}
{{- $environmentVariables | nindent 22 }}
{{- end }}
{{- else }}
{{- if $environmentVariables }}
environmentVariables: {{- $environmentVariables | trim | nindent 22 }}
{{- end }}
{{- 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: {{- 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.imagePullPolicy }}
imagePullPolicy: {{ .Values.deployer.imagePullPolicy }}
{{- end }}
{{- if .Values.externalDatabase.hibernateDialect }}
jpa:
properties:
hibernate:
dialect: {{- printf "%s" .Values.externalDatabase.hibernateDialect -}}
{{- end }}
datasource:
url: '{{ include "scdf.database.skipper.url" . }}'
driverClassName: {{ include "scdf.database.driver" . }}
username: {{ include "scdf.database.skipper.user" . }}
{{- $secretName := coalesce .Values.externalDatabase.skipper.existingSecret .Values.externalDatabase.existingPasswordSecret -}}
{{- $secretPasswordKey := coalesce .Values.externalDatabase.skipper.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 }}
{{ end }}