刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 1 | # 0.0.2.infras-sba.yaml |
| 2 | |
| 3 | # 此服务可选安装,用于开发人员排查问题 |
| 4 | |
| 5 | --- |
| 6 | apiVersion: v1 |
| 7 | kind: Secret |
| 8 | metadata: |
| 9 | namespace: base |
| 10 | name: spring-boot-admin-env-secret |
| 11 | data: |
| 12 | # sbaadmin |
| 13 | SBA_USERNAME: c2JhYWRtaW4= |
| 14 | # sbanimda |
| 15 | SBA_PASSWORD: c2JhbmltZGE= |
| 16 | |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 17 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
| 21 | namespace: base |
| 22 | name: spring-boot-admin-svc |
| 23 | labels: |
| 24 | app: spring-boot-admin |
| 25 | needMonitor: 'true' |
| 26 | spec: |
| 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.ao | eefd060 | 2020-10-20 14:09:08 +0800 | [diff] [blame] | 38 | |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 39 | --- |
| 40 | apiVersion: apps/v1 |
| 41 | kind: Deployment |
| 42 | metadata: |
| 43 | namespace: base |
| 44 | name: spring-boot-admin |
| 45 | spec: |
| 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: |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 66 | - secretRef: |
| 67 | name: spring-boot-admin-env-secret |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 68 | resources: |
| 69 | requests: |
bao.ao | eefd060 | 2020-10-20 14:09:08 +0800 | [diff] [blame] | 70 | cpu: 200m |
| 71 | memory: "256Mi" |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 72 | limits: |
bao.ao | eefd060 | 2020-10-20 14:09:08 +0800 | [diff] [blame] | 73 | cpu: 1000m |
| 74 | memory: "256Mi" |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 75 | 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 | |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 86 | --- |
| 87 | apiVersion: extensions/v1beta1 |
| 88 | kind: Ingress |
| 89 | metadata: |
| 90 | name: sba-ingress |
| 91 | namespace: base |
| 92 | spec: |
| 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 |