Skip to content

Conversation

@dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented Apr 16, 2023

Adds support for the "diff" type proxy plugin. This allows for out of process diff plugins to be used using the existing proxy plugin framework. The contrib addition makes it easier to implement such plugins, similar to the snapshotservice in contrib.

Moves the client proxy out of the client package to a package under diff, similar to our other client proxies.

A simple example is at https://gist.github.com/dmcgowan/93a19e4183493b46c5bf8cc3d5be9e59

Since we already have support for multiple differs (similar to how we have support for multiple snapshotters), configuring is easy. Just add the proxy plugin and update the diff service to use it (add it before walking to try the proxy first).

...

  [plugins."io.containerd.service.v1.diff-service"]
    default = ["proxydiff", "walking"]

...

[proxy_plugins]

  [proxy_plugins."proxydiff"]
    type = "diff"
    address = "/tmp/proxy.sock"

Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
@fuweid
Copy link
Member

fuweid commented Apr 16, 2023

cc @wllenyj

@dcantah dcantah self-requested a review April 17, 2023 21:13

// NewDiffApplier returns a new comparer and applier which communicates
// over a GRPC connection.
func NewDiffApplier(client diffapi.DiffClient) interface{} {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boring go nit: Given we list 1.19 in our go.mod, should we use any for all interface{} uses from now on?

Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work locally with a dummy test, LGTM

Copy link
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxpv mxpv merged commit cc3f4f4 into containerd:main Apr 18, 2023
@dmcgowan dmcgowan added the cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch label May 10, 2023
@dmcgowan dmcgowan added cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Aug 18, 2023
@dmcgowan dmcgowan deleted the add-proxy-differ branch April 20, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants