123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: open
- spec:
- minReadySeconds: 5
- replicas: 1
- selector:
- matchLabels:
- k8s-app: open
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxSurge: 1
- template:
- metadata:
- labels:
- k8s-app: open
- spec:
- imagePullSecrets:
- - name: registry-key
- containers:
- - command: [ "java","-cp","/*","com.sxtvs.open.OpenApplication","--spring.profiles.active=prod" ]
- env:
- - name: PATH
- value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- - name: TZ
- value: Asia/Shanghai
- image: { { image } }
- imagePullPolicy: IfNotPresent
- name: open
- resources:
- limits:
- cpu: 4000m
- memory: 8192Mi
- requests:
- cpu: 3000m
- memory: 7168Mi
- livenessProbe:
- httpGet:
- port: 80
- path: /hello
- initialDelaySeconds: 3
- periodSeconds: 3
- readinessProbe:
- httpGet:
- port: 80
- path: /hello
- initialDelaySeconds: 3
- periodSeconds: 3
- timeoutSeconds: 1
- dnsPolicy: ClusterFirst
- terminationGracePeriodSeconds: 30
|