You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.4 KiB
82 lines
2.4 KiB
2 weeks ago
|
apiVersion: apps/v1 #指定API版本标签
|
||
|
kind: Deployment #定义资源的类型/角色,deployment为控制器,service,endpoints
|
||
|
metadata: #定义资源的元数据信息
|
||
|
name: goupload-deployment #定义资源的名称,在同一个namespace空间中必须是唯一的
|
||
|
namespace: lk #默认default
|
||
|
labels: #定义资源标签
|
||
|
app: yaml-goupload-d
|
||
|
spec:
|
||
|
replicas: 1 #定义副本数量
|
||
|
selector: #定义选择器
|
||
|
matchLabels: #匹配上边的标签
|
||
|
app: yaml-goupload-d #名称
|
||
|
template: #定义模板
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: yaml-goupload-d
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: yaml-goupload #容器名,与标签名要相同
|
||
|
image: registry.ngaiot.com/local/git-goupload-image:12
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
volumeMounts:
|
||
|
- name: config
|
||
|
subPath: config.json
|
||
|
mountPath: /app/configFiles/config_魏家滑坡_视觉位移.json
|
||
|
volumes: # volumes和container处于同一层级,别搞错了
|
||
|
- name: config
|
||
|
configMap:
|
||
|
name: config-goupload
|
||
|
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: config-goupload
|
||
|
namespace: lk
|
||
|
data: #监测因素 统计字段表
|
||
|
config.json: |
|
||
|
{
|
||
|
"consumer": "consumerWJHP",
|
||
|
"ioConfig": {
|
||
|
"inMqtt": {
|
||
|
"host": "218.3.126.49",
|
||
|
"port": 1883,
|
||
|
"userName": "wjhp-sjwy-upload",
|
||
|
"password": "123456",
|
||
|
"clientId": "wjhp-sjwy-upload",
|
||
|
"Topics": [
|
||
|
"/fs-flexometer/admin123"
|
||
|
]
|
||
|
},
|
||
|
"outHttp": {
|
||
|
"url": "http://111.74.0.226:10010/api/devices/datapoints?type=2",
|
||
|
"method": "post"
|
||
|
}
|
||
|
},
|
||
|
"sensors": {
|
||
|
"sjwySensorInfo": {
|
||
|
"admin123-1": {
|
||
|
"name": "WJHP-SJWY01",
|
||
|
"stationId": 20263956,
|
||
|
"appKey": "72e6ait21ux9o853",
|
||
|
"monitorType": "L1_GP_1"
|
||
|
},
|
||
|
"admin123-2": {
|
||
|
"name": "WJHP-SJWY02",
|
||
|
"stationId": 38324713,
|
||
|
"appKey": "yk351ar0rfv59dw7",
|
||
|
"monitorType": "L1_GP_1"
|
||
|
},
|
||
|
"admin123-3": {
|
||
|
"name": "WJHP-SJWY03",
|
||
|
"stationId": 89889930,
|
||
|
"appKey": "gkstwl07e66e403l",
|
||
|
"monitorType": "L1_GP_1"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|