This repository contains a collection of opinionated cdk8s constructs that are commonly used in CA applications.
The project is available on PyPi under ca-cdk8s-constructs. Use your project manager of choice to install it.
There are currently constructs available for:
- Horizontal Pod Autoscaler
- Vertical Pod Autoscaler
- Pod Disruption Budget
- Container Resources
- cdk8s Helm Chart
Please see the resource docstrings or the Github Wiki for usage information.
To request new constructs, please raise an issue in the GitHub repository.
The CRDs are found in the cdk8s.yaml file, which contains a list of URLs to the CRD definitions.
The generated classes are imported into the ca_cdk8s_constructs/imports directory.
If the CRDs are updated, the imports need to be refreshed. There is an Actions workflow that will run weekly to refresh the imports if there are any changes.
To refresh the CRD imports, run the following command:
cdk8s import --output ca_cdk8s_constructs/importsNew versions of this library will be released via Github Releases and will follow the Semantic Versioning wherever possible.
To develop this project you will need the following installed:
Justfor running commandsuvfor dependency management
Run just to see all available commands.
This project uses semantic versioning and versions must be bumped in accordance with SemVer rules.
The Justfile contains a helper command for making releases, just draft-release. To use it:
- Determine the release type (patch, minor, major)
- Run
just draft-release <patch | minor | major> - Approve the version bump if acceptable
- Check the staged changes and approve if acceptable
- Follow the link to the draft release and edit it to add details if requied
- Publish the release