cbe4218128d970560ad9d27acef4303029290674
[institute/deploy-authx-service.git] /
1 # user-authorization-sa.yaml
2
3 ---
4 apiVersion: v1
5 kind: ConfigMap
6 metadata:
7   namespace: user-authorization-service
8   name: user-authorization-sa-env
9 data:
10   SERVER_PORT: "8080"
11   SSL_ENABLED: "false"
12   #SSL_KEYSTORE_FILE: file:/certs/server/server.keystore
13   #SSL_KEYSTORE_PASSWORD: ""
14   #SSL_TRUSTSTORE_FILE: file:/certs/server/server.truststore
15   #SSL_TRUSTSTORE_PASSWORD: ""
16
17   SERVER_MAXHTTPHEADERSIZE: "10240"
18
19
20   SPRING_DATASOURCE_DRUID_INITIAL_SIZE: "10"
21   SPRING_DATASOURCE_DRUID_MAX_ACTIVE: "20"
22   SPRING_DATASOURCE_DRUID_MIN_IDLE: "10"
23
24
25   # SBA_URL: http://spring-boot-admin-svc.base.svc.cluster.local:8080
26
27   # LOGGING_LEVEL_COM_SUPWISDOM_INSTITUTE_USER_AUTHORIZATION_SERVICE_SA_MANGRANTED: debug
28
29
30 ---
31 apiVersion: v1
32 kind: Service
33 metadata:
34   namespace: user-authorization-service
35   name: user-authorization-sa-svc
36   labels:
37     app: user-authorization-sa
38     needMonitor: 'true'
39 spec:
40   ports:
41     - port: 8080
42       targetPort: http
43       protocol: TCP
44       name: http
45     - port: 6060
46       targetPort: http-metrics
47       protocol: TCP
48       name: http-metrics
49   selector:
50     app: user-authorization-sa
51
52 ---
53 apiVersion: apps/v1
54 kind: Deployment
55 metadata:
56   namespace: user-authorization-service
57   name: user-authorization-sa
58 spec:
59   selector:
60     matchLabels:
61       app: user-authorization-sa
62   replicas: 1
63   template:
64     metadata:
65       labels:
66         app: user-authorization-sa
67     spec:
68       containers:
69       - name: user-authorization-sa
70         # 若使用了学校搭设的私有仓库,请修改
71         image: harbor.supwisdom.com/user-authorization-service/user-authorization-sa:1.0.0-SNAPSHOT
72         imagePullPolicy: Always
73         ports:
74         - containerPort: 8080
75           name: http
76         - containerPort: 6060
77           name: http-metrics
78         envFrom:
79         - secretRef:
80             name: datasource-env-secret
81         - configMapRef:
82             name: jvm-env
83         - configMapRef:
84             name: user-authorization-sa-env
85         resources:
86           requests:
87             memory: "1024Mi"
88           limits:
89             memory: "1024Mi"
90         readinessProbe:
91           httpGet:
92             path: /actuator/health
93             port: 8888
94           initialDelaySeconds: 20
95           periodSeconds: 5
96           timeoutSeconds: 5
97           successThreshold: 1
98           failureThreshold: 10
99       imagePullSecrets:
100         - name: harbor-registry
101