@@ -6,10 +6,17 @@ option go_package = "github.com/csi-addons/kubernetes-csi-addons/internal/proto"
66// NetworkFence holds the RPC method for allowing the communication between
77// the CSIAddons controller and the sidecar for fencing operations.
88service NetworkFence {
9- // FenceClusterNetwork RPC call to fence the cluster network.
10- rpc FenceClusterNetwork (NetworkFenceRequest ) returns (NetworkFenceResponse ) {}
11- // UnFenceClusterNetwork RPC call to un-fence the cluster network.
12- rpc UnFenceClusterNetwork (NetworkFenceRequest ) returns (NetworkFenceResponse ) {}
9+ // FenceClusterNetwork RPC call to fence the cluster network.
10+ rpc FenceClusterNetwork (NetworkFenceRequest )
11+ returns (NetworkFenceResponse ) {}
12+ // UnFenceClusterNetwork RPC call to un-fence the cluster network.
13+ rpc UnFenceClusterNetwork (NetworkFenceRequest )
14+ returns (NetworkFenceResponse ) {}
15+
16+ // GetFenceClients RPC calls to get the client information to use in a
17+ // FenceClusterNetwork or UnfenceClusterNetwork RPC.
18+ rpc GetFenceClients (FenceClientsRequest )
19+ returns (FenceClientsResponse ){}
1320}
1421
1522// NetworkFenceRequest holds the required information to fence/unfence
@@ -30,3 +37,30 @@ message NetworkFenceRequest {
3037message NetworkFenceResponse {
3138 // Intentionally empty.
3239}
40+
41+ // FenceClientsRequest contains the necessary information to identify
42+ // the clients that need fencing.
43+ message FenceClientsRequest {
44+ // Plugin-specific parameters passed in as opaque key-value pairs.
45+ map <string , string > parameters = 1 ;
46+ // Secrets required by the driver to complete the request.
47+ string secret_name = 2 ;
48+ string secret_namespace = 3 ;
49+ }
50+
51+ // FenceClientsResponse holds the information about clients that require
52+ // fencing.
53+ message FenceClientsResponse {
54+ // List of clients that need to be fenced.
55+ repeated ClientDetails clients = 1 ;
56+ }
57+
58+ // ClientDetails holds the information about the client that requires fencing.
59+ message ClientDetails {
60+ // id represents the unique identifier of the client.
61+ // Required field.
62+ string id = 1 ;
63+ // list of cidrs that represent the client's local cidrs.
64+ // Required field.
65+ repeated string cidrs = 2 ;
66+ }
0 commit comments