apiVersion: apps/v1 kind: Deployment metadata: labels: app: enfi-boot name: enfi-boot namespace: wang-project spec: progressDeadlineSeconds: 600 replicas: 1 selector: matchLabels: app: enfi-boot strategy: rollingUpdate: maxSurge: 50% maxUnavailable: 50% type: RollingUpdate template: metadata: labels: app: enfi-boot spec: imagePullSecrets: - name: aliyun-docker-hub containers: - image: $REGISTRY/$ALIYUNHUB_NAMESPACE/enfi-boot:SNAPSHOT-$BUILD_NUMBER imagePullPolicy: Always name: app ports: - containerPort: 8080 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: enfi-boot name: enfi-boot namespace: wang-project spec: ports: - name: http port: 8080 protocol: TCP targetPort: 8080 selector: app: enfi-boot sessionAffinity: None type: ClusterIP