Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
Note that this repository holds two separate components:
- disco-agent: For CyberArk DisCo
- venafi-kubernetes-agent: For TLSPK / Certificate Manager SaaS
- Getting Started
- Development Environment
- Making Changes
- Testing
- Submitting a Pull Request
- Code Review Process
- Additional Resources
Before you begin, ensure you have the following installed:
To check which Go version will be used:
make which-goIt's also possible to use a vendored version of Go, via make vendor-go.
Most of the setup logic for provisioning tooling and for handling builds and testing is defined in Makefile logic.
Specifically, the make/_shared directory contains shared Makefile logic derived from
the cert-manager makefile-modules project.
-
Fork the repository on GitHub
-
Clone your fork:
git clone git@github.com:YOUR-USERNAME/jetstack-secure.git cd jetstack-secure -
Add the upstream remote:
git remote add upstream git@github.com:jetstack/jetstack-secure.git
-
Run initial verification:
make verify
This ensures your environment is set up correctly.
To build and run the agent locally:
go run main.go agent --agent-config-file ./path/to/agent/config/file.yaml -p 0h1m0sExample configuration files are available:
You can also run a local echo server to monitor agent requests:
go run main.go echomake help- Show all available make targetsmake verify- Run all verification checks (linting, formatting, etc.)make test-unit- Run unit testsmake test-helm- Run Helm chart testsmake generate- Generate code, documentation, and other artifactsmake oci-build-preflight- Build container imagemake clean- Clean all temporary files
Always create a new branch for your changes:
git checkout -b feature/your-feature-nameUse descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentation changesrefactor/for refactoring
This project follows standard Go conventions:
- Run
make verify-golangci-lintto check your code - Run
make fix-golangci-lintto automatically fix some issues - Ensure all code is formatted with
gofmt - Follow the Effective Go guidelines
- Most of the conventions are enforced by linters, and violations will prevent code being merged
-
Stage your changes:
git add . -
Run verification before committing:
make verify
-
Commit with a descriptive message:
git commit -m "Brief description of your changes"Write clear commit messages:
- Use the imperative mood ("Add feature" not "Added feature")
- Keep the first line under 72 characters
- Add additional context in the body if needed
Before submitting a PR, ensure all tests pass:
# Run unit tests
make test-unit
# Run Helm tests
make test-helm
# Run all verification checks
make verifyE2E tests run automatically in CI when you add specific labels to your PR:
- Add the
test-e2elabel to trigger GKE-based E2E tests - Add the
keep-e2e-clusterlabel if you need to keep the cluster for debugging (remember to delete it manually afterward to avoid costs)
The E2E test script is located at hack/e2e/test.sh.
- Add unit tests for all new functionality
- Place tests in
*_test.gofiles alongside the code they test - Use the testify library for assertions
- Aim for meaningful test coverage, not just high percentages
-
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub from your fork to the
masterbranch ofjetstack/jetstack-secure -
Fill out the PR description with:
- Clear description of the changes
- Related issue numbers (if applicable)
- Testing instructions
- Any breaking changes or special considerations
-
Ensure CI passes:
- All tests must pass
- Code must pass verification / linting checks
- No merge conflicts
-
PRs require approval before merging
-
Keep PRs focused and reasonably sized
-
Update your branch if
masterhas moved forward:git fetch upstream git rebase upstream/master git push --force-with-lease origin feature/your-feature-name
Contributors from inside CyberArk should reach out to the cert-manager team for reviews for PRs which are passing CI.
The cert-manager team maintains this project and will provide code reviews and guidance for merging changes.
If you need help or have questions:
- Check existing issues and documentation
- Open a new issue with the
questionlabel - For CyberArk contributors, reach out to the cert-manager team
By contributing, you agree that your contributions will be licensed under the license in the LICENSE file in the root directory of this repository.