wujian_develop_tool/template/api/deploy/templates/deployment.yaml

82 lines
2.4 KiB
YAML
Raw Permalink Normal View History

2022-01-06 00:19:22 +08:00
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
namespace: {{ .Values.nameSpace }}
labels:
app: {{ .Release.Name }}
2022-01-09 22:13:56 +08:00
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
2022-01-06 00:19:22 +08:00
annotations:
kubesphere.io/alias-name: {{ .Values.aliasName }}
kubesphere.io/creator: drone
2022-01-09 22:13:56 +08:00
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{ .Values.nameSpace }}
2022-01-06 00:19:22 +08:00
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
2022-01-09 22:13:56 +08:00
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
2022-01-06 00:19:22 +08:00
template:
metadata:
labels:
app: {{ .Release.Name }}
2022-01-09 22:13:56 +08:00
app.kubernetes.io/version: v1
app.kubernetes.io/name: {{ .Release.Name }}
version: v1
app.kubernetes.io/instance: {{ .Release.Name }}
2022-01-06 00:19:22 +08:00
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image }}:{{ .Values.imageTag }}
ports:
2022-01-09 22:13:56 +08:00
- containerPort: {{ .Values.port }}
protocol: TCP
2022-01-06 00:19:22 +08:00
env:
2022-01-11 04:06:18 +08:00
- name: ENDPOINTS
2022-01-06 00:19:22 +08:00
value: 'etcd:2379'
2022-01-11 04:06:18 +08:00
- name: APP_NAME
value: {{ .Values.appName }}
- name: NAMESPACE
value: {{ .Values.nameSpace }}
- name: APP_TYPE
value: api
2022-01-06 00:19:22 +08:00
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