bitnami-labs / sealed-secrets

A Kubernetes controller and tool for one-way encrypted Secrets
Apache License 2.0
7.72k stars 685 forks source link

Show error if there's no secret to encode #1580

Closed alemorcuq closed 1 month ago

alemorcuq commented 3 months ago

Description of the change Kubeseal will throw an error when trying to seal no secrets. This will happen when the file is empty or invalid, and the error suggests the user to check the file encoding as this seems to be a common issue especially in some versions of Windows #1410 #1560

Benefits Give feedback to the user to help debugging a common issue

Possible drawbacks Kubeseal will now throw an error where it previously just silently succeeded with no output

Applicable issues

github-actions[bot] commented 2 months ago

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

alemorcuq commented 2 months ago

Not stale

alemorcuq commented 1 month ago

A test case covering this particular corner case will be much appreciated here, thanks!

Test case added, @agarcia-oss.

agarcia-oss commented 1 month ago

A test case covering this particular corner case will be much appreciated here, thanks!

Test case added, @agarcia-oss.

Thanks! Looks good, @alemorcuq