Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/negative_test/chart/v2-with-depends-on.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"apiVersion": "v2",
"dependencies": [
{
"name": "nginx"
},
{
"depends-on": ["nginx"],
"name": "bar"
}
],
"name": "invalid-chart",
"version": "1.0.0"
}
9 changes: 9 additions & 0 deletions src/negative_test/chart/v2-with-depends-on.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../schemas/json/chart.json
apiVersion: v2
name: invalid-chart
version: 1.0.0
dependencies:
- name: nginx
- name: bar
depends-on:
- nginx
38 changes: 35 additions & 3 deletions src/schemas/json/chart.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"additionalProperties": false,
"properties": {
"apiVersion": {
"description": "The apiVersion field should be v2 for Helm charts that require at least Helm 3. Charts supporting previous Helm versions have an apiVersion set to v1 and are still installable by Helm 3.",
"enum": ["v1", "v2"]
"description": "The apiVersion field should be v2 for Helm charts that require at least Helm 3. Charts supporting previous Helm versions have an apiVersion set to v1 and are still installable by Helm 3. v3 is experimental.",
"enum": ["v1", "v2", "v3"]
},
"name": {
"description": "The name of the chart",
Expand Down Expand Up @@ -117,6 +117,13 @@
"alias": {
"description": "Alias to be used for the chart. Useful when you have to add the same chart multiple times",
"type": "string"
},
"depends-on": {
"description": "A list of subcharts (by name or alias) that need to be ready before this subchart can be installed. Only available when apiVersion is v3.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
Expand Down Expand Up @@ -165,6 +172,10 @@
"type": "string"
},
"properties": {
"helm.sh/depends-on/subcharts": {
"description": "A JSON array of subchart names (by name or alias) that must be fully deployed and in a ready state before the current chart resources can be installed.",
"type": "string"
},
"artifacthub.io/changes": {
"description": "This annotation is used to provide some details about the changes introduced by a given chart version. Artifact Hub can generate and display a ChangeLog based on the entries in the changes field in all your chart versions.\nThis annotation can be provided using two different formats: using a plain list of strings with the description of the change or using a list of objects with some extra structured information (see example below). Please feel free to use the one that better suits your needs. The UI experience will be slightly different depending on the choice. When using the list of objects option the valid supported kinds are added, changed, deprecated, removed, fixed and security.",
"type": "string"
Expand Down Expand Up @@ -228,5 +239,26 @@
},
"required": ["apiVersion", "name", "version"],
"title": "Helm Chart.yaml",
"type": "object"
"type": "object",
"if": {
"properties": {
"apiVersion": {
"const": "v3"
}
}
},
"then": {},
"else": {
"properties": {
"dependencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"depends-on": false
}
}
}
}
}
}
20 changes: 20 additions & 0 deletions src/test/chart/v3-with-depends-on.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"annotations": {
"helm.sh/depends-on/subcharts": "[\"bar\", \"rabbitmq\"]"
},
"apiVersion": "v3",
"dependencies": [
{
"name": "nginx"
},
{
"name": "rabbitmq"
},
{
"depends-on": ["nginx", "rabbitmq"],
"name": "bar"
}
],
"name": "foo",
"version": "1.0.0"
}
13 changes: 13 additions & 0 deletions src/test/chart/v3-with-depends-on.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../schemas/json/chart.json
apiVersion: v3
name: foo
version: 1.0.0
annotations:
helm.sh/depends-on/subcharts: '["bar", "rabbitmq"]'
dependencies:
- name: nginx
- name: rabbitmq
- name: bar
depends-on:
- nginx
- rabbitmq