Overwrite (only) desired properties of module through layered deployment
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 473
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 7
Description
Question: Is it possible to only overwrite desired properties of a custom module without specifying the module (image name, createOptions, etc.) within the `$edgeAgent` block?
Info:
- iotedge version: 1.2.0
Our current deployment setup is that we have a basic deployment (priority 0) that contains basic settings for edgeAgent and edgeHub:
```json
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {},
"runtime": {
"settings": {
"minDockerVersion": "v1.25"
},
"type": "docker"
},
"schemaVersion": "1.0",
"systemModules": {
"edgeAgent": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.2.0",
"createOptions": "{\"ExposedPorts\":{\"9600/tcp\":{}},\"HostConfig\":{\"Binds\":[\"/srv/edgeAgent:/storage\"],\"PortBindings\":{\"9600/tcp\":[{\"HostPort\":\"8082\"}]}}}"
},
"type": "docker",
"env": {
"UpstreamProtocol": {
"value": "AmqpWs"
},
"storageFolder": {
"value": "/storage"
},
"SendRuntimeQualityTelemetry": {
"value": "false"
},
"RuntimeLogLevel": {
"value": "verbose"
}
}
},
"edgeHub": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.2.0",
"createOptions": "{\"ExposedPorts\":{\"9600/tcp\":{}},\"HostConfig\":{\"Binds\":[\"/srv/edgeHub:/storage\"],\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"9600/tcp\":[{\"HostPort\":\"8081\"}]}}}"
},
"type": "docker",
"env": {
"UpstreamProtocol": {
"value": "AmqpWs"
},
"storageFolder": {
"value": "/storage"
}
},
"status": "running",
"restartPolicy": "always"
}
}
}
},
"$edgeHub": {
"properties.desired": {
"routes": {
"baseline-metrics": "FROM /messages/modules/baseline-metrics/* INTO $upstream"
},
"schemaVersion": "1.0",
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
}
}
```
Additionally we have a use-case specific layered deployment (priority 10):
```json
{
"content": {
"modulesContent": {
"$edgeAgent": {
"properties.desired.modules.module-A": {
"settings": {
"image": "",
"createOptions": ""
},
"type": "docker",
"status": "running",
"restartPolicy": "always",
"version": "1.0"
},
"properties.desired.modules.module-B": {
"settings": {
"image": "",
"createOptions": ""
},
"type": "docker",
"status": "running",
"restartPolicy": "always",
"version": "1.0"
},
"properties.desired.modules.module-C": {
"settings": {
"image": "",
"createOptions": ""
},
"type": "docker",
"status": "running",
"restartPolicy": "always",
"version": "1.0"
}
},
"module-A": {
"properties.desired": {
"my-property": "my-value"
}
}
}
}
}
```
For specific use cases we want to overwrite the desired property `my-property` of `module-A` in a separate layered deployment (priority 100) **without** specifying the module (image name etc.) within the `$edgeAgent` block, similar to:
```json
{
"content": {
"modulesContent": {
"$edgeAgent": {},
"module-A": {
"properties.desired": {
"my-property": "use-another-value"
}
}
}
}
}
```
Can you please tell me if this is possible or how the deployment configuration has to be specified.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.