deployment-prod.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: grider-erection-web
  5. namespace: emp-prod
  6. spec:
  7. selector:
  8. app: grider-erection-web
  9. type: ClusterIP
  10. # sessionAffinity: None
  11. # sessionAffinityConfig:
  12. # clientIP:
  13. # timeoutSeconds: 10800
  14. ports:
  15. - name: app
  16. protocol: TCP
  17. port: 8080
  18. targetPort: 8080
  19. # If you set the `spec.type` field to `NodePort` and you want a specific port number,
  20. # you can specify a value in the `spec.ports[*].nodePort` field.
  21. # nodePort: 35100
  22. ---
  23. apiVersion: apps/v1
  24. kind: Deployment
  25. metadata:
  26. name: grider-erection-web
  27. namespace: emp-prod
  28. labels:
  29. app: grider-erection-web
  30. spec:
  31. selector:
  32. matchLabels:
  33. app: grider-erection-web
  34. replicas: 1
  35. strategy:
  36. rollingUpdate:
  37. maxSurge: 25%
  38. maxUnavailable: 25%
  39. type: RollingUpdate
  40. template:
  41. metadata:
  42. labels:
  43. app: grider-erection-web
  44. spec:
  45. # initContainers:
  46. # Init containers are exactly like regular containers, except:
  47. # - Init containers always run to completion.
  48. # - Each init container must complete successfully before the next one starts.
  49. containers:
  50. - name: grider-erection-web
  51. image: registry.cn-gdgz1.ctyun.cn/emp-prod/grider-erection-web:latest
  52. resources:
  53. requests:
  54. cpu: 100m
  55. memory: 200Mi
  56. limits:
  57. cpu: 150m
  58. memory: 300Mi
  59. # livenessProbe:
  60. # tcpSocket:
  61. # port: 5100
  62. # initialDelaySeconds: 5
  63. # timeoutSeconds: 5
  64. # successThreshold: 1
  65. # failureThreshold: 3
  66. # periodSeconds: 10
  67. # readinessProbe:
  68. # httpGet:
  69. # path: /
  70. # port: 5100
  71. # initialDelaySeconds: 5
  72. # timeoutSeconds: 2
  73. # successThreshold: 1
  74. # failureThreshold: 3
  75. # periodSeconds: 10
  76. # env:
  77. # - name: DB_HOST
  78. # valueFrom:
  79. # configMapKeyRef:
  80. # name: MYAPP
  81. # key: DB_HOST
  82. ports:
  83. - containerPort: 8080
  84. # name: emp-grider-erection
  85. # volumeMounts:
  86. # - name: localtime
  87. # mountPath: /etc/localtime
  88. # volumes:
  89. # - name: localtime
  90. # hostPath:
  91. # path: /usr/share/zoneinfo/Asia/Shanghai
  92. imagePullSecrets:
  93. - name : docker-harbor
  94. restartPolicy: Always