CAP Operator Plugin provides an easy way to generate CAP Operator resources to deploy multitenant CAP Applications.
The CAP Operator plugin requires the following packages:
@sap/cds: ">=7"
@sap/cds-dk: ">=7"
To integrate the CAP Operator Plugin into your project, follow these steps:
- Add this self-configuring plugin package to your project:
npm add @cap-js/cap-operator-plugin -D
- After installation, execute one of the following commands based on your requirements:
- To add a basic chart folder, use:
cds add cap-operator
During
cds build
, the plugin will automatically inject the templates folder into the final chart.
- To add a chart folder with templates included, use:
cds add cap-operator --add-with-templates
During
cds build
, the plugin will copy the templates folder into the final chart.
-
Once executed, the chart folder or chart folder with templates will be added to your project directory.
-
Update the
values.yaml
file with your design-time deployment details according tovalues.schema.json
. You can either use any YAML schema validation extension like YAML or run the following command to ensure correctness:
helm lint <chart-path>
- After filling all the design-time information in
values.yaml
, runcds build
. The final chart will be generated in thegen
folder within your project directory.
Note: If you are adding the basic chart folder using the
cds add cap-operator
command, do not modify thevalues.schema.json
file. The templates injected automatically duringcds build
are tightly coupled with the structure invalues.schema.json
. If schema changes are needed, use option--add-with-templates
to add the templates folder and adjust them accordingly.
Caution
To add a chart folder with the values.yaml prefilled with the design-time deployment details from the mta and mta extensions, use:
cds add cap-operator --add-with-mta <mta-yaml-file-path> --add-with-mta-extensions <mta-ext-yaml-file-path>
If you have multiple mta extensions, you can pass them as a comma-separated string in the order that they should be merged.
This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Copyright 2024 SAP SE or an SAP affiliate company and cap-operator-plugin contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.