backend/app/zeus/api/lark/deploy/templates/deployment.yaml

82 lines
2.4 KiB
YAML
Executable File

kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
namespace: {{ .Values.nameSpace }}
labels:
app: {{ .Release.Name }}
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
kubesphere.io/alias-name: {{ .Values.aliasName }}
kubesphere.io/creator: drone
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{ .Values.nameSpace }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image }}:{{ .Values.imageTag }}
ports:
- containerPort: {{ .Values.port }}
protocol: TCP
env:
- name: ENDPOINTS
value: 'etcd:2379'
- name: APP_NAME
value: {{ .Values.appName }}
- name: NAMESPACE
value: {{ .Values.nameSpace }}
- name: APP_TYPE
value: api
resources:
limits:
cpu: 200m
memory: 1000Mi
requests:
cpu: 10m
memory: 200Mi
volumeMounts:
- name: host-time
readOnly: true
mountPath: /etc/localtime
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
imagePullSecrets:
- name: registry-secret
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600