fix: resolve CA cert symlinks for Kubernetes Secret mounts#12851
Open
fix: resolve CA cert symlinks for Kubernetes Secret mounts#12851
Conversation
When CA certificates are mounted from a Kubernetes Secret without subPath, the files are symlinked through a ..data/ subdirectory. ReadHostCustomCADir previously preserved these symlinks, but they break inside containers where the ..data/ directory doesn't exist. Now symlinks are resolved to their target file contents, so certs are installed as regular files regardless of the mount structure. Fixes #11069 Signed-off-by: Solomon Hykes <solomon@dagger.io>
5d22fcb to
d53c3bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
subPath), files are symlinked through a..data/subdirectory. These symlinks break inside containers where..data/doesn't exist.ReadHostCustomCADirnow resolves symlinks to their target file contents instead of preserving them, so certs work regardless of mount structure.Fixes #12739
Repro
Confirm the test fails against unfixed main:
Test plan
ReadHostCustomCADirwith K8s-style symlink structure