blob: 70b3269836305ec48524a82e9fe1a07d3292eb34 [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:
9 namespace: base
10 name: spring-boot-admin-env-secret
11data:
12 # sbaadmin
13 SBA_USERNAME: c2JhYWRtaW4=
14 # sbanimda
15 SBA_PASSWORD: c2JhbmltZGE=
16
17
18---
19apiVersion: v1
20kind: ConfigMap
21metadata:
22 namespace: base
23 name: spring-boot-admin-env
24data:
25 SERVER_PORT: "8080"
26
27
28---
29apiVersion: v1
30kind: Service
31metadata:
32 namespace: base
33 name: spring-boot-admin-svc
34 labels:
35 app: spring-boot-admin
36 needMonitor: 'true'
37spec:
38 ports:
39 - port: 8080
40 targetPort: http
41 protocol: TCP
42 name: http
43 - port: 6060
44 targetPort: http-metrics
45 protocol: TCP
46 name: http-metrics
47 selector:
48 app: spring-boot-admin
49---
50apiVersion: apps/v1
51kind: Deployment
52metadata:
53 namespace: base
54 name: spring-boot-admin
55spec:
56 selector:
57 matchLabels:
58 app: spring-boot-admin
59 replicas: 1
60 template:
61 metadata:
62 labels:
63 app: spring-boot-admin
64 spec:
65 containers:
66 - name: spring-boot-admin
67 # 若使用了学校搭设的私有仓库,请修改
68 image: harbor.supwisdom.com/institute/spring-boot-admin:0.1.0-SNAPSHOT
69 imagePullPolicy: Always
70 ports:
71 - containerPort: 8080
72 name: http
73 - containerPort: 6060
74 name: http-metrics
75 envFrom:
76 - configMapRef:
77 name: jvm-env
78 - secretRef:
79 name: datasource-env-secret
80 - secretRef:
81 name: spring-boot-admin-env-secret
82 - configMapRef:
83 name: spring-boot-admin-env
84 resources:
85 requests:
86 memory: "400Mi"
87 limits:
88 memory: "400Mi"
89 readinessProbe:
90 tcpSocket:
91 port: 8080
92 initialDelaySeconds: 10
93 periodSeconds: 5
94 timeoutSeconds: 5
95 successThreshold: 1
96 failureThreshold: 10
97 imagePullSecrets:
98 - name: harbor-registry
99
100
101---
102apiVersion: extensions/v1beta1
103kind: Ingress
104metadata:
105 name: sba-ingress
106 namespace: base
107spec:
108 rules:
109 # 修改为学校的根域名
110 - host: sba.paas.xxx.edu.cn
111 http:
112 paths:
113 - path: /
114 backend:
115 serviceName: spring-boot-admin-svc
116 servicePort: http
117