summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-15 16:30:38 +0100
committerGitHub <noreply@github.com>2021-11-15 16:30:38 +0100
commite9d8ca22b8ea5923d6188225cd2d2254bdc4d898 (patch)
treedbb04a3758c48fbaf3289d624e3fe84518133206 /pkg/bindings
parentd40736fef1c0cbfc57ed39678bf95c016a13b512 (diff)
parent73e1cdfe9e41a8748b75b9461c087e4cee5d2183 (diff)
downloadpodman-e9d8ca22b8ea5923d6188225cd2d2254bdc4d898.tar.gz
podman-e9d8ca22b8ea5923d6188225cd2d2254bdc4d898.tar.bz2
podman-e9d8ca22b8ea5923d6188225cd2d2254bdc4d898.zip
Merge pull request #11076 from boaz0/closes_10275
Support template unit files in podman generate systemd
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/generate/types.go2
-rw-r--r--pkg/bindings/generate/types_systemd_options.go15
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/bindings/generate/types.go b/pkg/bindings/generate/types.go
index 3c9ea87d4..6f2594604 100644
--- a/pkg/bindings/generate/types.go
+++ b/pkg/bindings/generate/types.go
@@ -16,6 +16,8 @@ type SystemdOptions struct {
New *bool
// NoHeader - Removes autogenerated by Podman and timestamp if set to true
NoHeader *bool
+ // TemplateUnitFile - Create a template unit file that uses the identity specifiers
+ TemplateUnitFile *bool
// RestartPolicy - systemd restart policy.
RestartPolicy *string
// StopTimeout - time when stopping the container.
diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index 7a778a52b..b26aa7fc2 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -62,6 +62,21 @@ func (o *SystemdOptions) GetNoHeader() bool {
return *o.NoHeader
}
+// WithTemplateUnitFile set field TemplateUnitFile to given value
+func (o *SystemdOptions) WithTemplateUnitFile(value bool) *SystemdOptions {
+ o.TemplateUnitFile = &value
+ return o
+}
+
+// GetTemplateUnitFile returns value of field TemplateUnitFile
+func (o *SystemdOptions) GetTemplateUnitFile() bool {
+ if o.TemplateUnitFile == nil {
+ var z bool
+ return z
+ }
+ return *o.TemplateUnitFile
+}
+
// WithRestartPolicy set field RestartPolicy to given value
func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions {
o.RestartPolicy = &value