This PR adds the new Kompose site! Go preview it at https://kompose.io Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2.6 KiB
| layout | permalink | title | redirect_from | ||
|---|---|---|---|---|---|
| default | /development/ | Development |
|
Development Guide
Building Kompose
Read about building kompose here.
Workflow
Fork the main repository
- Go to https://github.com/kubernetes/kompose
- Click the "Fork" button (at the top right)
Clone your fork
The commands below require that you have $GOPATH. We highly recommended you put Kompose' code into your $GOPATH.
git clone https://github.com/$YOUR_GITHUB_USERNAME/kompose.git $GOPATH/src/github.com/kubernetes/kompose
cd $GOPATH/src/github.com/kubernetes/kompose
git remote add upstream 'https://github.com/kubernetes/kompose'
Create a branch and make changes
git checkout -b myfeature
# Make your code changes
Keeping your development fork in sync
git fetch upstream
git rebase upstream/master
Note: If you have write access to the main repository at github.com/kubernetes/kompose, you should modify your git configuration so that you can't accidentally push to upstream:
git remote set-url --push upstream no_push
Committing changes to your fork
git commit
git push -f origin myfeature
Creating a pull request
- Visit https://github.com/$YOUR_GITHUB_USERNAME/kompose.git
- Click the "Compare and pull request" button next to your "myfeature" branch.
- Check out the pull request process for more details
Go Modules and dependency management
Kompose uses Go Modules to manage dependencies.
If you want to make changes to dependencies please make sure that go.mod and go.sum are updated properly.
Updating Kubernetes and OpenShift
Kubernetes version depends on what version is OpenShift using.
OpenShift is using forked Kubernetes to carry some patches.
Currently it is not possible to use different Kubernetes version from version that OpenShift uses.
(for more see comments in go.mod)
Adding CLI tests
Kompose CLI tests run kompose convert with docker-compose files, and cross-check the k8s and OpenShift artifacts generated with the template files.
To generate CLI tests, please run make gen-cmd.
CI
For Kompose, we use numerous CI's:
- TravisCI: Unit and CLI tests
- SemaphoreCI: Integration / cluster tests
- Fabric8CI: Secondary integration tests / future cluster tests