2018-09-04 22:12:44 -04:00
|
|
|
package config
|
|
|
|
|
|
|
|
import "github.com/docker/docker/api/types/filters"
|
|
|
|
|
|
|
|
// BuilderGCRule represents a GC rule for buildkit cache
|
|
|
|
type BuilderGCRule struct {
|
|
|
|
All bool `json:",omitempty"`
|
|
|
|
Filter filters.Args `json:",omitempty"`
|
|
|
|
KeepStorage string `json:",omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuilderGCConfig contains GC config for a buildkit builder
|
|
|
|
type BuilderGCConfig struct {
|
|
|
|
Enabled bool `json:",omitempty"`
|
|
|
|
Policy []BuilderGCRule `json:",omitempty"`
|
|
|
|
DefaultKeepStorage string `json:",omitempty"`
|
|
|
|
}
|
|
|
|
|
2019-04-26 02:04:34 -04:00
|
|
|
// BuilderEntitlements contains settings to enable/disable entitlements
|
|
|
|
type BuilderEntitlements struct {
|
|
|
|
NetworkHost *bool `json:"network-host,omitempty"`
|
|
|
|
SecurityInsecure *bool `json:"security-insecure,omitempty"`
|
|
|
|
}
|
|
|
|
|
2018-09-04 22:12:44 -04:00
|
|
|
// BuilderConfig contains config for the builder
|
|
|
|
type BuilderConfig struct {
|
2019-04-26 02:04:34 -04:00
|
|
|
GC BuilderGCConfig `json:",omitempty"`
|
|
|
|
Entitlements BuilderEntitlements `json:",omitempty"`
|
2018-09-04 22:12:44 -04:00
|
|
|
}
|