Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef Gabrielsson committed Mar 7, 2022
1 parent 62af9c9 commit 5315fcd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotyaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type Services struct {
StdinOpen bool `yaml:"stdin_open,omitempty"`
StopGracePeriod string `yaml:"stop_grace_period,omitempty"`
StopSignal string `yaml:"stop_signal,omitempty"`
StorageOpt ServicesStorageOpt `yaml:"storage_opt,omitempty"`
Sysctls interface{} `yaml:"sysctls,omitempty"`
Tmpfs interface{} `yaml:"tmpfs,omitempty"`
Tty bool `yaml:"tty,omitempty"`
Expand Down Expand Up @@ -111,6 +112,10 @@ type ServicesSecrets struct {
Mode int16 `yaml:"mode,omitempty"`
}

type ServicesStorageOpt struct {
Size string `yaml:"size,omitempty"`
}

type ServicesUlimits struct {
Core interface{} `yaml:"core,omitempty"`
Data interface{} `yaml:"data,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ func buildCommand(e *Yaml, l []EnvironmentVariable) Command {
arr = append(arr, "--stop-signal", v.StopSignal)
}

if v.StorageOpt.Size != "" {
arr = append(arr, "--storage-opt", "size="+v.StorageOpt.Size)
}

for _, r := range normalizeValue(v.Sysctls) {
p := transformPairs(r)
arr = append(arr, "--sysctl", p.Key+"="+p.Value)
Expand Down

0 comments on commit 5315fcd

Please sign in to comment.