deploy.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ---
  2. #apiVersion: apps.kruise.io/v1beta1
  3. apiVersion: apps/v1
  4. kind: StatefulSet
  5. metadata:
  6. name: apptj
  7. namespace: bi
  8. labels:
  9. app: apptj
  10. spec:
  11. serviceName: apptj
  12. replicas: 2
  13. selector:
  14. matchLabels:
  15. app: apptj
  16. template:
  17. metadata:
  18. labels:
  19. app: apptj
  20. spec:
  21. hostNetwork: true
  22. readinessGates:
  23. - conditionType: InPlaceUpdateReady
  24. terminationGracePeriodSeconds: 30
  25. dnsPolicy: "None"
  26. dnsConfig:
  27. nameservers:
  28. - 223.5.5.5
  29. - 10.26.22.50
  30. searches:
  31. - pro.svc.cluster.local
  32. - svc.cluster.local
  33. - cluster.local
  34. options:
  35. - name: ndots
  36. value: "5"
  37. initContainers:
  38. - name: init
  39. image: hub.evbj.easou.com/dev/busybox
  40. command: ['sh', "-c", 'chmod 777 -R /data/ && mkdir -p /data/webapps']
  41. imagePullPolicy: IfNotPresent
  42. volumeMounts:
  43. - name: volume
  44. mountPath: /data
  45. - name: init-package
  46. image: hub.evbj.easou.com/dev/busybox
  47. command: ['sh', '-c', 'rm -rf /data/webapps/* && wget http://10.40.20.61/release/search-wapage/prod-64/easou-bi/1.0.13/easou-bi_1.0.13_dataMigration_T1.0.12-5783_1.0.13_20241107-105647_RBL/ROOT.war -O /data/webapps/ROOT.war && md5sum /data/webapps/ROOT.war']
  48. imagePullPolicy: IfNotPresent
  49. volumeMounts:
  50. - name: volume
  51. mountPath: /data
  52. containers:
  53. - name: apptj
  54. image: hub.evbj.easou.com/bi/apptj:v1base
  55. imagePullPolicy: Always
  56. ports:
  57. - containerPort: 8080
  58. name: port
  59. lifecycle:
  60. preStop:
  61. exec:
  62. command: ["/bin/sh","-c","supervisorctl stop all"]
  63. volumeMounts:
  64. - name: volume
  65. mountPath: /data
  66. livenessProbe:
  67. tcpSocket:
  68. port: 8080
  69. initialDelaySeconds: 45
  70. periodSeconds: 15
  71. readinessProbe:
  72. tcpSocket:
  73. port: 8080
  74. initialDelaySeconds: 45
  75. periodSeconds: 15
  76. volumeClaimTemplates:
  77. - metadata:
  78. name: volume
  79. spec:
  80. accessModes: ["ReadWriteOnce"]
  81. storageClassName: rbd
  82. resources:
  83. requests:
  84. storage: 200Gi
  85. ---
  86. apiVersion: v1
  87. kind: Service
  88. metadata:
  89. name: apptj-svc
  90. namespace: bi
  91. labels:
  92. app: apptj-svc
  93. spec:
  94. type: NodePort
  95. ports:
  96. - port: 8080
  97. targetPort: 8080
  98. nodePort: 30010
  99. selector:
  100. app: apptj
  101. ---
  102. apiVersion: networking.k8s.io/v1
  103. kind: Ingress
  104. metadata:
  105. name: apptj-ingress
  106. namespace: bi
  107. spec:
  108. rules:
  109. - host: bi-apptj.ieasou.cn
  110. http:
  111. paths:
  112. - path: /
  113. pathType: Prefix
  114. backend:
  115. service:
  116. name: apptj-svc
  117. port:
  118. number: 8080
  119. ingressClassName: nginx