Comments (6)
I was looking into this issue and I was a little bit confused by the names. My suggestion of a possible UX is:
renamePath:
- origin: resources/crds-v1/ # all files under resources/crds-v1/ will be flattened, removing all the folder structure
flatten: true
- origin: resources/crds-v1alpha1/ # Move all files and folders from resources/crds-v1alpha1 to the "root" directory
destination: /
- origin: resources/operator
destination: resources # To relocate everything under resources folder (rename folder)
- origin: resources/operator/example.yaml
destination: resources/my-example.yaml # rename file
I feel like giving a little bit more structure to the configuration, at least to me, helped better understand what each option was. What do yll think?
from vendir.
It would maybe make sense to add a relocation/fail strategy. An example would be:
- path: vendor/k8s
contents:
- path: eduk8s
git:
url: https://github.com/eduk8s/eduk8s
ref: 20.08.04.1
includePaths:
- resources/crds-v1/**/*
- resources/crds-v1alpha1/**/*
- resources/operator/**/*
relocatePath: # Apply this relocation rules in order, fail if one don't succeed
- resources/crds-v1/**/*=/**/* # To strip path
- resources/crds-v1alpha1/=/ # To strip path (as it ends with / is a dir. Fail if a file)
- resources/operator/**/*=resources/**/* # To relocate everything under resources folder (rename folder)
- resources/operator/example.yaml=resources/my-example.yaml # rename file
from vendir.
one of the reasons why its is like that at this moment is because its not clear what should happen when there are conflicts between file names, directory name vs file name, etc. any suggestions?
from vendir.
We can definitely see how this need is really valid!
For further discussion, what aspects of directory shaping fit within vendir's responsibilities?
How much of that is intrinsic to vendoring in software?
from vendir.
https://github.com/k14s/vendir/releases/tag/v0.11.0 includes newRootPath configuration that changes "root" directory for the source.
from vendir.
Example (and discussion) demonstrating why this could be helpful: https://kubernetes.slack.com/archives/CH8KCCKA5/p1625843954329600?thread_ts=1625811418.324700&cid=CH8KCCKA5
from vendir.
Related Issues (20)
- Function tryTarWithGzip (carvel-vendir/pkg/vendir/fetch/archive.go) loses link/symlink/mode/UID/GID/etc. in extracting .tar and .tar.gz files HOT 2
- Support s3:// protocol HOT 3
- Publish `v0.30.0` through the Carvel Homebrew tap HOT 2
- :bird: Please tweet about v0.31.0 release :pray: HOT 3
- clearer error message if path for githubrelease archive does not exist
- `vendir` should retain directory permissions HOT 14
- Vendir is failing to sync a dir if the previous sync has `disableUnpack: true` HOT 1
- Project contains AGPL code, which sets off license scanners HOT 4
- Vendir fails with a misterious error HOT 7
- Authenticate to git provider using single sigin-on HOT 3
- Error parsing empty yaml documents HOT 1
- Support for unpacking .xz archives HOT 3
- helm chart vendoring should also allow for vendoring dependencies HOT 1
- vendir doesn't load correct keychains when provided with the environment variables
- support for Gitlab Releases as source
- Sync fails when providing the same secret more than once
- vendir support for "dot" paths without conflict HOT 2
- Add post sync ability to rename files HOT 1
- Feature request: add option for skipping SSL verification when using Git HOT 3
- v0.34.0 - Running `vendir sync` fetches outdated repo when pointed at tag HOT 22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vendir.