12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- labels:
- app: yygh-site
- name: yygh-site
- namespace: his #一定要写名称空间
- spec:
- progressDeadlineSeconds: 600
- replicas: 1
- selector:
- matchLabels:
- app: yygh-site
- strategy:
- rollingUpdate:
- maxSurge: 50%
- maxUnavailable: 50%
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: yygh-site
- spec:
- imagePullSecrets:
- - name: habor-docker-hub #提前在项目下配置访问阿里云的账号密码
- containers:
- - image: $REGISTRY/$DOCKERHUB_NAMESPACE/yygh-site:v$BUILD_NUMBER
- # readinessProbe:
- # httpGet:
- # path: /actuator/health
- # port: 8080
- # timeoutSeconds: 10
- # failureThreshold: 30
- # periodSeconds: 5
- imagePullPolicy: Always
- name: app
- ports:
- - containerPort: 3000
- protocol: TCP
- resources:
- limits:
- cpu: 300m
- memory: 600Mi
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- dnsPolicy: ClusterFirst
- restartPolicy: Always
- terminationGracePeriodSeconds: 30
- ---
- apiVersion: v1
- kind: Service
- metadata:
- labels:
- app: yygh-site
- name: yygh-site
- namespace: his
- spec:
- ports:
- - name: http
- port: 3000
- protocol: TCP
- targetPort: 3000
- nodePort: 32070
- selector:
- app: yygh-site
- sessionAffinity: None
- type: NodePort
|