Gateway SUP integration - #180
Conversation
|
@julienduquesnay-se - I won't be able to review this until next week. |
|
@julienduquesnay-se - would you mind updating your branch? It's showing changes related to the helm PR as changes in your branch |
@phil-abb, I was trying to merge the latest changes from the "pre-draft" branch, and it looks like it grabbed your latest commit. I might need help to clean that up. |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
I rebased via the GitHub PR UI, and it looks ok now. |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Co-authored-by: Philip Presson <philip.presson@us.abb.com> Signed-off-by: Julien Duquesnay <156128585+julienduquesnay-se@users.noreply.github.com>
matlec
left a comment
There was a problem hiding this comment.
This PR implements an approved SUP, so I'm not asking to block or restructure it here. However, I'd like to flag a broader question this PR surfaces that's worth picking up separately.
This is a bigger thread, and it ties into a comment I left on the "Device roles to capabilities" SUP. Working through this gateway PR, I keep bumping into the same question:
When the WFM sends a deployment, what is it targeting?
Today the implicit answer is "a WFM client". Routing happens via clientId in the URL, and the ApplicationDeployment YAML stays target-agnostic. This PR shifts that implicit answer by putting deviceId inside the ApplicationDeployment YAML's metadata. That works neatly for the see-thru gateway case, but it doesn't generalize. Multi-node Kubernetes clusters are the clearest example: kube-scheduler picks where pods run, so the WFM really has no business addressing nodes directly.
That points at something deeper. Standalone Device, Standalone Cluster, and Gateway look like three different things in the spec - but to me they read as the same shape, and the only real difference between them is: how many deployment targets the WFM client speaks for. A Standalone Device speaks for one. A Standalone Cluster speaks for one (the cluster as a whole, single-node or multi-node). A Gateway speaks for several. The PR introduces Gateway as a new category to handle the "several" case; I'd suggest framing it instead as extending the existing pattern to support more than one deployment target per client.
The most concrete future case this opens up is the DFM/WFM split for multi-node clusters. For a multi-node cluster, devices (the nodes) aren't really a WFM concern - the WFM just needs to know there's a deployment target (the cluster) and what it can run. Node-level identity, vendor, lifecycle - that's all DFM territory (post-GA). The PR currently surfaces device identity through WFM artifacts: deviceId in deployment metadata, the capabilities endpoint keyed on deviceId, the Gateway role naming child devices. When the DFM lands and we want to add device-level visibility, we'd ideally do that without having to pull device identity through every WFM interaction. One framing that would help: separate "what the WFM addresses" from "what counts as a device." The WFM-side concept becomes a "deployment target," orthogonal to whatever the DFM tracks. The WFM addresses targets; the DFM (when it arrives) tracks devices; the two surfaces stay independent.
Sketch of the alternative framing
- WFM Client = protocol participant. Has
clientId, X.509 identity. Speaks for one or more deployment targets. - Deployment target = an execution surface the WFM can address. Has a
targetIdunique per client. Has its own capabilities document. - Target capabilities are scoped to deployment concerns: supported runtimes, deployment types, resources. Device-shaped fields (
vendor,modelNumber,serialNumber) move to the DFM; they describe what the device is, not what it can host. - What "resources" means depends on what schedules at this target. A standalone device or a gateway-managed sub-device reports concrete hardware (camera, GPU, ...) because Margo schedules at that level. For a cluster target, it probably makes less sense to report hardware at the cluster-level. In the cluster case, kube-scheduler can handle node-specific / hardware-aware placement via the chart's own affinity rules. Margo doesn't need to know which cluster node has the camera - that's Kubenetes' job.
- Target identity inherits from the client. No separate certs; the client is the trust boundary.
- Deployment routing =
(clientId, targetId)pair.clientIdstays where it is today.targetIdlives in the bundle manifest's in a deployment entry - not in theApplicationDeploymentYAML, which stays target-agnostic. One bundle manifest carries routing for all of a client's deployments; a multi-target client fetches once rather than per target. - Delegation ("autonomous placement") = a client-level capability flag, orthogonal to target count. To request delegation for a deployment, the WFM omits
targetIdfrom the bundle manifest entry; the client picks among its eligible targets. Single-target clients trivially satisfy this. A multi-target client that hasn't reported delegation capability must receive an explicittargetId. - No hierarchy in
targetId. Flat IDs unique per client. "Parent/child" is the client's internal concern, not protocol-visible.
How this covers the cases
| Case | clientId | Targets (WFM) | Devices (DFM, post-GA) |
|---|---|---|---|
| Standalone Device | 1 | 1 (the device) | 1 (the device) |
| Standalone Cluster | 1 | 1 (the cluster) | 1 (the node) |
| Multi-node cluster (when it arrives) | 1 | 1 (the cluster) | N (one per node) |
| See-thru gateway | 1 | N+1 or N (gw + children) | 1 (just the gateway) |
| Opaque gateway | 1 | 1 (the gateway) | 1 (just the gateway) |
Clusters don't need special-casing - a cluster is just "1 target." Gateways become "clients with >1 targets." The opaque/see-thru distinction collapses into "how many targets do you expose."
If there's interest, I'm happy to draft this as a SUP (post-PlugFest 2 ;)).
Review CommentsDevice ID
Device Capabilities
Deployment Status
Desired State
|
…ributes description Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
In light of changes that have been discussed as part of the identity and authorization framework, I think it makes sense to move away from using "deviceId" in this way. Previously, we really didn't have any real meaning behind "deviceId" other than some random ID in the device capabilities magically assigned by the device supplier. No "device ID" is starting to mean something more specific than this, so I think by using device ID here, it's just going to require us to change it later. May as well just change it now as part of the original PR since we know it will need to change., |
@phil-abb @ajcraig @matlec |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Fair comment. I guess the question is, at what point do changes made while updating the specification with the information from an approved SUP start to matter? For this case, I view it as just changing a word. The SUP used the word "foo," but after thinking about it, "bar" seemed better. It doesn't fundamentally change the behavior that was approved in the SUP. For example, if this change isn't made with this PR, I wouldn't expect a new SUP to be created just to change "deviceId" to "targetName" because it's not changing any behaviors. Maybe a topic we can discuss in the next TWG call to see what people think about how much change is acceptable when updating the spec for a SUP? |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Fair response indeed @julienduquesnay-se. I'm leaning towards approving this SUP without the change, and then I can drive the word change in a PR directly to spec without a full SUP. Since, as Phil mentioned, it is just a word change. However, it would be "burried" inside the "Gateway SUP", which didn't propose a change to the original But we are learning these proccesses on the fly, so @phil-abb thoughts on my strategy above to address this particular FB to Julien? |
@julienduquesnay-se / @ajcraig / @matlec I don't have too strong an opinion on whether we do it now or later; it just seems like doing it now as part of the original change means people don't have to make changes later after things have been implemented. If we want to keep it how it is for now and revisit it later after we know the results of the identity and authentication framework vote, then that is fine as well. Even if that SUP is rejected, I think we'll want to reconsider how we are using ID/Device ID because our use right now seems too generic. |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
… gateway requriements Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Device ID
Device Capabilities
Deployment Status
Desired State
|
|
❌ @julienduquesnay-se the
📝 What should I do to fix it?All proposed commits should include a sign-off in their messages, ideally at the end. ❔ Why it is requiredThe Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:
Contributors sign-off that they adhere to these requirements by adding a Git even has a |
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
247037f to
48efd5c
Compare
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
…ot required) Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Signed-off-by: Julien Duquesnay <156128585+julienduquesnay-se@users.noreply.github.com>
…in application deployment example Signed-off-by: Manjinder <manjinder.b.singh@capgemini.com>
…d remove ENV. prefix historically, `ENV.` prefix in the parameters was misunderstood as having a special meaning, so advised to be removed from examples. Signed-off-by: Manjinder <manjinder.b.singh@capgemini.com>
… meaning interpretation Signed-off-by: Manjinder <manjinder.b.singh@capgemini.com>
Signed-off-by: Julien Duquesnay <julien.duquesnay@se.com>
Description
Specification update related to the Gateway SUP. Add support of gateway service.
Issues Addressed
#137
Change Type
Please select the relevant options:
Checklist