deploy.yaml.bak 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ---
  2. apiVersion: apps.kruise.io/v1beta1
  3. #apiVersion: apps/v1
  4. kind: StatefulSet
  5. metadata:
  6. name: book-webview
  7. namespace: dev
  8. labels:
  9. app: book-webview
  10. spec:
  11. serviceName: book-webview
  12. replicas: 2
  13. selector:
  14. matchLabels:
  15. app: book-webview
  16. template:
  17. metadata:
  18. labels:
  19. app: book-webview
  20. spec:
  21. readinessGates:
  22. - conditionType: InPlaceUpdateReady
  23. terminationGracePeriodSeconds: 180
  24. dnsPolicy: ClusterFirstWithHostNet
  25. dnsConfig:
  26. nameservers:
  27. - 10.26.22.50
  28. - 223.5.5.5
  29. - 114.114.114.114
  30. initContainers:
  31. - name: init
  32. image: hub.evbj.easou.com/dev/busybox
  33. command: ['sh', "-c", 'chmod 777 -R /data && mkdir -p /data/project && mkdir -p /data/log']
  34. imagePullPolicy: IfNotPresent
  35. volumeMounts:
  36. - name: volume
  37. mountPath: /data
  38. - name: init-package
  39. image: hub.evbj.easou.com/dev/busybox
  40. command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.413/esbookweb_1.5.413_kuaiDu3.15.4Dev_T1.5.412-179706_1.5.413_20220803-181844_RBL/ROOT.war -O /data/project/ROOT.war']
  41. imagePullPolicy: IfNotPresent
  42. volumeMounts:
  43. - name: volume
  44. mountPath: /data
  45. containers:
  46. - name: book-webview
  47. image: hub.evbj.easou.com/dev/book-webview:v3.1base
  48. imagePullPolicy: Always
  49. ports:
  50. - containerPort: 8080
  51. name: port
  52. volumeMounts:
  53. - name: volume
  54. mountPath: /data
  55. livenessProbe:
  56. tcpSocket:
  57. port: 8080
  58. initialDelaySeconds: 45
  59. periodSeconds: 15
  60. readinessProbe:
  61. tcpSocket:
  62. port: 8080
  63. initialDelaySeconds: 45
  64. periodSeconds: 15
  65. updateStrategy:
  66. type: RollingUpdate
  67. rollingUpdate:
  68. podUpdatePolicy: InPlaceIfPossible
  69. inPlaceUpdateStrategy:
  70. gracePeriodSeconds: 10
  71. volumeClaimTemplates:
  72. - metadata:
  73. name: volume
  74. spec:
  75. accessModes: ["ReadWriteOnce"]
  76. storageClassName: ceph-block
  77. resources:
  78. requests:
  79. storage: 200Gi
  80. ---
  81. apiVersion: v1
  82. kind: Service
  83. metadata:
  84. name: book-webview-svc
  85. namespace: dev
  86. labels:
  87. app: book-webview-svc
  88. spec:
  89. type: NodePort
  90. ports:
  91. - port: 8080
  92. targetPort: 8080
  93. selector:
  94. app: book-webview
  95. ---
  96. apiVersion: networking.k8s.io/v1
  97. kind: Ingress
  98. metadata:
  99. name: book-webview-ingress
  100. namespace: dev
  101. spec:
  102. tls:
  103. - hosts:
  104. - dev-book-webview.ieasou.cn
  105. secretName: ieasou.cn
  106. rules:
  107. - host: dev-book-webview.ieasou.cn
  108. http:
  109. paths:
  110. - path: /
  111. pathType: Prefix
  112. backend:
  113. service:
  114. name: book-webview-svc
  115. port:
  116. number: 8080
  117. ingressClassName: nginx