Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhprasad-sap authored Apr 3, 2024
1 parent 16a1b56 commit 9332745
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ To integrate the CAP Operator Plugin into your project, follow these steps:
```
> During `cds build`, the plugin will copy the templates folder into the final chart.

> [!CAUTION]
> ### Experimental
> ### ⚠️ Experimental
> To add a chart folder with the values.yaml prefilled with the design-time deployment details from the mta and mta extensions, use:
>```sh
> 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.
> If you have multiple mta extensions, you can pass them as a comma-separated string in order to merge them.

3. Once executed, the chart folder or chart folder with templates will be added to your project directory.
2. Once executed, the chart folder or chart folder with templates will be added to your project directory.

4. The `values.yaml` requires two type of details:
3. The `values.yaml` requires two type of details:

* Design-time deployment details
- serviceInstances
Expand All @@ -56,23 +55,23 @@ To integrate the CAP Operator Plugin into your project, follow these steps:
- imagePullSecrets
- env information inside each workload like database instance ID

As an developer, you need to fill the design-time deployment details in the `values.yaml` file which can be pushed to your repository. Some of the design-time details will be prefilled by the plugin based on the project configuration. But this needs to be verified and the missing information should be filled in manually. You can refer to `values.schema.json` file for the structure of the `values.yaml` file. You can either use any YAML schema validation extension like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) or run the following command to ensure correctness of the `values.yaml` file:
As a developer, you need to fill in the design-time deployment details in the `values.yaml` file which can be pushed to your repository. The plugin will prefill some of the design-time details based on the project configuration. But this needs to be verified and the missing information should be filled in manually. You can refer to `values.schema.json` file for the structure of the `values.yaml` file. You can either use any YAML schema validation extension like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) or run the following command to ensure the correctness of the `values.yaml` file:

```sh
helm lint <chart-path>
```

5. After filling all the design-time information in `values.yaml`, run `cds build`. The final chart will be generated in the `gen` folder within your project directory.
4. After filling all the design-time information in `values.yaml`, run `cds build`. The final chart will be generated in the `gen` folder within your project directory.

6. Now to deploy the application, you can pass the runtime values in a separate `runtime-values.yaml` file and deploy the chart using the following command:
5. Now to deploy the application, you can pass the runtime values in a separate `runtime-values.yaml` file and deploy the chart using the following command:

```sh
helm upgrade -i -n <namespace> <release-name> <chart-path> -f <runtime-values.yaml-path>
```
```sh
helm upgrade -i -n <namespace> <release-name> <chart-path> -f <runtime-values.yaml-path>
```

## Things to Note

* If you are adding the basic chart folder using the `cds add cap-operator` command, do not modify the `values.schema.json` file.The templates injected automatically during `cds build` are tightly coupled with the structure in `values.schema.json`. If schema changes are needed, use option `--add-with-templates` to add the templates folder and adjust them accordingly.
* If you are adding the basic chart folder using the `cds add cap-operator` command, do not modify the `values.schema.json` file. The templates injected automatically during `cds build` are tightly coupled with the structure in `values.schema.json`. If schema changes are needed, use option `--add-with-templates` to add the templates folder and adjust them accordingly.

* When defining environment variables for workloads in the `values.yaml` file, it's important to mirror these definitions in the `runtime-values.yaml` file. This ensures consistency and avoids potential conflicts, as Helm does not merge arrays. If you're introducing new environment variables in `runtime-values.yaml` for a workload, remember to include existing variables from `values.yaml` to maintain coherence.

Expand Down

0 comments on commit 9332745

Please sign in to comment.