-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add some in-depth documentation about the discovery handler registry Signed-off-by: Nicolas Belouin <[email protected]> * Remove mentions of crictl dependency New slot reconciliation system doesn't need crictl anymore, removing everything related to that Signed-off-by: Nicolas Belouin <[email protected]> * Apply suggestions from code review Signed-off-by: Kate Goldenring <[email protected]> Signed-off-by: Nicolas Belouin <[email protected]> Co-authored-by: Kate Goldenring <[email protected]> * Update patch version Signed-off-by: Nicolas Belouin <[email protected]> * Fix version.sh to account for CRD version not always first item in dict Signed-off-by: Nicolas Belouin <[email protected]> --------- Signed-off-by: Nicolas Belouin <[email protected]> Co-authored-by: Kate Goldenring <[email protected]>
- Loading branch information
1 parent
3050186
commit 7c8242a
Showing
27 changed files
with
116 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "agent" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"] | ||
edition = "2021" | ||
|
@@ -35,6 +35,7 @@ serde = "1.0.104" | |
serde_derive = "1.0.104" | ||
serde_json = "1.0.45" | ||
serde_yaml = { version = "0.8.11", optional = true } | ||
simple-mermaid = "0.1" # used for docs | ||
thiserror = "1.0.50" | ||
tokio = { version = "1.0", features = ["rt-multi-thread", "time", "fs", "macros", "net"] } | ||
tokio-stream = { version = "0.1", features = ["net", "sync"] } | ||
|
@@ -65,4 +66,4 @@ default = [] | |
onvif-feat = [ "akri-onvif"] | ||
opcua-feat = ["akri-opcua"] | ||
udev-feat = ["akri-udev"] | ||
agent-full = ["serde_yaml", "akri-debug-echo"] | ||
agent-full = ["serde_yaml", "akri-debug-echo"] |
14 changes: 14 additions & 0 deletions
14
agent/src/discovery_handler_manager/diagrams/dh_device.mmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sequenceDiagram | ||
Discovery Handler ->> DiscoveryHandlerRequest: send discovered devices | ||
DiscoveryHandlerRequest ->> DiscoveryHandlerRequest: Updates aggregated list of discovered devices | ||
DiscoveryHandlerRequest -) Device Manager: Notifies and updates list of discovered devices | ||
DiscoveryHandlerRequest -) Configuration Controller: Requests reconciliation of Configuration linked to Request | ||
note over Configuration Controller: The following is Configuration Controller behavior | ||
activate Configuration Controller | ||
Configuration Controller ->> Configuration Controller: Reconcile Configuration | ||
Configuration Controller ->> DiscoveryHandlerRegistry: get_request() | ||
DiscoveryHandlerRegistry ->> Configuration Controller: | ||
Configuration Controller ->> DiscoveryHandlerRequest: get_instances() | ||
DiscoveryHandlerRequest ->> Configuration Controller: Returns list of discovered devices as bare Instances | ||
Configuration Controller ->> Kubernetes API: Apply Instances | ||
deactivate Configuration Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
sequenceDiagram | ||
Configuration Controller -) DiscoveryHandlerRegistry: new_request() | ||
alt a Handler exists for the Request | ||
DiscoveryHandlerRegistry ->> DiscoveryHandlerRequest: Creates with filtered list of endpoints | ||
DiscoveryHandlerRegistry ->> DiscoveryHandlerRegistry: Add request to tracked request list | ||
loop over DiscoveryHandlerEndpoints with this name | ||
DiscoveryHandlerRequest ->>+ Kubernetes API: Solve discovery properties | ||
Kubernetes API ->>- DiscoveryHandlerRequest: | ||
DiscoveryHandlerRequest ->>+ Discovery Handler: query discovery handler | ||
loop | ||
Discovery Handler ->> DiscoveryHandlerRequest: send discovered devices | ||
note over DiscoveryHandlerRequest,DiscoveryHandlerRegistry: See other diagram for what happens here | ||
end | ||
deactivate Discovery Handler | ||
end | ||
else | ||
DiscoveryHandlerRegistry -x Configuration Controller: DiscoveryError::NoHandler | ||
end |
20 changes: 20 additions & 0 deletions
20
agent/src/discovery_handler_manager/diagrams/dh_registration.mmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sequenceDiagram | ||
Discovery Handler ->> Registration endpoint: Registers | ||
Registration endpoint->> DiscoveryHandlerRegistry: register_endpoint() | ||
DiscoveryHandlerRegistry ->> DiscoveryHandlerRegistry: Add endpoint to registered handlers list | ||
DiscoveryHandlerRegistry ->> DiscoveryHandlerRequest: notify all DiscoveryHandlerRequest | ||
alt Discovery Handler name is the same as in Request | ||
DiscoveryHandlerRequest ->>+ Kubernetes API: Solve discovery properties | ||
Kubernetes API ->>- DiscoveryHandlerRequest: | ||
DiscoveryHandlerRequest ->>+ Discovery Handler: query discovery handler | ||
loop | ||
Discovery Handler ->> DiscoveryHandlerRequest: send discovered devices | ||
note over DiscoveryHandlerRequest,DiscoveryHandlerRegistry: See other diagram for what happens here | ||
end | ||
deactivate Discovery Handler | ||
end | ||
break on Discovery Handler connection error | ||
Registration endpoint -x DiscoveryHandlerRegistry: close endpoint | ||
DiscoveryHandlerRegistry ->> DiscoveryHandlerRegistry: Remove endpoint from registered handlers list | ||
note over DiscoveryHandlerRequest,Discovery Handler: The DiscoveryHandlerRequest request will handle termination by itself | ||
end |
19 changes: 19 additions & 0 deletions
19
agent/src/discovery_handler_manager/discovery_handler_registry.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "controller" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["<[email protected]>", "<[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "debug-echo-discovery-handler" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "onvif-discovery-handler" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "opcua-discovery-handler" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "udev-discovery-handler" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "akri-debug-echo" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "akri-onvif" | ||
version = "0.13.1" | ||
version = "0.13.2" | ||
license = "Apache-2.0" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2021" | ||
|
Oops, something went wrong.