-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for local machine ID #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
started the review.
Some comments/questions:
- Should we remove the api related stuff from internal/config/locald.go?
- Should we remove the grpc/go-sdk model conversions?
- Should we detect operator version and error out on old operator appropriately (since local is beta)?
Not sure, I understand what you mean by that, can you expand?
Do you mean across the whole CLI? (what would look like a massive change to me).
I think that's a good idea. |
I renamed these funcs:
in |
Sorry, it was too vague. Was thinking that with the removal of sandbox apply from sandbox manager, we would probably not need the api key nor initialise APIConfig inside of anything in wdyt? |
@scott-cotton, I implemented this:
In PR #92 |
Oh, I see! It's done now. |
Got it, yes, looks like a good idea. |
@scott-cotton, this is done now, in eaf51d8 |
@@ -43,6 +43,8 @@ func newSBController(log *slog.Logger, sandbox *tunapiv1.WatchLocalSandboxesResp | |||
} | |||
// run the controller | |||
go ctrl.run() | |||
// trigger a reconcile | |||
ctrl.triggerReconcile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this in ctrl.run()
so it is more self-contained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed this in #94
select { | ||
case <-revtun.rtToClose: | ||
default: | ||
ctrl.log.Debug("sandbox controller closing revtun", "local", xwName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that, in order for the select to protect against double closures, we would need to put the call to ctrl.log.Debug
after the close()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed this in #94
sbMon.stop() | ||
} | ||
sbw.sbMu.Unlock() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was hard to understand, maybe some comments would help:
- the grpcserver has called graceful stop, so no new sandboxes will be processed during a call to this function
- the delFn is called at the end of the sb monitor run, so the wg will wait for all monitors to stop running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed this in #94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, left some minor suggestions in second review round.
* Implementation of sandboxes watcher status * PR feeback * Include machine id to local status
* Add support for old operators (< 0.14.1) * Addition of operatorInfoUpdater * Minor fix * Bug fix * Point libconnect to main * Point github.com/signadot/go-sdk to main version * PR feedback
This is in the context of issue https://github.com/signadot/signadot/issues/3837.
Runs on top of the following PRs: https://github.com/signadot/signadot/pull/3857, https://github.com/signadot/libconnect/pull/38, signadot/go-sdk#36