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

Schema for aliased chart dependency generated without alias #34

Closed
MIJOTHY-V2 opened this issue Jul 18, 2024 · 0 comments
Closed

Schema for aliased chart dependency generated without alias #34

MIJOTHY-V2 opened this issue Jul 18, 2024 · 0 comments

Comments

@MIJOTHY-V2
Copy link

Chart dependencies specified with an alias field have their schema generated under the dependency name rather than the alias.

Chart.yaml

apiVersion: v2
description: Example umbrella chart
type: application
name: example-umbrella-chart
version: "0.0.1"
maintainers:
  - name: Someone
    email: [email protected]
dependencies: 
- name: node-problem-detector
  alias: dep-a
  repository: https://charts.deliveryhero.io
  version: "2.3.11"

values.yaml

dep-a:
  foo: bar

Generated Schema

{
  "additionalProperties": false,
  "properties": {
    "dep-a": {
      "additionalProperties": false,
      "properties": {
        "foo": {
          "default": "bar",
          "title": "foo",
          "type": "string"
        }
      },
      "title": "dep-a",
      "type": "object",
      "required": [
        "foo"
      ]
    },
    "global": {
      "description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
      "title": "global",
      "type": "object"
    },
    "node-problem-detector": {
      "properties": {
        "affinity": {
          "additionalProperties": false,
          "title": "affinity",
          "type": "object"
        },
...

Possibly simplest to just inline the schema under the alias, but another one could be that aliased dependencies become properties with $refs to a $def of the underlying dependency, like

{
  "additionalProperties": false,
  "properties": {
    "dep-a": {
      "$ref": "#/$defs/node-problem-detector",  
      "title": "dep-a"
    }
  },
  "$defs": {
    "node-problem-detector": {
      "additionalProperties": false,
      "properties": {
        "affinity": {
          "additionalProperties": false,
          "title": "affinity",
          "type": "object"
        }
      }
    }
  }
}

so the supplied values.yaml file of dep-a: { foo: bar } would be invalid here.

Possibly relates to #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants