Skip to content

Commit

Permalink
Add schemas for all values files
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Nov 18, 2024
1 parent bfe01be commit 45a61db
Show file tree
Hide file tree
Showing 9 changed files with 437 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/helm-charts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,22 @@ jobs:
- name: Lint charts
id: lint
run: ct lint --all

validate-values-schema:
runs-on: ubuntu-latest
name: Validate values schema json
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate values schema json
uses: losisin/helm-values-schema-json-action@v1
with:
input: values.yaml
fail-on-diff: true
test:
runs-on: ubuntu-latest
needs: lint
needs:
- lint
- validate-values-schema
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 4 additions & 0 deletions charts/commons/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": null
}
4 changes: 4 additions & 0 deletions charts/cron-jobs/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": null
}
88 changes: 88 additions & 0 deletions charts/default-backend/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"cron": {
"properties": {
"replaceOldestPodHourly": {
"type": "boolean"
}
},
"type": "object"
},
"hpa": {
"properties": {
"enable": {
"type": "boolean"
},
"maxReplicas": {
"type": "integer"
}
},
"type": "object"
},
"image": {
"properties": {
"pullPolicy": {
"type": "string"
},
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"type": "object"
},
"ingress": {
"properties": {
"annotations": {
"properties": {
"kubernetes.io/ingress.class": {
"type": "string"
},
"kubernetes.io/tls-acme": {
"type": "string"
}
},
"type": "object"
},
"hosts": {
"type": "array"
}
},
"type": "object"
},
"replicas": {
"type": "integer"
},
"resources": {
"properties": {
"limits": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
},
"requests": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
64 changes: 64 additions & 0 deletions charts/docker-hub-exporter/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"grafana": {
"properties": {
"influxdb": {
"type": "boolean"
},
"prometheus": {
"type": "boolean"
}
},
"type": "object"
},
"image": {
"properties": {
"pullPolicy": {
"type": "string"
},
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"type": "object"
},
"organisations": {
"type": "string"
},
"replicas": {
"type": "integer"
},
"resources": {
"properties": {
"limits": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
},
"requests": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
4 changes: 4 additions & 0 deletions charts/horizontal-pod-autoscalers/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": null
}
53 changes: 53 additions & 0 deletions charts/pi-hole-exporter/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"configurationSecret": {
"type": "string"
},
"image": {
"properties": {
"pullPolicy": {
"type": "string"
},
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"type": "object"
},
"replicas": {
"type": "integer"
},
"resources": {
"properties": {
"limits": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
},
"requests": {
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
Loading

0 comments on commit 45a61db

Please sign in to comment.