deploy-canary.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ---
  2. apiVersion: apps.kruise.io/v1beta1
  3. #apiVersion: apps/v1
  4. kind: StatefulSet
  5. metadata:
  6. name: book-webview-canary
  7. namespace: book-webview
  8. labels:
  9. app: book-webview
  10. spec:
  11. serviceName: book-webview-canary
  12. replicas: 1
  13. selector:
  14. matchLabels:
  15. app: book-webview-canary
  16. template:
  17. metadata:
  18. labels:
  19. app: book-webview-canary
  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. initContainers:
  30. - name: init
  31. image: hub.evbj.easou.com/dev/busybox
  32. command: ['sh', "-c", 'chmod 777 -R /data && mkdir -p /data/project && mkdir -p /data/log']
  33. imagePullPolicy: IfNotPresent
  34. volumeMounts:
  35. - name: volume
  36. mountPath: /data
  37. - name: init-package
  38. image: hub.evbj.easou.com/dev/busybox
  39. command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.416/esbookweb_1.5.416_changeSearchEnv_T1.5.413-180117_1.5.416_20220829-163114_RBL/ROOT.war -O /data/project/ROOT.war']
  40. imagePullPolicy: IfNotPresent
  41. volumeMounts:
  42. - name: volume
  43. mountPath: /data
  44. containers:
  45. - name: book-webview-canary
  46. image: hub.evbj.easou.com/dev/book-webview:v3.1base
  47. imagePullPolicy: Always
  48. ports:
  49. - containerPort: 8080
  50. name: port
  51. volumeMounts:
  52. - name: volume
  53. mountPath: /data
  54. livenessProbe:
  55. tcpSocket:
  56. port: 8080
  57. initialDelaySeconds: 45
  58. periodSeconds: 15
  59. readinessProbe:
  60. tcpSocket:
  61. port: 8080
  62. initialDelaySeconds: 45
  63. periodSeconds: 15
  64. updateStrategy:
  65. type: RollingUpdate
  66. rollingUpdate:
  67. podUpdatePolicy: InPlaceIfPossible
  68. inPlaceUpdateStrategy:
  69. gracePeriodSeconds: 10
  70. volumeClaimTemplates:
  71. - metadata:
  72. name: volume
  73. spec:
  74. accessModes: ["ReadWriteOnce"]
  75. storageClassName: ceph-block
  76. resources:
  77. requests:
  78. storage: 200Gi
  79. ---
  80. apiVersion: v1
  81. kind: Service
  82. metadata:
  83. name: book-webview-canary-svc
  84. namespace: book-webview
  85. labels:
  86. app: book-webview-canary-svc
  87. spec:
  88. type: NodePort
  89. ports:
  90. - port: 8080
  91. targetPort: 8080
  92. nodePort: 30101
  93. selector:
  94. app: book-webview-canary
  95. ---
  96. #apiVersion: networking.k8s.io/v1
  97. #kind: Ingress
  98. #metadata:
  99. # name: book-webview-ingress
  100. # namespace: book-webview
  101. #spec:
  102. #tls:
  103. # - hosts:
  104. # - dev-book-webview.ieasou.cn
  105. # secretName: ieasou.cn
  106. # rules:
  107. # - host: book-webview-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