123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- ---
- apiVersion: apps.kruise.io/v1beta1
- #apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: global-book-api-canary
- namespace: qa
- labels:
- app: global-book-api
- spec:
- serviceName: global-book-api-canary
- replicas: 1
- selector:
- matchLabels:
- app: global-book-api-canary
- template:
- metadata:
- labels:
- app: global-book-api-canary
- spec:
- hostNetwork: true
- readinessGates:
- - conditionType: InPlaceUpdateReady
- terminationGracePeriodSeconds: 30
- dnsPolicy: "None"
- dnsConfig:
- nameservers:
- - 223.5.5.5
- - 10.26.22.50
- searches:
- - pro.svc.cluster.local
- - svc.cluster.local
- - cluster.local
- options:
- - name: ndots
- value: "5"
- initContainers:
- - name: init
- image: hub.evbj.easou.com/dev/busybox
- command: ['sh', "-c", 'chmod 777 -R /data && mkdir -p /data/project && mkdir -p /data/log']
- imagePullPolicy: IfNotPresent
- volumeMounts:
- - name: volume
- mountPath: /data
- - name: init-package
- image: hub.evbj.easou.com/dev/busybox
- command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/novelapi/3.1.312/novelapi_3.1.312_duanjuIOS_B3.1.308-188418_3.1.312_20230908-181326_RBL/ROOT.war -O /data/project/ROOT.war && md5sum /data/project/ROOT.war']
- imagePullPolicy: IfNotPresent
- volumeMounts:
- - name: volume
- mountPath: /data
- containers:
- - name: global-book-api-canary
- image: hub.evbj.easou.com/dev/book-api:v3.1base
- imagePullPolicy: Always
- ports:
- - containerPort: 8080
- name: port
- lifecycle:
- preStop:
- exec:
- command: ["/bin/sh","-c","supervisorctl stop all"]
- volumeMounts:
- - name: volume
- mountPath: /data
- livenessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 45
- periodSeconds: 15
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 45
- periodSeconds: 15
- - name: book-api-nginx
- image: hub.evbj.easou.com/pro/book-api-nginx:v1.0.2
- imagePullPolicy: IfNotPresent
- ports:
- - containerPort: 80
- name: port
- lifecycle:
- preStop:
- exec:
- command: ["/bin/sh","-c","supervisorctl stop all"]
- volumeMounts:
- - name: volume
- mountPath: /data
- livenessProbe:
- tcpSocket:
- port: 80
- initialDelaySeconds: 45
- periodSeconds: 15
- readinessProbe:
- tcpSocket:
- port: 80
- initialDelaySeconds: 45
- periodSeconds: 15
- - name: book-api-flume
- image: hub.evbj.easou.com/dev/book-api-flume:v1.0.1
- imagePullPolicy: IfNotPresent
- lifecycle:
- preStop:
- exec:
- command: ["/bin/sh","-c","supervisorctl stop all"]
- volumeMounts:
- - name: volume
- mountPath: /data
- updateStrategy:
- type: RollingUpdate
- rollingUpdate:
- podUpdatePolicy: InPlaceIfPossible
- inPlaceUpdateStrategy:
- gracePeriodSeconds: 10
- volumeClaimTemplates:
- - metadata:
- name: volume
- spec:
- accessModes: ["ReadWriteOnce"]
- storageClassName: rbd
- resources:
- requests:
- storage: 200Gi
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: global-book-api-canary-svc
- namespace: qa
- labels:
- app: global-book-api-canary-svc
- spec:
- type: NodePort
- ports:
- - port: 80
- targetPort: 80
- selector:
- app: global-book-api-canary
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: global-book-api-ingress
- namespace: qa
- spec:
- rules:
- - host: qa-gapi.ieasou.cn
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: global-book-api-canary-svc
- port:
- number: 80
- ingressClassName: nginx
|