Refactor container k8s to use plugin resource management. - #2097
Merged
Conversation
- Closes apple#2096. - Storing resources in a macOS resource bundle won't work for unix-layout plugins. - Rework the kindnet resource fetch to create a plugin loader, find the plugin based on the plugin executable path, and use the plugin's resourceURL to locate the resource. - Add a findPlugin function to locate the plugin that contains a pathname. - Fix help text to insure example runs regardless of the default registry configuration.
JaewonHur
approved these changes
Aug 7, 2026
| return nil | ||
| } | ||
|
|
||
| private static func resolveSymlinks(_ path: String) -> String? { |
Contributor
There was a problem hiding this comment.
Can't we use resolvingSymlinks defined in FilePath+Symlink.swift?
Though we need to add dependency on ContainerPersistence for that.
Contributor
Author
There was a problem hiding this comment.
100% the right idea.
We can live with this bit of non-DRY code for now.
How we're going to tackle this tech debt is to coalesce the different FilePath helpers we have to https://github.com/apple/containerization/blob/main/Sources/ContainerizationOS/FilePathOps.swift.
Then we address stuff like this as we migrate the parts of container that haven't yet been migrated from String/URL paths to FilePath.
JaewonHur
approved these changes
Aug 7, 2026
Code Coverage
|
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.
container k8sresource load doesn't work from installation package. #2096.Type of Change
Motivation and Context
Needed to fix released version of k8s plugin.
Testing