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

fix: the decimal value of the default mount mode for TLS secrets #8627

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

leon-inf
Copy link
Contributor

close #8626

@leon-inf leon-inf added this to the Release 1.0.0 milestone Dec 12, 2024
@leon-inf leon-inf requested review from Y-Rookie and a team as code owners December 12, 2024 09:15
@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines. label Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.79%. Comparing base (2f60dc9) to head (1606d6e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8627      +/-   ##
==========================================
+ Coverage   60.49%   60.79%   +0.30%     
==========================================
  Files         378      378              
  Lines       45623    45757     +134     
==========================================
+ Hits        27598    27817     +219     
+ Misses      15441    15338     -103     
- Partials     2584     2602      +18     
Flag Coverage Δ
unittests 60.79% <ø> (+0.30%) ⬆️

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.

@@ -223,7 +223,7 @@ func (t *componentTLSTransformer) composeTLSVolume(
if compDef.Spec.TLS.DefaultMode != nil {
volume.VolumeSource.Secret.DefaultMode = ptr.To(*compDef.Spec.TLS.DefaultMode)
} else {
volume.VolumeSource.Secret.DefaultMode = ptr.To(int32(0600))
volume.VolumeSource.Secret.DefaultMode = ptr.To(int32(384))
Copy link
Contributor

Choose a reason for hiding this comment

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

image

What's the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. The issue is that the default value set by Kubebuilder is treated as decimal 600 by default.

Copy link
Contributor

Choose a reason for hiding this comment

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

Keep this line unchanged for readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@leon-inf leon-inf force-pushed the bugfix/tls-secret-default-mount-mode branch from 759f1e9 to 2242ae1 Compare December 13, 2024 03:29
@github-actions github-actions bot added size/S Denotes a PR that changes 10-29 lines. and removed size/XS Denotes a PR that changes 0-9 lines. labels Dec 13, 2024
@leon-inf leon-inf force-pushed the bugfix/tls-secret-default-mount-mode branch from 2242ae1 to 1606d6e Compare December 13, 2024 04:08
@apecloud-bot apecloud-bot added the approved PR Approved Test label Dec 13, 2024
@leon-inf leon-inf merged commit 4e6c466 into main Dec 13, 2024
37 checks passed
@leon-inf
Copy link
Contributor Author

/cherry-pick release-1.0-beta

@apecloud-bot
Copy link
Collaborator

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks/actions/runs/12310642140

apecloud-bot pushed a commit that referenced this pull request Dec 13, 2024
@leon-inf leon-inf deleted the bugfix/tls-secret-default-mount-mode branch December 16, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] when TLS is enabled, secrets mounted with defaultMode 600, failed to created POD.
4 participants