blob: 09eef38903992a606bd00ebce09e043f03c07bfb [file] [log] [blame]
#
# Copyright 2019 WeBank
#
# Licensed 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: linkis-ujes-pipeline-entrance-deployment
spec:
replicas: 1
selector:
matchLabels:
app: linkis-ujes-pipeline-entrance
# release: dev
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: linkis-ujes-pipeline-entrance
# release: dev
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- linkis-ujes-pipeline-entrance
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node3
containers:
- name: linkis-ujes-pipeline-entrance
image: zhangrong1027/linkis:linkis-ujes-pipeline-entrance-0.10.0
lifecycle:
preStop:
exec:
command: ["sh","/opt/ihome/linkis-ujes-pipeline-entrance/bin/stop.sh"]
imagePullPolicy: Always
ports:
- name: http
containerPort: 18000
livenessProbe:
tcpSocket:
port: 18000
initialDelaySeconds: 15
periodSeconds: 20
env:
- name: eurekaurl
valueFrom:
configMapKeyRef:
name: eureka-config
key: eurekaUrl
- name: EUREKA_URL
valueFrom:
configMapKeyRef:
name: eureka-config
key: eurekaUrl
- name: SERVER_HEAP_SIZE
value: 1024M
- name: START_PORT
value: "18000"
volumeMounts:
- name: linkis-ujes-pipeline-entrance-config
mountPath: /opt/ihome/conf
# - name: resultset
# mountPath: /opt/ihome/data
- name: varlog
mountPath: /opt/ihome/linkis-ujes-pipeline-entrance/logs
imagePullSecrets:
- name: registry-key
volumes:
- name: linkis-ujes-pipeline-entrance-config
configMap:
name: linkis-ujes-pipeline-entrance-config
# - name: resultset
# nfs:
# path: /data/k8s
# server: 10.206.0.12
- name: varlog
hostPath:
path: /var/log
- name: eureka-config
configMap:
name: eureka-config