vmware-tanzu / cluster-api-provider-bringyourownhost

Kubernetes Cluster API Provider BYOH for already-provisioned hosts running Linux.
Apache License 2.0
222 stars 71 forks source link

truncate files if append is disabled #882

Open bullet1337 opened 3 months ago

bullet1337 commented 3 months ago

What this PR does / why we need it:

Fixes cloud init write_files section when file already exists and append mode is disabled. Right now it only overwrites the first characters of an existing file, which may cause the file to become corrupted

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Additional information

Special notes for your reviewer

vmwclabot commented 3 months ago

@bullet1337, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

vmwclabot commented 3 months ago

@bullet1337, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot commented 2 months ago

@bullet1337, VMware has approved your signed contributor license agreement.