-
Notifications
You must be signed in to change notification settings - Fork 683
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
feat: support immutable secrets (#574) #1395
Conversation
b43fd72
to
71591eb
Compare
Hi maintainers, the pipeline was passing before rebasing. It is now complaining about the execution graph
|
hi @gavinkflam It was a temporal error in the service that we are using to verify the PR. Now, it is green. No worries at all. We will come back soon to do the review to your changes and thanks a lot for your contribution. Thanks Álvaro |
hi @gavinkflam First, thanks a lot for your contribution. Really awesome job. During the review, we have detected something that we have some concern. The scenario that we have concern is when you decide to update your Sealed Secrets without deleting it, just update it. For this scenario, the controller will update the secret and I think that you will see errors in the controller several times for the retries. Could you verify it, please? If yes, we need to handle properly this showing a clear error for the users. Moreover, it would be awesome to include a test with this scenario. Thanks a lot Álvaro |
* add spec.template.immutable field to the SealedSecrets CRD * enable controller to unseal immutable secrets * enable kubeseal to seal immutable secrets * add error handling for mutating an immutable secret Signed-off-by: Gavin Lam <[email protected]>
Thanks @alvneiayu for reviewing the changes. I have added the following and some tests.
|
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.
LGTM, and thanks a lot for your contribution @gavinkflam
Description of the change
This adds support to seal and unseal immutable secrets via
spec.template.immutable
. I have also updated a related integration test and did some additional manual testing.Additional manual testing details
Test 1: Use kubeseal to seal an immutable secret
Result: produced a SealedSecret with
spec.template.immutable: true
Test 2: Create a SealedSecret resource with
spec.template.immutable: true
Result: the secret is unsealed correctly
Benefits
Users can opt-in to create immutable secrets. The new field is optional and the default behavior is not changed.
The benefits of immutable secrets are discussed in the official Kubernetes documentation. https://kubernetes.io/docs/concepts/configuration/secret/#secret-immutable
Possible drawbacks
None.
Applicable issues
Additional information
Requires a release of both Sealed Secrets and the Helm chart