Skip to content

Conversation

@dereknola
Copy link
Member

@dereknola dereknola commented Dec 19, 2025

Proposed Changes

Types of Changes

  • Allows k3s secrets-encrypt enable on clusters that do no have --secrets-encryption. Places an encryption config with the identity provider. Users can then enable actual encryption by rotating the keys via k3s secrets-encrypt rotate-keys
  • Expands secrets-encryption test to cover this new case

Verification

  1. Start k3s servers with no SE
  2. check k3s secrets-encrypt status, should be disabled
  3. Run k3s secrets-encrypt enable on a single server
  4. Restart k3s servers with --secrets-encryption
  5. check k3s secrets-encrypt status, still disabled, but with the stage: start
  6. Run k3s secrets-encrypt rotate-keys on a single server
  7. Restart all k3s servers
  8. check k3s secrets-encrypt status, should be enabled with aescbc

Testing

Covered

Linked Issues

#7195

User-Facing Change


Further Comments

Need to expand docs with a guide on how to do this.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.35%. Comparing base (e44a77d) to head (c6bdb6d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/secretsencrypt/config.go 0.00% 21 Missing ⚠️
pkg/cli/secretsencrypt/secrets_encrypt.go 0.00% 12 Missing ⚠️
pkg/server/handlers/secrets-encrypt.go 0.00% 11 Missing ⚠️
pkg/daemons/control/deps/deps.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13370      +/-   ##
==========================================
- Coverage   21.46%   21.35%   -0.11%     
==========================================
  Files         188      188              
  Lines       15370    15403      +33     
==========================================
- Hits         3299     3290       -9     
- Misses      11622    11666      +44     
+ Partials      449      447       -2     
Flag Coverage Δ
unittests 21.35% <0.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereknola dereknola force-pushed the dynamic_secrets branch 2 times, most recently from 2e573d6 to 411be46 Compare December 19, 2025 19:45
Signed-off-by: Derek Nola <derek.nola@suse.com>
- Places an identity provider as a setup to enable later encryption
- Update secrets-encryption test
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola marked this pull request as ready for review December 19, 2025 21:30
@dereknola dereknola requested a review from a team as a code owner December 19, 2025 21:30
@dereknola dereknola changed the title Enable secret encryption on prexisting clusters Enable secret encryption on existing clusters Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants