mirror of
https://github.com/bitnami/charts.git
synced 2026-02-24 14:57:12 +08:00
* Ignore .DS_Store * Spring Cloud Data Flow chart fixes and improvements: 1) added ability to configure Hibernate dialect 2) fixed issue with locating application.yaml in kubernetes cluster 3) added JDWP support 4) removed MariaDB from database comments, because external database can be PostgreSQL as well 5) fixed some wrong properties (externalDatabase.server -> externalDatabase.dataflow) * Added changes to values-production.yaml. * Bumped spring-cloud-dataflow to 0.1.3 version. * Added hibernateDialect and jdwp variables to README.md. * Fixed "missing starting space in comment" * Fixed "java.sql.SQLInvalidAuthorizationSpecException: Access denied for user 'dataflow'@'10.244.0.5' (using password: YES)". * Bump version to 0.2.0. * Added support for external RabbitMQ. * Added externalRabbitmq config to README. Fixed typo: rabbitmq.rabbitmq -> rabbitmq.auth. * Fixed config location, use /opt/bitnami/**/conf.
208 lines
10 KiB
YAML
208 lines
10 KiB
YAML
{{- $fullname := include "scdf.fullname" . }}
|
|
{{- $serverServicePort := int .Values.server.service.port }}
|
|
{{- $skipperServicePort := int .Values.skipper.service.port }}
|
|
{{- $releaseNamespace := .Release.Namespace }}
|
|
{{- $clusterDomain := .Values.clusterDomain }}
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "scdf.fullname" . }}-server
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
replicas: {{ .Values.server.replicaCount }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: server
|
|
strategy:
|
|
type: {{ .Values.server.strategyType }}
|
|
{{- if (eq "Recreate" .Values.server.strategyType) }}
|
|
rollingUpdate: null
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- if or (include "scdf.server.createConfigmap" .) .Values.server.podAnnotations }}
|
|
annotations:
|
|
{{- if (include "scdf.server.createConfigmap" .) }}
|
|
checksum/configuration: {{ include (print $.Template.BasePath "/server/configmap.yaml") . | sha256sum }}
|
|
{{- end }}
|
|
{{- if .Values.server.podAnnotations }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.server.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
{{- include "scdf.imagePullSecrets" . | indent 6 }}
|
|
serviceAccountName: {{ include "scdf.serviceAccountName" . }}
|
|
{{- if .Values.server.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.server.affinity "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.server.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.server.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.priorityClassName }}
|
|
priorityClassName: {{ .Values.server.priorityClassName | quote }}
|
|
{{- end }}
|
|
{{- if .Values.server.podSecurityContext }}
|
|
securityContext: {{- toYaml .Values.server.podSecurityContext | nindent 8 }}
|
|
{{- end }}
|
|
{{- if or .Values.server.initContainers .Values.waitForBackends.enabled }}
|
|
initContainers:
|
|
{{- if .Values.waitForBackends.enabled }}
|
|
- name: wait-for-backends
|
|
image: {{ include "scdf.waitForBackends.image" . }}
|
|
imagePullPolicy: {{ .Values.waitForBackends.image.pullPolicy | quote }}
|
|
command:
|
|
- /scripts/wait-for-backends.sh
|
|
{{- if .Values.waitForBackends.resources }}
|
|
resources: {{- toYaml .Values.waitForBackends.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: scripts
|
|
mountPath: /scripts/wait-for-backends.sh
|
|
subPath: wait-for-backends.sh
|
|
{{- end }}
|
|
{{- if .Values.server.initContainers }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.server.initContainers "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
containers:
|
|
- name: server
|
|
image: {{ include "scdf.server.image" . }}
|
|
imagePullPolicy: {{ .Values.server.image.pullPolicy | quote }}
|
|
{{- if .Values.server.containerSecurityContext }}
|
|
securityContext: {{- toYaml .Values.server.containerSecurityContext | nindent 12 }}
|
|
{{- end }}
|
|
env:
|
|
- name: BITNAMI_DEBUG
|
|
value: {{ ternary "true" "false" .Values.server.image.debug | quote }}
|
|
- name: SERVER_PORT
|
|
value: "8080"
|
|
- name: SPRING_CLOUD_CONFIG_ENABLED
|
|
value: "false"
|
|
- name: SPRING_CLOUD_KUBERNETES_CONFIG_ENABLE_API
|
|
value: "false"
|
|
- name: SPRING_CLOUD_KUBERNETES_SECRETS_ENABLE_API
|
|
value: "false"
|
|
- name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS
|
|
value: "/etc/secrets"
|
|
- name: SPRING_CLOUD_DATAFLOW_SERVER_URI
|
|
{{- if ne $serverServicePort 80 }}
|
|
value: {{ printf "http://%s-server.%s.svc.%s:%d" $fullname $releaseNamespace $clusterDomain $serverServicePort | quote }}
|
|
{{- else }}
|
|
value: {{ printf "http://%s-server.%s.svc.%s" $fullname $releaseNamespace $clusterDomain | quote }}
|
|
{{- end }}
|
|
- name: SPRING_CLOUD_DATAFLOW_FEATURES_STREAMS_ENABLED
|
|
value: {{ ternary "true" "false" .Values.server.configuration.streamingEnabled | quote }}
|
|
- name: SPRING_CLOUD_DATAFLOW_FEATURES_TASKS_ENABLED
|
|
value: {{ ternary "true" "false" .Values.server.configuration.batchEnabled | quote }}
|
|
- name: SPRING_CLOUD_DATAFLOW_FEATURES_SCHEDULES_ENABLED
|
|
value: {{ ternary "true" "false" .Values.server.configuration.batchEnabled | quote }}
|
|
{{- if .Values.server.configuration.streamingEnabled }}
|
|
- name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI
|
|
{{- if .Values.skipper.enabled }}
|
|
{{- if ne $skipperServicePort 80 }}
|
|
value: {{ printf "http://%s-skipper.%s.svc.%s:%d/api" $fullname $releaseNamespace $clusterDomain $skipperServicePort | quote }}
|
|
{{- else }}
|
|
value: {{ printf "http://%s-skipper.%s.svc.%s/api" $fullname $releaseNamespace $clusterDomain | quote }}
|
|
{{- end }}
|
|
{{- else }}
|
|
value: {{ printf "$s:%d/api" .Values.externalSkipper.host (int .Values.externalSkipper.port) | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
- name: SPRING_APPLICATION_JSON
|
|
value: "{ \"maven\": { \"local-repository\": null, \"remote-repositories\": { \"repo1\": { \"url\": \"https://repo.spring.io/libs-snapshot\"} } } }"
|
|
- name: KUBERNETES_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: KUBERNETES_TRUST_CERTIFICATES
|
|
value: {{ ternary "true" "false" .Values.server.configuration.trustK8sCerts | quote }}
|
|
{{- if .Values.server.jdwp.enabled }}
|
|
- name: JAVA_TOOL_OPTIONS
|
|
value: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address={{ .Values.server.jdwp.port }}"
|
|
{{- end }}
|
|
{{- range $key, $value := .Values.server.extraEnvVars }}
|
|
- name: {{ $key }}
|
|
value: "{{ $value }}"
|
|
{{- end }}
|
|
{{- if or .Values.server.extraEnvVarsCM .Values.server.extraEnvVarsSecret }}
|
|
envFrom:
|
|
{{- if .Values.server.extraEnvVarsCM }}
|
|
- configMapRef:
|
|
name: {{ tpl .Values.server.extraEnvVarsCM . | quote }}
|
|
{{- end }}
|
|
{{- if .Values.server.extraEnvVarsSecret }}
|
|
- secretRef:
|
|
name: {{ tpl .Values.server.extraEnvVarsSecret . | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
{{- if .Values.server.jdwp.enabled }}
|
|
- name: jdwp
|
|
containerPort: {{ .Values.server.jdwp.port }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
{{- if .Values.server.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /management/health
|
|
port: http
|
|
initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.server.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.server.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.server.livenessProbe.failureThreshold }}
|
|
{{- else if .Values.server.customLivenessProbe }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customLivenessProbe "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.server.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /management/health
|
|
port: http
|
|
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.server.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }}
|
|
{{- else if .Values.server.customReadinessProbe }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customReadinessProbe "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.server.resources }}
|
|
resources: {{- toYaml .Values.server.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: database
|
|
mountPath: /etc/secrets/database
|
|
readOnly: true
|
|
- name: config
|
|
mountPath: /opt/bitnami/spring-cloud-dataflow/conf
|
|
readOnly: true
|
|
{{- if .Values.server.sidecars }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.server.sidecars "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: database
|
|
secret:
|
|
secretName: {{ include "scdf.database.secretName" . }}
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "scdf.server.configmapName" . }}
|
|
items:
|
|
- key: application.yaml
|
|
path: application.yml
|
|
{{- if .Values.waitForBackends.enabled }}
|
|
- name: scripts
|
|
configMap:
|
|
name: {{ include "scdf.fullname" . }}-scripts
|
|
defaultMode: 0755
|
|
{{- end }}
|