Add customizable container labels (#146)

This commit is contained in:
Cubxity
2022-10-17 01:17:27 +02:00
committed by GitHub
parent 058f643e65
commit 5a760a0dcc
7 changed files with 28 additions and 8 deletions

View File

@@ -46,6 +46,9 @@ type Configuration struct {
// server process.
EnvVars environment.Variables `json:"environment"`
// Labels is a map of container labels that should be applied to the running server process.
Labels map[string]string `json:"labels"`
Allocations environment.Allocations `json:"allocations"`
Build environment.Limits `json:"build"`
CrashDetectionEnabled bool `json:"crash_detection_enabled"`

View File

@@ -205,6 +205,7 @@ func (m *Manager) InitServer(data remote.ServerConfigurationResponse) (*Server,
Mounts: s.Mounts(),
Allocations: s.cfg.Allocations,
Limits: s.cfg.Build,
Labels: s.cfg.Labels,
}
envCfg := environment.NewConfiguration(settings, s.GetEnvironmentVariables())