Skip to content

Commit e8733f8

Browse files
committed
chore: switch from drop-ins to drop_ins, fix: templating of DropIns
Signed-off-by: Adrian Berger <[email protected]>
1 parent e0f71f6 commit e8733f8

5 files changed

+16
-16
lines changed

deploy/crd/operatingsystemmanager.k8c.io_operatingsystemconfigs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ spec:
136136
description: Content is the unit's content.
137137
type: string
138138
dropIns:
139-
description: DropIns is a list of drop-ins for this unit.
139+
description: DropIns is a list of drop_ins for this unit.
140140
items:
141141
description: DropIn is a drop-in configuration for a systemd
142142
unit.
@@ -314,7 +314,7 @@ spec:
314314
description: Content is the unit's content.
315315
type: string
316316
dropIns:
317-
description: DropIns is a list of drop-ins for this unit.
317+
description: DropIns is a list of drop_ins for this unit.
318318
items:
319319
description: DropIn is a drop-in configuration for a systemd
320320
unit.

deploy/crd/operatingsystemmanager.k8c.io_operatingsystemprofiles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ spec:
208208
description: Content is the unit's content.
209209
type: string
210210
dropIns:
211-
description: DropIns is a list of drop-ins for this unit.
211+
description: DropIns is a list of drop_ins for this unit.
212212
items:
213213
description: DropIn is a drop-in configuration for a systemd
214214
unit.
@@ -417,7 +417,7 @@ spec:
417417
description: Content is the unit's content.
418418
type: string
419419
dropIns:
420-
description: DropIns is a list of drop-ins for this unit.
420+
description: DropIns is a list of drop_ins for this unit.
421421
items:
422422
description: DropIn is a drop-in configuration for a systemd
423423
unit.

hack/kkp/operatingsystemmanager.k8c.io_customoperatingsystemprofiles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ spec:
201201
description: Content is the unit's content.
202202
type: string
203203
dropIns:
204-
description: DropIns is a list of drop-ins for this unit.
204+
description: DropIns is a list of drop_ins for this unit.
205205
items:
206206
description: DropIn is a drop-in configuration for a systemd unit.
207207
properties:
@@ -387,7 +387,7 @@ spec:
387387
description: Content is the unit's content.
388388
type: string
389389
dropIns:
390-
description: DropIns is a list of drop-ins for this unit.
390+
description: DropIns is a list of drop_ins for this unit.
391391
items:
392392
description: DropIn is a drop-in configuration for a systemd unit.
393393
properties:

pkg/crd/osm/v1alpha1/common_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type Unit struct {
9696
Mask *bool `json:"mask,omitempty"`
9797
// Content is the unit's content.
9898
Content *string `json:"content,omitempty"`
99-
// DropIns is a list of drop-ins for this unit.
99+
// DropIns is a list of drop_ins for this unit.
100100
DropIns []DropIn `json:"dropIns,omitempty"`
101101
}
102102

pkg/generator/generator.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ coreos:
253253
command: start
254254
{{- end }}
255255
mask: {{or $unit.Mask false}}
256-
{{ if $unit.Content }}
256+
{{ with $unit.Content }}
257257
content: |
258-
{{ $unit.Content | indent 6 }}
258+
{{ . | indent 6 }}
259259
{{- end }}
260-
{{ if $unit.Content }}
261-
drop-ins:
262-
{{- range $_, $dropIn := $unit.DropIns }}
260+
{{ with $unit.DropIns }}
261+
drop_ins:
262+
{{- range $_, $dropIn := . }}
263263
- name: "{{ $dropIn.Name }}"
264264
content: |
265265
{{ $dropIn.Content | indent 10 }}
@@ -341,13 +341,13 @@ systemd:
341341
- name: {{ $unit.Name }}
342342
enabled: {{or $unit.Enable false}}
343343
mask: {{or $unit.Mask false}}
344-
{{ if $unit.Content }}
344+
{{ with $unit.Content }}
345345
contents: |
346-
{{ $unit.Content | indent 6 }}
346+
{{ . | indent 6 }}
347347
{{- end }}
348-
{{ if $unit.Content }}
348+
{{ with $unit.DropIns }}
349349
dropins:
350-
{{- range $_, $dropIn := $unit.DropIns }}
350+
{{- range $_, $dropIn := . }}
351351
- name: {{ $dropIn.Name }}
352352
contents: |
353353
{{ $dropIn.Content | indent 10 }}

0 commit comments

Comments
 (0)