-
Notifications
You must be signed in to change notification settings - Fork 39
change drop-ins to drop_ins #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @koflanx. Thanks for your PR. I'm waiting for a kubermatic member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
See-Also: flatcar/Flatcar#1567 Signed-off-by: Kim Fehrs <[email protected]>
@@ -258,7 +258,7 @@ coreos: | |||
{{ $unit.Content | indent 6 }} | |||
{{- end }} | |||
{{ if $unit.Content }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koflanx Isn't this a bug as well?
Should be {{ if $unit.DropIns }}
instead of {{ if $unit.Content }}
imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kron4eg Maybe you can give your 2 cents about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's it definitely.
diff --git pkg/generator/generator.go pkg/generator/generator.go
index b158bcc..ac966fd 100644
--- pkg/generator/generator.go
+++ pkg/generator/generator.go
@@ -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 }}
+{{ with $unit.DropIns }}
drop_ins:
-{{- range $_, $dropIn := $unit.DropIns }}
+{{- range $_, $dropIn := . }}
- name: "{{ $dropIn.Name }}"
content: |
{{ $dropIn.Content | indent 10 }}
This is how it should look like (using go's {{ with }} template operator to avoid such bugs in the future).
Is there anything missing for this MR to be merged? |
@@ -258,7 +258,7 @@ coreos: | |||
{{ $unit.Content | indent 6 }} | |||
{{- end }} | |||
{{ if $unit.Content }} | |||
drop-ins: | |||
drop_ins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make a copy, for have both drop-ins:
and drop_ins:
. For backward compatibility 🤷♂️
What this PR does / why we need it:
CoreOS Cloud Init is not reading the drop-ins sections in cloud-config.yml since Flatcar 3975.2.0.
Which issue(s) this PR fixes:
Fixes flatcar/Flatcar#1567
What type of PR is this?
/kind bug
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: