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

76 lines
2.2 KiB
YAML
Raw Normal View History

2022-01-06 23:34:37 +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 23:34:37 +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 23:34:37 +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 23:34:37 +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 23:34:37 +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 23:34:37 +08:00
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