This feature allows you to control the order in which services are started on the node, ensuring that dependent services are brought online in the correct sequence.
Strict dependency
To enforce a strict dependency between services, use priority values 3 and 4.
- Services in a lower-priority bucket will only start after all services in the higher-priority bucket have started. For example, services in priority bucket 4 will begin only after all services in priority bucket 3 are running.
Soft dependency
For soft dependencies between services, use priority values 5 and 6.
- Services in a lower-priority bucket will start after waiting for a preset timeout period. For example, services in priority bucket 6 will start after a 15-second timeout, allowing services in priority bucket 5 to start first.
No dependency
Use priority value 7 to specify a service priority that has no dependencies on any other service.
- A service with priority 7 can start in any order, regardless of the status of services in priority buckets 3 through 6.
Create a service priority
To set a custom service priority, assign the label io_iotium_pod_priority with a value between 3 and 7.
Example:
{
"name": "svcName",
"labels": {
"io_iotium_pod_priority":"7"
},
"services": [{
"image": {
"name": "iotium/svcImage",
"version": "latest"
},
"docker": {
"environment_vars": {
"TIMEOUT": "1",
}
}
}]
}