blob: 049aa2518f89f4b7cda526f1a57df053e3da2297 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "streampark.name" . }}
namespace: {{ .Release.Namespace | default "default"}}
labels:
{{- include "streampark.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.spec.replicaCount }}
selector:
matchLabels:
{{- include "streampark.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "streampark.selectorLabels" . | nindent 8 }}
spec:
{{- if .Values.spec.affinity }}
affinity:
{{- toYaml .Values.spec.affinity | nindent 8 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{- toYaml .Values.spec.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{- toYaml .Values.spec.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
serviceAccountName: {{ include "streampark.serviceAccountName" . }}
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag}}
name: {{ .Chart.Name }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: {{ .Values.spec.name }}
containerPort: {{ .Values.spec.containerPort }}
protocol: TCP
- name: efs
containerPort: {{ .Values.spec.efsPort }}
protocol: TCP
env:
{{- toYaml .Values.spec.container.env | nindent 12 }}
securityContext:
privileged: false
command: ["bash","-c","bash ./bin/streampark.sh start_docker"]
{{- if .Values.spec.livenessProbe.enabled }}
livenessProbe:
exec:
command: [ "curl", "-s", "http://localhost:10000/actuator/health/liveness" ]
initialDelaySeconds: {{ .Values.spec.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.spec.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.spec.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.spec.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.spec.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.spec.readinessProbe.enabled }}
readinessProbe:
exec:
command: [ "curl", "-s", "http://localhost:10000/actuator/health/readiness" ]
initialDelaySeconds: {{ .Values.spec.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.spec.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.spec.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.spec.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.spec.readinessProbe.failureThreshold }}
{{- end }}
volumeMounts:
- name: streampark-default-config-volume
mountPath: /usr/local/service/streampark/conf
resources:
{{- toYaml .Values.spec.resources | nindent 12 }}
volumes:
- name: streampark-default-config-volume
configMap:
name: streampark-console-config
items:
- key: application.yml
path: application.yml
- key: application-h2.yml
path: application-h2.yml
- key: application-mysql.yml
path: application-mysql.yml
- key: application-pgsql.yml
path: application-pgsql.yml
- key: logback-spring.xml
path: logback-spring.xml
- key: kerberos.yml
path: kerberos.yml
- key: spy.properties
path: spy.properties
- key: ValidationMessages.properties
path: ValidationMessages.properties