-
Notifications
You must be signed in to change notification settings - Fork 273
Gcs sidecar framework #2422
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
Gcs sidecar framework #2422
Conversation
973753d to
588627a
Compare
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 did a quick first pass review, will take another closer look.
a1d186f to
a800f04
Compare
a800f04 to
a2da501
Compare
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.
Other than the minor changes/nits in my latest review, it looks good to me.
a2da501 to
3b7df1c
Compare
Addressed them in the latest push. Thanks for reviewing! :) |
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 is a blocker.
internal/gcs-sidecar/bridge.go
Outdated
| } | ||
| sidecarErrChan <- recverr | ||
| }() | ||
| // Send response to hcsshim |
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 know that this is work in progress and Mahati is addressing it somewhat, but not all messages to the inbox GCS will directly result in a message to the host.
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.
Could you elaborate on what you mean by "all messages to inbox GCs will not directly result in a message to the host" ?
Send response to hcsshim is a goroutine which waits on a channel. Please refer to handlers.go.
- Used when there is a premature response like policy enforcement not allowing a request or ResourceTypeWCOWBlockCims for example. OR,
- We got a response from inbox GCS and need to forward response to hcsshim:

This go routine does not mean every request coming to the gcs-sidecar needs to have a response. Not sure what the concern is or if I am missing smth.
cc @MahatiC what is it you are addressing?
3b7df1c to
3f07f1e
Compare
3f07f1e to
36c0d2b
Compare
- Move common bridge protocol definitions to subpackage under internal/gcs - Move helper functions to internal/bridgeutils pkg so that they can be used by gcs-sidecar as well Signed-off-by: Kirtana Ashok <[email protected]>
36c0d2b to
e64ed40
Compare
This commit makes the high level changes needed for gcs-sidecar - Starts sidecar as service - Dereferences the various valid rpc requests - Adds code to invoke refs formatter Note: This commit does not add invokers to the code for new ResourceTypes like SecurityPolicy, CWCOWBlockCIMs, Container scratch formatting etc. This will come in along with functional tests in later PRs. There are some TODO comments in the code which will be addressed in upcoming PRs as well. To make this initialization of the gcs-sidecar flow complete, certain high level code for the policy enforcement have been brought into this commit from Mahati's changes. Example: internal/gcs-sidecar/policy.go, internal/gcs-sidecar/host.go and helper functions in internal/gcs-sidecar/host.go. Hence adding her as co-author in this commit. The rest of the policy framework code will be brought in by Mahati as follow up PRs. Co-authored-by: <[email protected]> Signed-off-by: Kirtana Ashok <[email protected]>
e64ed40 to
c3dcf03
Compare
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.
lgtm
This commit makes the high level changes needed for gcs-sidecar
Note: This commit does not add invokers to the code for new
ResourceTypes like SecurityPolicy, CWCOWBlockCIMs,
Container scratch formatting etc. This will come in along
with functional tests in later PRs.
There are some TODO comments in the code which will be
addressed in upcoming PRs as well.
To make this initialization of the gcs-sidecar flow complete,
certain high level code for the policy enforcement have been
brought into this commit from @MahatiC 's changes.
Example: internal/gcs-sidecar/policy.go, internal/gcs-sidecar/host.go
and helper functions in internal/gcs-sidecar/host.go.
Hence adding her as co-author in this commit.
The rest of the policy framework code will be brought in by @MahatiC
as follow up PRs.
Commit 1: Rearranges some bridge code to make them reusable for gcs-sidecar framework as well
Commit 2: This is a cherry pick of Amit's PR here : #2421 . Will rebase this PR once his PR is merged.
Commit 3: This is the main commit that brings in changes for gcs-sidecar + minimal changes from policy framework in order to make the initialization flow complete. Rest of the policy enforcement changes will be brought in by @MahatiC