123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- ---
- #apiVersion: apps.kruise.io/v1beta1
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: bookcptj
- namespace: bi
- labels:
- app: bookcptj
- spec:
- serviceName: bookcptj
- replicas: 2
- selector:
- matchLabels:
- app: bookcptj
- template:
- metadata:
- labels:
- app: bookcptj
- spec:
- hostNetwork: true
- terminationGracePeriodSeconds: 30
- dnsPolicy: "None"
- dnsConfig:
- nameservers:
- - 223.5.5.5
- - 10.108.30.101
- 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/webapps']
- imagePullPolicy: IfNotPresent
- volumeMounts:
- - name: volume
- mountPath: /data
- - name: init-package
- image: hub.evbj.easou.com/dev/busybox
- command: ['sh', '-c', 'rm -rf /data/webapps/* && wget http://10.40.20.61/release/search-wapage/prod-64/bookcp/1.0.16/bookcp_1.0.16_addressChange_T1.0.15-5921_1.0.16_20250116-151014_RBL/bookcp-1.0.16-20250116151014.zip -O /data/webapps/bookcp.zip && cd /data/webapps;unzip bookcp.zip;mv dist ROOT && md5sum /data/webapps/bookcp.zip']
- imagePullPolicy: IfNotPresent
- volumeMounts:
- - name: volume
- mountPath: /data
- containers:
- - name: bookcptj
- image: hub.evbj.easou.com/bi/apptj:v1base
- 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: 60
- periodSeconds: 15
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 60
- periodSeconds: 15
- volumeClaimTemplates:
- - metadata:
- name: volume
- spec:
- accessModes: ["ReadWriteOnce"]
- storageClassName: rbd
- resources:
- requests:
- storage: 200Gi
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: bookcptj-svc
- namespace: bi
- labels:
- app: bookcptj-svc
- spec:
- type: NodePort
- ports:
- - port: 8080
- targetPort: 8080
- nodePort: 30030
- selector:
- app: bookcptj
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: bookcptj-ingress
- namespace: bi
- annotations:
- kubernetes.io/ingress.class: nginx
- nginx.ingress.kubernetes.io/affinity: cookie
- nginx.ingress.kubernetes.io/affinity-mode: persistent
- spec:
- rules:
- - host: bi-bookcptj.ieasou.cn
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: bookcptj-svc
- port:
- number: 8080
- - host: bookcptj.appeasou.com
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: bookcptj-svc
- port:
- number: 8080
- - host: bookcptj.easou.com
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: bookcptj-svc
- port:
- number: 8080
- - host: bookcptj.wejuan.cn
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: bookcptj-svc
- port:
- number: 8080
- ingressClassName: nginx
|