It has 2 steps to move a pkg from other Kubernetes repos to k8s.io/utils
repo:
k8s.io/utils
repovendor/
in the repos that refer this pkgk8s.io/utils
repoCopying should preserve all the git history associated with it. Here is a working approach. Note: You may need to use --allow-unrelated-histories
if you get error when running git pull
following the post above.
Then, you may need to restructure the package to make sure it has the following structure.
. ├── doc.go # Description for this package ├── <utilname1>.go # utility go file ├── <utilname>_test.go # go unit tests └── testing # All the testing framework └── fake_<utilname>.go # Testing framework go file
#5 is an example for this step.
You should update the import paths. Then follow this doc to update vendor/
and Godeps/
.
You may want to run make bazel-test
to make sure all new references work.
kubernetes/kubernetes#49234 is an example for this step.