Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for conditional dependencies #174

Open
johbo opened this issue Mar 24, 2023 · 0 comments
Open

Add support for conditional dependencies #174

johbo opened this issue Mar 24, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@johbo
Copy link

johbo commented Mar 24, 2023

It would be great to have support for the attribute condition in the dependencies section. Then the value of the condition could be rendered into the output.

The below example shows a case from a chart which I am currently working on, it's allowing to bundle the database for ease of use. Showing that this is a conditional dependencies and showing the value of the condition would be of value to users who study the file README.md.

Example:

dependencies:
  - name: "common"
    repository: "https://charts.bitnami.com/bitnami"
    version: "^2.2.2"
  - name: "postgresql"
    repository: "https://charts.bitnami.com/bitnami"
    version: "^12.2.1"
    condition: "postgresql.bundled"

Using {{ . | toPrettyJson }} I found that only the following data is available for the template:

  "Dependencies": [
    {
      "Name": "common",
      "Version": "^2.2.2",
      "Repository": "https://charts.bitnami.com/bitnami",
      "Alias": ""
    },
    {
      "Name": "postgresql",
      "Version": "^12.2.1",
      "Repository": "https://charts.bitnami.com/bitnami",
      "Alias": ""
    }
  ],

Staying consistent with the naming scheme, the new attribute should be called Condition.

The new default templates could render this as follows:

| Repository | Name | Version | Condition |
|------------|------|---------|-----------|
| https://charts.bitnami.com/bitnami | common | ^2.2.2 | |
| https://charts.bitnami.com/bitnami | postgresql | ^12.2.1 | `postgresql.bundled` |
@Nepo26 Nepo26 added enhancement New feature or request good first issue Good for newcomers labels Jun 29, 2023
@Nepo26 Nepo26 added this to the General Cleanup milestone Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants