Skip to content

Commit ac00c7b

Browse files
authored
Merge pull request containerd#10731 from henry118/proxy
[release/1.7] Allow proxy plugins to have capabilities
2 parents cbd4e04 + 9507403 commit ac00c7b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

services/server/config/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ type CgroupConfig struct {
170170

171171
// ProxyPlugin provides a proxy plugin configuration
172172
type ProxyPlugin struct {
173-
Type string `toml:"type"`
174-
Address string `toml:"address"`
175-
Platform string `toml:"platform"`
176-
Exports map[string]string `toml:"exports"`
173+
Type string `toml:"type"`
174+
Address string `toml:"address"`
175+
Platform string `toml:"platform"`
176+
Exports map[string]string `toml:"exports"`
177+
Capabilities []string `toml:"capabilities"`
177178
}
178179

179180
// Decode unmarshals a plugin specific configuration by plugin id

services/server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ func LoadPlugins(ctx context.Context, config *srvconfig.Config) ([]*plugin.Regis
510510
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
511511
ic.Meta.Exports = exports
512512
ic.Meta.Platforms = append(ic.Meta.Platforms, p)
513+
ic.Meta.Capabilities = pp.Capabilities
513514
conn, err := clients.getClient(address)
514515
if err != nil {
515516
return nil, err

0 commit comments

Comments
 (0)