-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: feat: node agent api implementation #70
Open
EstebanBAR0N
wants to merge
21
commits into
dev-sys-do:main
Choose a base branch
from
do4-2022:node-agent-api-implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Draft: feat: node agent api implementation #70
EstebanBAR0N
wants to merge
21
commits into
dev-sys-do:main
from
do4-2022:node-agent-api-implementation
Conversation
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
Signed-off-by: iverly <[email protected]>
Signed-off-by: iverly <[email protected]>
Signed-off-by: iverly <[email protected]>
Signed-off-by: Nils Ponsard <[email protected]>
Some devs were annoyed about this. Signed-off-by: Nils Ponsard <[email protected]>
Signed-off-by: Nils Ponsard <[email protected]>
Signed-off-by: Nils Ponsard <[email protected]>
We need to re-use the service into namespace & instance. To avoid code repetition, the filter service has been made generic Changes have also been made in workload to use the service without it being linked to workload Signed-off-by: Maxime <[email protected]>
Signed-off-by: Maxime <[email protected]>
Signed-off-by: WoodenMaiden <[email protected]>
Signed-off-by: WoodenMaiden <[email protected]>
Signed-off-by: Nils Ponsard <[email protected]>
Limit resource usage of container. CPU and memory can be limited but this is not possible for disk usage yet. Signed-off-by: Alexis Langlet <[email protected]>
Namespace service implements all the logic to manage Namespace. Workload service implements EtcdService which is the interface to interact with etcd. Things to know : - Namespace service require etcd address when initialized - Etcd save in key => value format. The key is the word "namespace" concatenated with the namespace name Signed-off-by: Maxime <[email protected]>
Add routes and routes handler for namespace. Controller use namespace service. - /namespace/ (GET) : Get all namespace - /namespace (PUT) : Create a new namespace - /namespace/<namespace_name>/<workload_id> (DELETE) : Delete a namespace - /namespace/<namespace_name>/<workload_id> (GET) : Get a namespace by name - /namespace/<namespace_name>/<workload_id> (PATCH) : Update a namespace Things to know - function `services` is called by the server to get all the routes it needs to handle. It associates routes with middleware functions - pagination is used on this route : /namespace offset : start from the element <offset> limit : retrieve a maximum of <limit> elements - When using pagination in get all route , query argument are optional but if they are used it is necessary to specify the two arguments (limit and offset). It is not possible to specify a single argument on both . Signed-off-by: Maxime <[email protected]>
Now namespace service is created , we add it to workload service to check if namespace exist when managing workloads. Signed-off-by: Maxime <[email protected]>
Update workload creation in order to save network settings Update container in order to connect to specific bridge and use specified ip Signed-off-by: Alexis Langlet <[email protected]>
Run tests in ci as root in order to test network related things Signed-off-by: Alexis Langlet <[email protected]>
You can find the implementation of the node agent grpc client. The role of the client is to connect, register and finally send node status to the scheduler. Moreover, a configuration has been implemented with confy for grpc client (and server, available in the next commit). Signed-off-by: esteban <[email protected]>
a2c937f
to
270c313
Compare
In this commit, you can find the implementation of the node agent grpc server. This server handle scheduler request by using the workload_manager library (node agent internal crate). Signed-off-by: esteban <[email protected]>
270c313
to
2229e61
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pull request you will find the implementation of the node agent API.
The main function is separated in two parts, the grpc client and the grpc server.
The grpc client connect, register and send node status (resources) to the scheduler.
And the grpc server, implement node agent proto services to handle request from the scheduler.
The grpc server use workload_manager (node agent internal crate) functions.