blob: 783247df66e979728c767cd6bb3e098d383a9e75 [file] [log] [blame]
刘洪青a1bab152022-03-11 14:30:36 +08001# 0.0.2.infras-sba.yaml
2
3# 此服务可选安装,用于开发人员排查问题
4
5---
6apiVersion: v1
7kind: ConfigMap
8metadata:
9 namespace: base
10 name: spring-boot-admin-env
11data:
12 SPRING_BOOT_ADMIN_UI_PUBLIC_URL: /
13
14---
15apiVersion: v1
16kind: Secret
17metadata:
18 namespace: base
19 name: spring-boot-admin-env-secret
20data:
21 # sbaadmin
22 SBA_USERNAME: c2JhYWRtaW4=
23 # sbanimda
24 SBA_PASSWORD: c2JhbmltZGE=
25
26---
27apiVersion: v1
28kind: Service
29metadata:
30 namespace: base
31 name: spring-boot-admin-svc
32 labels:
33 app: spring-boot-admin
34 needMonitor: 'true'
35spec:
36 ports:
37 - port: 8080
38 targetPort: http
39 protocol: TCP
40 name: http
41 - port: 6060
42 targetPort: http-metrics
43 protocol: TCP
44 name: http-metrics
45 selector:
46 app: spring-boot-admin
47
48---
49apiVersion: apps/v1
50kind: Deployment
51metadata:
52 namespace: base
53 name: spring-boot-admin
54spec:
55 selector:
56 matchLabels:
57 app: spring-boot-admin
58 replicas: 1
59 template:
60 metadata:
61 labels:
62 app: spring-boot-admin
63 spec:
64 containers:
65 - name: spring-boot-admin
66 # 若使用了学校搭设的私有仓库,请修改
67 image: harbor.supwisdom.com/institute/spring-boot-admin:0.1.0-SNAPSHOT
68 imagePullPolicy: Always
69 ports:
70 - containerPort: 8080
71 name: http
72 - containerPort: 6060
73 name: http-metrics
74 envFrom:
75 - secretRef:
76 name: spring-boot-admin-env-secret
77 - configMapRef:
78 name: spring-boot-admin-env
79 resources:
80 requests:
81 cpu: 200m
82 memory: "256Mi"
83 limits:
84 cpu: 1000m
85 memory: "256Mi"
86 readinessProbe:
87 tcpSocket:
88 port: 8080
89 initialDelaySeconds: 10
90 periodSeconds: 5
91 timeoutSeconds: 5
92 successThreshold: 1
93 failureThreshold: 10
94 imagePullSecrets:
95 - name: harbor-registry
96
97---
98apiVersion: extensions/v1beta1
99kind: Ingress
100metadata:
101 name: sba-ingress
102 namespace: base
103spec:
104 rules:
105 # 修改为学校的根域名
106 - host: sba.paas.xxx.edu.cn
107 http:
108 paths:
109 - path: /
110 backend:
111 serviceName: spring-boot-admin-svc
112 servicePort: http