First log into your GitHub account and create a fork of the Lighthouse repository. Then clone your forked repository locally and switch to the lighthouse folder. You will need to create a branch in order to raise a PR.
git clone https://github.com/<your-github-username>/lighthouse.git cd lighthouse git checkout -b <BRANCH-NAME>
The Lighthouse Agent code is located under the
pkg/agent directory. The
Controller is the main component that performs bi-directional
ServiceImport objects. After making code changes, please refer to building
and testing to build and verify your changes.
make e2e will create a 3-cluster deployment which you can use to manually verify changes if necessary.
The Lighthouse Agent will be deployed in the
submariner-operator namespace in each cluster. You can use
kubectl commands to check the
pod’s logs and status.
The Lighthouse plugin code is located under the
plugin/lighthouse directory and uses the structure as required by a standard CoreDNS
plugin. The plugin answers DNS requests by using the ServiceImport resources populated by the Lighthouse Agent. After making code changes,
please refer to building and
testing to build and verify your changes.
Similar to the agent, you can use the deployment created using
make e2e to manually test and verify as well. The Lighthouse plugin will be
running as a part of the CoreDNS in the
kube-system namespace and the CoreDNS config map will be changed to use it. The usual
commands can be used here as well. You can add the debug entry in the CoreDNS config map if you require more logging.
You can commit your changes using
git commit and push the changes to your fork branch. Then you will see an option to create a PR in the
GitHub UI in your browser when you go to your forked repository.
git commit -s #Give a commit message git push -f origin HEAD:<Your-Branch-Name>
Creating a PR will trigger CI to verify the changes.