blob: 88b0de2b17c709326e7c81f6dae703523c38afd5 [file] [log] [blame]
# 0.0.2.infras-sba.yaml
# 此服务可选安装,用于开发人员排查问题
---
apiVersion: v1
kind: Secret
metadata:
namespace: base
name: spring-boot-admin-env-secret
data:
# sbaadmin
SBA_USERNAME: c2JhYWRtaW4=
# sbanimda
SBA_PASSWORD: c2JhbmltZGE=
---
apiVersion: v1
kind: Service
metadata:
namespace: base
name: spring-boot-admin-svc
labels:
app: spring-boot-admin
needMonitor: 'true'
spec:
ports:
- port: 8080
targetPort: http
protocol: TCP
name: http
- port: 6060
targetPort: http-metrics
protocol: TCP
name: http-metrics
selector:
app: spring-boot-admin
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: base
name: spring-boot-admin
spec:
selector:
matchLabels:
app: spring-boot-admin
replicas: 1
template:
metadata:
labels:
app: spring-boot-admin
spec:
containers:
- name: spring-boot-admin
# 若使用了学校搭设的私有仓库,请修改
image: harbor.supwisdom.com/institute/spring-boot-admin:0.1.0-SNAPSHOT
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
- containerPort: 6060
name: http-metrics
envFrom:
- secretRef:
name: spring-boot-admin-env-secret
resources:
requests:
cpu: 200m
memory: "256Mi"
limits:
cpu: 1000m
memory: "256Mi"
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 10
imagePullSecrets:
- name: harbor-registry
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: sba-ingress
namespace: base
spec:
rules:
# 修改为学校的根域名
- host: sba.paas.xxx.edu.cn
http:
paths:
- path: /
backend:
serviceName: spring-boot-admin-svc
servicePort: http