blob: 88b0de2b17c709326e7c81f6dae703523c38afd5 [file] [log] [blame]
刘洪青47205852020-08-14 13:39:30 +08001# 0.0.2.infras-sba.yaml
2
3# 此服务可选安装,用于开发人员排查问题
4
5---
6apiVersion: v1
7kind: Secret
8metadata:
9 namespace: base
10 name: spring-boot-admin-env-secret
11data:
12 # sbaadmin
13 SBA_USERNAME: c2JhYWRtaW4=
14 # sbanimda
15 SBA_PASSWORD: c2JhbmltZGE=
16
刘洪青47205852020-08-14 13:39:30 +080017---
18apiVersion: v1
19kind: Service
20metadata:
21 namespace: base
22 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
bao.aoeefd0602020-10-20 14:09:08 +080038
刘洪青47205852020-08-14 13:39:30 +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 # 若使用了学校搭设的私有仓库,请修改
58 image: harbor.supwisdom.com/institute/spring-boot-admin:0.1.0-SNAPSHOT
59 imagePullPolicy: Always
60 ports:
61 - containerPort: 8080
62 name: http
63 - containerPort: 6060
64 name: http-metrics
65 envFrom:
刘洪青47205852020-08-14 13:39:30 +080066 - secretRef:
67 name: spring-boot-admin-env-secret
刘洪青47205852020-08-14 13:39:30 +080068 resources:
69 requests:
bao.aoeefd0602020-10-20 14:09:08 +080070 cpu: 200m
71 memory: "256Mi"
刘洪青47205852020-08-14 13:39:30 +080072 limits:
bao.aoeefd0602020-10-20 14:09:08 +080073 cpu: 1000m
74 memory: "256Mi"
刘洪青47205852020-08-14 13:39:30 +080075 readinessProbe:
76 tcpSocket:
77 port: 8080
78 initialDelaySeconds: 10
79 periodSeconds: 5
80 timeoutSeconds: 5
81 successThreshold: 1
82 failureThreshold: 10
83 imagePullSecrets:
84 - name: harbor-registry
85
刘洪青47205852020-08-14 13:39:30 +080086---
87apiVersion: extensions/v1beta1
88kind: Ingress
89metadata:
90 name: sba-ingress
91 namespace: base
92spec:
93 rules:
94 # 修改为学校的根域名
95 - host: sba.paas.xxx.edu.cn
96 http:
97 paths:
98 - path: /
99 backend:
100 serviceName: spring-boot-admin-svc
101 servicePort: http