Conversation
Signed-off-by: YangKeao <keao.yang@yahoo.com>
|
|
||
| type Selector interface { | ||
| Validate(selector RawSelector) field.ErrorList | ||
| Default(root map[string]interface{}, selector RawSelector) RawSelector |
There was a problem hiding this comment.
What is root map[string]interface{}?
There was a problem hiding this comment.
The root is the whole object. For example, setting default value for the pid selector namespaces need the namespace of root🤦♂️
|
|
||
| 1. Call related selectors to list all selected resources. | ||
| 2. Call scope limitation to randomly choose some of them. | ||
| 3. Iterate through the selected resources and call the implementation. |
There was a problem hiding this comment.
- Iterate through the selected resources and call the implementation.
Maybe we could do that in parallel.
|
|
||
| Besides the network communication, chaos-mesh should also provide a way to | ||
| communicate through local unix socket, to avoid uneccessary network overhead. | ||
| For example, the plugin can be registered with a path: |
There was a problem hiding this comment.
What does this for? I think it is impossible for an external plugin to using unix domain socket: I imagine that the external plugin runs as one pod that you do not know which node will be scheduled on, if the pod of "external plugin" and the pod "controller-manager" run on different node, there is no way to use unix domain socket.
There was a problem hiding this comment.
Yes. I plan to setup some "official plugin" like pod selector to use unix socket. They use the same SDK with others (but run in the same binary or container or pod with the controller).
The users can also add extra container and volume for the controller to deploy the selector plugin, for performance.
Signed-off-by: YangKeao <keao.yang@yahoo.com>
| ... | ||
| ``` | ||
|
|
||
| And then, the controller could establish a `grpc` connection to the service and |
There was a problem hiding this comment.
what is the service used for?
There was a problem hiding this comment.
Implement service for every selector type?
There was a problem hiding this comment.
Yes. The users should setup a service for it. Just like the webhook in Kubernetes. We need to setup a service for controller-manager, and create a WebhookConfiguration points to the service.
Signed-off-by: YangKeao keao.yang@yahoo.com