Skip to content

Commit 8f4a282

Browse files
author
Maksym Pavlenko
authored
Merge pull request containerd#10337 from Kern--/proxy-capabilities
Allow proxy plugins to have capabilities
2 parents 4d48204 + 5b8dfbd commit 8f4a282

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cmd/containerd/server/config/config.go

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

235235
// ProxyPlugin provides a proxy plugin configuration
236236
type ProxyPlugin struct {
237-
Type string `toml:"type"`
238-
Address string `toml:"address"`
239-
Platform string `toml:"platform"`
240-
Exports map[string]string `toml:"exports"`
237+
Type string `toml:"type"`
238+
Address string `toml:"address"`
239+
Platform string `toml:"platform"`
240+
Exports map[string]string `toml:"exports"`
241+
Capabilities []string `toml:"capabilities"`
241242
}
242243

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

cmd/containerd/server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ func LoadPlugins(ctx context.Context, config *srvconfig.Config) ([]plugin.Regist
542542
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
543543
ic.Meta.Exports = exports
544544
ic.Meta.Platforms = append(ic.Meta.Platforms, p)
545+
ic.Meta.Capabilities = pp.Capabilities
545546
conn, err := clients.getClient(address)
546547
if err != nil {
547548
return nil, err

0 commit comments

Comments
 (0)