Skip to content

[Helm] allow enabled as key in values schema #361

@wrdls

Description

@wrdls

When using Helm and subcharts, a common pattern is to add a condition to the subchart(s) to enable/disable them.

See https://helm.sh/docs/chart_best_practices/dependencies/#conditions-and-tags

Example Chart.yaml:

apiVersion: v2
name: cert-manager
version: 1.2.3
dependencies:
  - name: cert-manager
    version: v1.19.1
    repository: https://charts.jetstack.io
    condition: cert-manager.enabled
  - name: cert-manager-google-cas-issuer
    version: 0.10.1
    repository: https://charts.jetstack.io
    condition: cert-manager-google-cas-issuer.enabled

Example values.yaml:

cert-manager:
  enabled: true

cert-manager-google-cas-issuer:
  enabled: false  # <-- key not allowed

The above fails with

Error: values don't meet the specifications of the schema(s) in the following chart(s): cert-manager-google-cas-issuer: - (root): Additional property enabled is not allowed

In the cert-manager chart this is allowed: https://github.com/cert-manager/cert-manager/blob/master/deploy/charts/cert-manager/values.schema.json#L54-L56

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions