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

62 lines
1.6 KiB
YAML
Raw 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 }}
annotations:
kubesphere.io/alias-name: {{ .Values.aliasName }}
kubesphere.io/creator: drone
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .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'
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