fstaudt / helm-values

Ease configuration of values for Helm charts in your IDE
Apache License 2.0
11 stars 0 forks source link

JSON schema extractor should take aliases into account #133

Closed fstaudt closed 1 year ago

fstaudt commented 1 year ago

When JSON schemas are extracted from dependencies, aliases used for sub-charts are ignored.

As a result, aggregated JSON schema incorrectly uses the chart name instead of the alias for the sub-charts.

Example

dependent-chart/Chart.yaml:

apiVersion: v2
name: dependent-chart
version: 0.1.0
description: Dependent helm chart with alias in dependencies
dependencies:
  - name: sub-chart
    version: 0.1.0
    repository: "@thirdparty"
    alias: alias-chart

main-chart/Chart.yaml:

apiVersion: v2
name: main-chart
version: 0.1.0
description: Main helm chart
dependencies:
  - name: dependent-chart
    version: 0.1.0
    repository: "@thirdparty"

main-chart/values.yaml:

dependent-chart:
  sub-chart:             # is incorrectly documented and auto-completed
  alias-chart:           # is incorrectly considered as invalid