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

fix(helm): allows extra top-level properties #18174

Merged
merged 2 commits into from
Jan 27, 2022
Merged

Conversation

ad-m
Copy link
Contributor

@ad-m ad-m commented Jan 26, 2022

SUMMARY

When our Helm Chart is used in composition additional properties might be added extra properties than defined by us eg. global, enabled. In #18161 we restricted available properties with comment:

I can see that overwhelmingly required fields may appear now. Removing these requirements requires very careful verification in multiple parameters that the Helm Chart is prepared to render without the parameter, which I intend to do when we work on the rendering tests. (...)
I think it's better to agree on the structure and notation of the schema and then relax & extend when working with Helm Chart is less fragile (more tests added).

To avoid scenario like that in future we should add that scenario to tests in #18127 .

Example error:

▶ helm install superset-v2 . -f values.yaml --dry-run > deploy-logs.yaml
coalesce.go:162: warning: skipped value for extraEnv: Not a table.
Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
superset:
- (root): Additional property global is not allowed
- (root): Additional property enabled is not allowed

values.yaml content:

superset:
  enabled: true
  #image:
  #  repository: apache/superset
  #  tag: 1.4.0
  postgresql:
    # Create postgres locally for development purposes only.
    enabled: true

Chart.yaml content:

apiVersion: v2
name: superset
description: A Helm chart for Superset

type: application
version: 0.0.1
appVersion: 1.14.0

dependencies:
- name: superset
  repository: https://apache.github.io/superset
  version: 0.5.5
  condition: superset.enabled

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

We need tests deploy with Chart.yaml and values.yaml provided above.

ADDITIONAL INFORMATION

  • Has associated issue: no, reported by Slack
  • Required feature flags: no
  • Changes UI: no
  • Includes DB Migration (follow approval process in SIP-59): N/A
    • Migration is atomic, supports rollback & is backwards-compatible: N/A
    • Confirm DB migration upgrade and downgrade tested: N/A
    • Runtime estimates and downtime expectations provided: N/A
  • Introduces new feature or API: no
  • Removes existing feature or API: no

@pedro93
Copy link

pedro93 commented Jan 26, 2022

I had just hit this issue, the suggested changes allow for correct configuration of helm charts as a dependency on other charts.
Thank you for fixing this Adam!

@craig-rueda craig-rueda merged commit 568b8e1 into apache:master Jan 27, 2022
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
* fix(helm): allows extra top-level properties

* chore: bump Chart version to 0.5.5
ofekisr pushed a commit to nielsen-oss/superset that referenced this pull request Feb 8, 2022
* fix(helm): allows extra top-level properties

* chore: bump Chart version to 0.5.5
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
* fix(helm): allows extra top-level properties

* chore: bump Chart version to 0.5.5
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants