123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- ---
- apiVersion: apps.kruise.io/v1beta1
- #apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: book-api
- namespace: dev
- labels:
- app: book-api
- spec:
- serviceName: book-api
- replicas: 2
- selector:
- matchLabels:
- app: book-api
- template:
- metadata:
- labels:
- app: book-api
- spec:
- terminationGracePeriodSeconds: 180
- initContainers:
- - name: init
- image: $JNLP_REPO/dev/busybox
- command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
- imagePullPolicy: Always
- volumeMounts:
- - name: volume
- mountPath: /data
- containers:
- - name: book-api
- image: hub.evbj.easou.com/op/v3.0.0
- imagePullPolicy: Always
- ports:
- - containerPort: 8080
- name: port
- volumeMounts:
- - name: volume
- mountPath: /data
- livenessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 45
- periodSeconds: 15
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 45
- periodSeconds: 15
- updateStrategy:
- type: RollingUpdate
- rollingUpdate:
- podUpdatePolicy: InPlaceIfPossible
- inPlaceUpdateStrategy:
- gracePeriodSeconds: 10
- volumeClaimTemplates:
- - metadata:
- name: volume
- spec:
- accessModes: ["ReadWriteOnce"]
- storageClassName: ceph-block
- resources:
- requests:
- storage: 200Gi
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: book-api-svc
- namespace: dev
- labels:
- app: book-api-svc
- spec:
- type: NodePort
- ports:
- - port: 8080
- targetPort: 8080
- selector:
- app: book-api
- ---
- apiVersion: extensions/v1beta1
- kind: Ingress
- metadata:
- name: book-api-ingress
- namespace: dev
- annotations:
- kubernetes.io/ingress.class: nginx
- spec:
- rules:
- - host: dev-book-api.ieasou.cn
- http:
- paths:
- - path: /
- backend:
- serviceName: book-svc
- servicePort: 8080
|