Submitting Changes
The following guidelines apply to submitting changes to K2s:
- Only commit changes when a corresponding issue exists and the maintainers have agreed that this issue is going to be realized (see K2s Issues)
- Reference the issue in commit messages, e.g. for a refactoring issue with ID 42, create a message like
#42 refactor(addons): obsolete code path removed
.
Info
This example also uses Conventional Commits, which is not mandatory, but recommended.
- Since K2s is open source, we utilize the GitHub's Pull Requests workflow:
- Fork this repository (applies to all non-maintainers)
- Create a separate branch, commit to that branch and push your changes
- Create a PR in GitHub to this repository. This will trigger at least short-running automated tests.
- The PR will be reviewed by the maintainers. If re-work is needed, the preceding steps will be iterated. If the changes are acceptable, the PR will be merged to main.
- Sign your commits (see Commit Signing)
- Run as many automated tests as possible, but at least the unit tests:
<repo>\test\execute_all_tests.ps1 -Tags unit
(see also Main Script: execute_all_tests.ps1). Depending on the area of changes, consider running the appropriate e2e tests as well.
Commit Signing
Signing commits increases trust in your contributions. Verified commit signatures will be display in GitHub like this:

Further readings: Displaying verification statuses for all of your commits
Tip
If you use Visual Studio Code in conjunction with the GitHub Pull Requests Extension and you are logged in into GitHub with that extension, your commits might get signed automatically already.
To setup code signing manually, follow these steps:
- If you do not have a GPG key yet, see Generating a new GPG key.
Info
Since you are most likely running on Windows, you can use the Git bash for gpg
commands
-
If you have a GPG key in place, sign your commits. According to Signing commits, the following options exist:
- sign every commit with
git commit -S -m "YOUR_COMMIT_MESSAGE"
- enable GPG signature for the whole local repo with
git config commit.gpgsign true
- enable GPG signature for all local repos with
git config --global commit.gpgsign true
Tip
To avoid entering the passphrase for the GPG key too often, you can increase the expiration time, e.g. on Windows using Gpg4win (see How do I install and use gpg-agent on Windows?). Alternatively, these settings can also be modified in this file:
C:\Users\<user>\AppData\Roaming\gnupg\gpg-agent.conf
- sign every commit with
See Managing commit signature verification for more information.