Skip to content
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

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

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

alemorcuq
Copy link
Collaborator

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

Copy link
Contributor

github-actions bot commented Sep 4, 2024

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.

@github-actions github-actions bot added the Stale label Sep 4, 2024
@alemorcuq
Copy link
Collaborator Author

Not stale

@github-actions github-actions bot removed the Stale label Sep 8, 2024
Copy link
Member

@agarcia-oss agarcia-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@agarcia-oss agarcia-oss added enhancement backlog Issues/PRs that will be included in the project roadmap labels Sep 10, 2024
Signed-off-by: Alejandro Moreno <[email protected]>
@alemorcuq
Copy link
Collaborator Author

alemorcuq commented Sep 29, 2024

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

Test case added, @agarcia-oss.

@agarcia-oss
Copy link
Member

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

Test case added, @agarcia-oss.

Thanks! Looks good, @alemorcuq

@agarcia-oss agarcia-oss merged commit c532fcf into bitnami-labs:main Oct 4, 2024
15 checks passed
@alemorcuq alemorcuq deleted the error-no-secret branch October 4, 2024 08:20
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 19, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [bitnami-labs/sealed-secrets](https://github.com/bitnami-labs/sealed-secrets) | patch | `v0.27.1` -> `v0.27.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>bitnami-labs/sealed-secrets (bitnami-labs/sealed-secrets)</summary>

### [`v0.27.2`](https://github.com/bitnami-labs/sealed-secrets/blob/HEAD/RELEASE-NOTES.md#v0272)

[Compare Source](bitnami-labs/sealed-secrets@v0.27.1...v0.27.2)

-   feature: Show error if there's no secret to encode ([#&#8203;1580](bitnami-labs/sealed-secrets#1580))
-   feature: allow container port configuration ([#&#8203;1606](bitnami-labs/sealed-secrets#1606))
-   chore: Update go version to 1.22.8 ([#&#8203;1621](bitnami-labs/sealed-secrets#1621))
-   chore: Update the TCSP settings for helm testing ([#&#8203;1608](bitnami-labs/sealed-secrets#1608))
-   chore: Redirect external site to the GitHub Repository ([#&#8203;1589](bitnami-labs/sealed-secrets#1589))
-   chore: Update dependencies (Several automatic MRs)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues/PRs that will be included in the project roadmap enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubeseal is creating an empty file kubeseal with Secret input from -f fails silently
2 participants