Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd
unit.
Expand Down Expand Up @@ -314,7 +314,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd
unit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd
unit.
Expand Down Expand Up @@ -417,7 +417,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd
unit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd unit.
properties:
Expand Down Expand Up @@ -387,7 +387,7 @@ spec:
description: Content is the unit's content.
type: string
dropIns:
description: DropIns is a list of drop-ins for this unit.
description: DropIns is a list of drop_ins for this unit.
items:
description: DropIn is a drop-in configuration for a systemd unit.
properties:
Expand Down
2 changes: 1 addition & 1 deletion pkg/crd/osm/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ type Unit struct {
Mask *bool `json:"mask,omitempty"`
// Content is the unit's content.
Content *string `json:"content,omitempty"`
// DropIns is a list of drop-ins for this unit.
// DropIns is a list of drop_ins for this unit.
DropIns []DropIn `json:"dropIns,omitempty"`
}

Expand Down
18 changes: 9 additions & 9 deletions pkg/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ coreos:
command: start
{{- end }}
mask: {{or $unit.Mask false}}
{{ if $unit.Content }}
{{ with $unit.Content }}
content: |
{{ $unit.Content | indent 6 }}
{{ . | indent 6 }}
{{- end }}
{{ if $unit.Content }}
drop-ins:
{{- range $_, $dropIn := $unit.DropIns }}
{{ with $unit.DropIns }}
drop_ins:
{{- range $_, $dropIn := . }}
- name: "{{ $dropIn.Name }}"
content: |
{{ $dropIn.Content | indent 10 }}
Expand Down Expand Up @@ -341,13 +341,13 @@ systemd:
- name: {{ $unit.Name }}
enabled: {{or $unit.Enable false}}
mask: {{or $unit.Mask false}}
{{ if $unit.Content }}
{{ with $unit.Content }}
contents: |
{{ $unit.Content | indent 6 }}
{{ . | indent 6 }}
{{- end }}
{{ if $unit.Content }}
{{ with $unit.DropIns }}
dropins:
{{- range $_, $dropIn := $unit.DropIns }}
{{- range $_, $dropIn := . }}
- name: {{ $dropIn.Name }}
contents: |
{{ $dropIn.Content | indent 10 }}
Expand Down