github.com/koderover/helm@v2.17.0+incompatible/docs/chart_best_practices/requirements.md (about)

     1  # Requirements Files
     2  
     3  This section of the guide covers best practices for `requirements.yaml` files.
     4  
     5  ## Versions
     6  
     7  Where possible, use version ranges instead of pinning to an exact version. The suggested default is to use a patch-level version match:
     8  
     9  ```yaml
    10  version: ~1.2.3
    11  ```
    12  
    13  This will match version `1.2.3` and any patches to that release.  In other words, `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0`
    14  
    15  For the complete version matching syntax, please see the [semver documentation](https://github.com/Masterminds/semver#checking-version-constraints)
    16  
    17  ### Repository URLs
    18  
    19  Where possible, use `https://` repository URLs, followed by `http://` URLs.
    20  
    21  If the repository has been added to the repository index file, the repository name can be used as an alias of URL. Use `alias:` or `@` followed by repository names.
    22  
    23  File URLs (`file://...`) are considered a "special case" for charts that are assembled by a fixed deployment pipeline. Charts that use `file://` in a `requirements.yaml` file are not allowed in the official Helm repository.
    24  
    25  ## Conditions and Tags
    26  
    27  Conditions or tags should be added to any dependencies that _are optional_.
    28  
    29  The preferred form of a condition is:
    30  
    31  ```yaml
    32  condition: somechart.enabled
    33  ```
    34  
    35  Where `somechart` is the chart name of the dependency.
    36  
    37  When multiple subcharts (dependencies) together provide an optional or swappable feature, those charts should share the same tags.
    38  
    39  For example, if both `nginx` and `memcached` together provided performance optimizations for the main app in the chart, and were required to both be present when that feature is enabled, then they might both have a
    40  tags section like this:
    41  
    42  ```
    43  tags:
    44    - webaccelerator
    45  ```
    46  
    47  This allows a user to turn that feature on and off with one tag.