Thank you for contributing to our project!
Project maintainers
To get an overview of the project, read the README.
If you find a problem with the code, search if an issue already exists.
If you open a pull request to fix the problem, an issue will ba automatically created.
If a related issue doesn't exist, you can open a new issue using a relevant issue form.
To contribute code to the project:
- Fork the project and work on your forked repository
- Before submitting a new pull request, make sure you have
pre-commit
installed
pre-commit install
- When submitting a pull request, make sure to fill all the required, relevant fields for your PR.
Make sure the title is descriptive and short. - If the fix is needed in a released version, once your pull request is merged, cherry-pick it to the relevant branch(s).
Add/cherry-pick <target branch to cherry-pick to>
to the PR comment.
- Add typing to new code; typing is enforced using mypy
A new resource must follow rules:
- A new file named as the resource under
ocp_resources
; If the resource name is composed of multiple words, separate them with an underscore. - A class named as the resource kind.
- Inherit from the relevant class; If the resource is cluster-scoped, inherit from
Resource
else fromNamespacedResource
. - API group:
- Under
ocp_resources.resource.Resource.ApiGroup
- Resource's apiGroup (
apiVersion
prefix) asapi_group
- Under
- A link to the resource's API reference.
- Implement
__init__
function;
Define all the required arguments that are required to instantiate the new resource. Optional parameters may be added as well. - Implement
to_dict
function.