K8s相关配置-----configmap
作者:互联网
apiVersion: v1
kind: ConfigMap
metadata:
name: medical-equipment-data-hub-config-view
namespace: test
labels:
app: medical-equipment-data-hub-config-view
data:
default.conf: |
server {
listen 8080;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
location /api/users {
proxy_pass http://10.160.149.33:8003/usermanager_api/api/users;
}
location /api/equipments {
proxy_pass http://medical-equipment-data-hub-service-management:8081;
}
location /api/monitor {
proxy_pass http://medical-equipment-data-hub-service-monitor:8082;
}
location /api/usage {
proxy_pass http://medical-equipment-data-hub-service-usage:8083;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: medical-equipment-data-hub-config-management
namespace: test
labels:
app: medical-equipment-data-hub-config-management
data:
application.yml: |
server:
port: 8081
spring:
datasource:
postgre:
jdbc-url: jdbc:postgresql://10.160.149.33:8002/equipment_management
driver-class-name: org.postgresql.Driver
username: devuser02
password: 4UrFJdWFBE5DyB3YgaT79XwYmZMMxGkd
clickhouse:
jdbc-url: jdbc:clickhouse://10.160.149.33:8001/um_equipment_metrics_ck_db
driver-class-name: com.clickhouse.jdbc.ClickHouseDriver
username: device_db_user
password: RQGujAj4Pu
druid:
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 20000
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: db-admin
login-password: admin#1321
filter:
stat:
slow-sql-millis: 3000
mybatis:
mapper-locations: classpath*:mapper/*.xml
configuration:
map-underscore-to-camel-case: true
umcare:
equipment-management:
permission-control:
enabled: true
host: http://10.160.149.33:8003/usermanager_api
---
apiVersion: v1
kind: ConfigMap
metadata:
name: medical-equipment-data-hub-config-monitor
namespace: test
labels:
app: medical-equipment-data-hub-config-monitor
data:
application.yml: |
server:
port: 8082
spring:
datasource:
postgre:
jdbc-url: jdbc:postgresql://10.160.149.33:8002/equipment_management
driver-class-name: org.postgresql.Driver
username: username
password: password
clickhouse:
jdbc-url: jdbc:clickhouse://10.160.149.33:8001/um_equipment_metrics_ck_db
driver-class-name: com.clickhouse.jdbc.ClickHouseDriver
username: username
password: password
druid:
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 20000
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: db-admin
login-password: admin#1321
filter:
stat:
slow-sql-millis: 3000
mybatis:
mapper-locations: classpath*:mapper/*/*.xml
configuration:
map-underscore-to-camel-case: true
umcare:
equipment-management:
permission-control:
enabled: true
host: http://10.160.149.33:8003/usermanager_api
---
apiVersion: v1
kind: ConfigMap
metadata:
name: medical-equipment-data-hub-config-usage
namespace: test
labels:
app: medical-equipment-data-hub-config-usage
data:
application.yml: |
server:
port: 8083
spring:
datasource:
postgre:
jdbc-url: jdbc:postgresql://10.160.149.33:8002/equipment_management
driver-class-name: org.postgresql.Driver
username: username
password: password
clickhouse:
jdbc-url: jdbc:clickhouse://10.160.149.33:8001/um_equipment_metrics_ck_db
driver-class-name: com.clickhouse.jdbc.ClickHouseDriver
username: username
password: password
druid:
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 20000
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
filters: stat
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: db-admin
login-password: admin#1321
filter:
stat:
slow-sql-millis: 3000
mybatis:
mapper-locations: classpath*:mapper/*/*.xml
configuration:
map-underscore-to-camel-case: true
umcare:
equipment-management:
permission-control:
enabled: true
host: http://10.160.149.33:8003/usermanager_api
标签:username,configmap,password,jdbc,name,equipment,-----,K8s,true 来源: https://www.cnblogs.com/wangdayea/p/16359962.html