aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/generate.go43
-rw-r--r--pkg/domain/infra/tunnel/generate.go3
2 files changed, 17 insertions, 29 deletions
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go
index f18e79b47..314996497 100644
--- a/pkg/domain/entities/generate.go
+++ b/pkg/domain/entities/generate.go
@@ -4,34 +4,21 @@ import "io"
// GenerateSystemdOptions control the generation of systemd unit files.
type GenerateSystemdOptions struct {
- // Name - use container/pod name instead of its ID.
- Name bool
- // New - create a new container instead of starting a new one.
- New bool
- // RestartPolicy - systemd restart policy.
- RestartPolicy *string
- // RestartSec - systemd service restartsec. Configures the time to sleep before restarting a service.
- RestartSec *uint
- // StartTimeout - time when starting the container.
- StartTimeout *uint
- // StopTimeout - time when stopping the container.
- StopTimeout *uint
- // ContainerPrefix - systemd unit name prefix for containers
- ContainerPrefix string
- // PodPrefix - systemd unit name prefix for pods
- PodPrefix string
- // Separator - systemd unit name separator between name/id and prefix
- Separator string
- // NoHeader - skip header generation
- NoHeader bool
- // TemplateUnitFile - make use of %i and %I to differentiate between the different instances of the unit
- TemplateUnitFile bool
- // Wants - systemd wants list for the container or pods
- Wants []string
- // After - systemd after list for the container or pods
- After []string
- // Requires - systemd requires list for the container or pods
- Requires []string
+ Name bool
+ New bool
+ RestartPolicy *string
+ RestartSec *uint
+ StartTimeout *uint
+ StopTimeout *uint
+ ContainerPrefix string
+ PodPrefix string
+ Separator string
+ NoHeader bool
+ TemplateUnitFile bool
+ Wants []string
+ After []string
+ Requires []string
+ AdditionalEnvVariables []string
}
// GenerateSystemdReport
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index ed63d363a..d3c3638cb 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -19,7 +19,8 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
WithSeparator(opts.Separator).
WithWants(opts.Wants).
WithAfter(opts.After).
- WithRequires(opts.Requires)
+ WithRequires(opts.Requires).
+ WithAdditionalEnvVariables(opts.AdditionalEnvVariables)
if opts.StartTimeout != nil {
options.WithStartTimeout(*opts.StartTimeout)