Skip to content

Commit

Permalink
Merge pull request containerd#10731 from henry118/proxy
Browse files Browse the repository at this point in the history
[release/1.7] Allow proxy plugins to have capabilities
  • Loading branch information
estesp authored Oct 7, 2024
2 parents cbd4e04 + 9507403 commit ac00c7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions services/server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ type CgroupConfig struct {

// ProxyPlugin provides a proxy plugin configuration
type ProxyPlugin struct {
Type string `toml:"type"`
Address string `toml:"address"`
Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"`
Type string `toml:"type"`
Address string `toml:"address"`
Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"`
Capabilities []string `toml:"capabilities"`
}

// Decode unmarshals a plugin specific configuration by plugin id
Expand Down
1 change: 1 addition & 0 deletions services/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ func LoadPlugins(ctx context.Context, config *srvconfig.Config) ([]*plugin.Regis
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
ic.Meta.Exports = exports
ic.Meta.Platforms = append(ic.Meta.Platforms, p)
ic.Meta.Capabilities = pp.Capabilities
conn, err := clients.getClient(address)
if err != nil {
return nil, err
Expand Down

0 comments on commit ac00c7b

Please sign in to comment.