blob: 9b305c74ffd0d28efe80c19250101933bae083e1 [file] [log] [blame]
刘洪青fbf49232020-09-29 17:48:43 +08001# 0.0.2.infras-sba.yaml
2
3# 此服务可选安装,用于开发人员排查问题
4
5---
6apiVersion: v1
7kind: Secret
8metadata:
刘洪青77a99c72021-06-10 10:58:57 +08009 namespace: authx-service
刘洪青fbf49232020-09-29 17:48:43 +080010 name: spring-boot-admin-env-secret
11data:
12 # sbaadmin
13 SBA_USERNAME: c2JhYWRtaW4=
14 # sbanimda
15 SBA_PASSWORD: c2JhbmltZGE=
16
刘洪青fbf49232020-09-29 17:48:43 +080017---
18apiVersion: v1
19kind: Service
20metadata:
刘洪青77a99c72021-06-10 10:58:57 +080021 namespace: authx-service
刘洪青fbf49232020-09-29 17:48:43 +080022 name: spring-boot-admin-svc
23 labels:
24 app: spring-boot-admin
25 needMonitor: 'true'
26spec:
27 ports:
28 - port: 8080
29 targetPort: http
30 protocol: TCP
31 name: http
32 - port: 6060
33 targetPort: http-metrics
34 protocol: TCP
35 name: http-metrics
36 selector:
37 app: spring-boot-admin
刘洪青77a99c72021-06-10 10:58:57 +080038
刘洪青fbf49232020-09-29 17:48:43 +080039---
40apiVersion: apps/v1
41kind: Deployment
42metadata:
43 namespace: base
44 name: spring-boot-admin
45spec:
46 selector:
47 matchLabels:
48 app: spring-boot-admin
49 replicas: 1
50 template:
51 metadata:
52 labels:
53 app: spring-boot-admin
54 spec:
55 containers:
56 - name: spring-boot-admin
57 # 若使用了学校搭设的私有仓库,请修改
刘洪青77a99c72021-06-10 10:58:57 +080058 image: hb.v.zzu.edu.cn/institute/spring-boot-admin:0.1.0-SNAPSHOT
刘洪青fbf49232020-09-29 17:48:43 +080059 imagePullPolicy: Always
60 ports:
61 - containerPort: 8080
62 name: http
63 - containerPort: 6060
64 name: http-metrics
65 envFrom:
刘洪青fbf49232020-09-29 17:48:43 +080066 - secretRef:
67 name: spring-boot-admin-env-secret
刘洪青fbf49232020-09-29 17:48:43 +080068 resources:
69 requests:
刘洪青77a99c72021-06-10 10:58:57 +080070 cpu: 200m
71 memory: "256Mi"
刘洪青fbf49232020-09-29 17:48:43 +080072 limits:
刘洪青77a99c72021-06-10 10:58:57 +080073 cpu: 1000m
74 memory: "256Mi"
刘洪青fbf49232020-09-29 17:48:43 +080075 readinessProbe:
76 tcpSocket:
77 port: 8080
78 initialDelaySeconds: 10
79 periodSeconds: 5
80 timeoutSeconds: 5
81 successThreshold: 1
82 failureThreshold: 10
刘洪青77a99c72021-06-10 10:58:57 +080083 # imagePullSecrets:
84 # - name: harbor-registry
刘洪青fbf49232020-09-29 17:48:43 +080085
86---
87apiVersion: extensions/v1beta1
88kind: Ingress
89metadata:
90 name: sba-ingress
91 namespace: base
92spec:
93 rules:
94 # 修改为学校的根域名
刘洪青77a99c72021-06-10 10:58:57 +080095 - host: sba.s.zzu.edu.cn
刘洪青fbf49232020-09-29 17:48:43 +080096 http:
97 paths:
98 - path: /
99 backend:
100 serviceName: spring-boot-admin-svc
101 servicePort: http