Skip to content

Instantly share code, notes, and snippets.

@aojea
Created June 15, 2022 11:24
Show Gist options
  • Select an option

  • Save aojea/0d9e244fc4dd950414ec99416fc0d12f to your computer and use it in GitHub Desktop.

Select an option

Save aojea/0d9e244fc4dd950414ec99416fc0d12f to your computer and use it in GitHub Desktop.
sequenceDiagram
actor Client
participant KCP
participant Broker
participant ICE
Note over Broker,ICE: part of KCP
actor PCluster
Note over PCluster: Register PCluster on KCP
par PCluster registration
PCluster ->>+KCP: Register
KCP -->>+Broker: Register
Broker -->>-KCP: Ok
KCP ->>-PCluster: Ok
end
Note over Broker: the PCluster can be conntacted via the broker
Note over Client: Register Client on KCP
par Client registration
Client ->>+KCP: Register
KCP -->>+Broker: Register
Broker -->>-KCP: Ok
KCP ->>-Client: Ok
end
note over Client: kubect get logs pcluster
Client -->>Broker: connect to PCluster X (ICE offer)
Broker -->>PCluster: you have an offer to connect
PCluster -->> PCluster: process offer
PCluster -->> Broker: answer to the offer received
Broker -->> Client: answer to your offer
Note over ICE: Start connection process
Client ->>ICE: get NAT Traversal info
PCluster ->> ICE: get NAT Traversal info
alt is direct connection
Client ->> PCluster: connect
PCluster ->> Client : connect
else is relayed connection:
Client ->> ICE: connect
ICE ->> PCluster: relay
PCluster ->> ICE: relay
ICE ->> Client: connect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment