-
Notifications
You must be signed in to change notification settings - Fork 451
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
conformance: allow reading BaseManifests from non-embedded local filesystem #1180
Comments
I can't see a reason not to support the local filesystem, subject to the usual input-validation checks to prevent directory traversal. |
Any thoughts on implementation UX? The most lightweight explicit config I can think of would be something like introducing another string prefix check (either
Adding an additional arg of some sort would be a bit more problematic, as this function isn't called directly by an implementer, just as a util to parse a config string, so may require something like switching the plain string config to a struct, typed strings with generics or an interface and reflection. Is there an example somewhere of the input-validation checks you're recommending @youngnick, and would those potentially prevent reading from |
I can't find any good examples in a quick scan, but even just doing the obvious stuff is an improvement (no more than one consecutive dot allowed in paths and setting a maximum path length to prevent overflows). Total path length varies depending on OS, but 4096 chars is reasonably common, and probably a good default. Filename length is 255 chars on most Unix-y OSes, so that will do there too. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
Update
getContentsFromPathOrURL
to support reading files from the local filesystem rather than only the embedded filesystem.Why this is needed:
We're currently working on switching our implementation of Gateway API conformance tests from a local git checkout to re-implementing conformance_test.go directly (in order to specify
SupportedFeatures
, which IIUC is a recommended pattern), but we're currently blocked due to our need to make some slight tweaks to the base manifests (lowering the number of replicas to work around resource constraints in CI and adding an annotation to all Deployments), which we have previously been doing with akustomize
patch.Specifying a string path for
BaseManifests
is currently supported as an option when initializing aConformanceTestSuite
struct, but unless the string is a remote path beginning withhttps://
, it is hardcoded to only read from the read-only embedded filesystem.I've managed to read the base manifests from the embedded filesystem, patch them with
krusty
and write them to a local temp file withkyaml/filesys
, but would need to add support for reading from the local filesystem to be able to use the patched manifests in this way - is this something we could consider supporting, or is there a different way I should be approaching this problem?The text was updated successfully, but these errors were encountered: