diff --git a/.github/workflows/helm-charts-test.yaml b/.github/workflows/helm-charts-test.yaml index 795caad..e3e7ee7 100644 --- a/.github/workflows/helm-charts-test.yaml +++ b/.github/workflows/helm-charts-test.yaml @@ -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: diff --git a/charts/commons/values.schema.json b/charts/commons/values.schema.json new file mode 100644 index 0000000..3ba3936 --- /dev/null +++ b/charts/commons/values.schema.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": null +} diff --git a/charts/cron-jobs/values.schema.json b/charts/cron-jobs/values.schema.json new file mode 100644 index 0000000..3ba3936 --- /dev/null +++ b/charts/cron-jobs/values.schema.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": null +} diff --git a/charts/default-backend/values.schema.json b/charts/default-backend/values.schema.json new file mode 100644 index 0000000..65e6a25 --- /dev/null +++ b/charts/default-backend/values.schema.json @@ -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" +} diff --git a/charts/docker-hub-exporter/values.schema.json b/charts/docker-hub-exporter/values.schema.json new file mode 100644 index 0000000..89938ea --- /dev/null +++ b/charts/docker-hub-exporter/values.schema.json @@ -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" +} diff --git a/charts/horizontal-pod-autoscalers/values.schema.json b/charts/horizontal-pod-autoscalers/values.schema.json new file mode 100644 index 0000000..3ba3936 --- /dev/null +++ b/charts/horizontal-pod-autoscalers/values.schema.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": null +} diff --git a/charts/pi-hole-exporter/values.schema.json b/charts/pi-hole-exporter/values.schema.json new file mode 100644 index 0000000..038c6b0 --- /dev/null +++ b/charts/pi-hole-exporter/values.schema.json @@ -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" +} diff --git a/charts/redirect/values.schema.json b/charts/redirect/values.schema.json new file mode 100644 index 0000000..e113191 --- /dev/null +++ b/charts/redirect/values.schema.json @@ -0,0 +1,159 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "cron": { + "properties": { + "replaceOldestPodWeekly": { + "type": "boolean" + } + }, + "type": "object" + }, + "grafana": { + "properties": { + "influxdb": { + "type": "boolean" + }, + "prometheus": { + "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" + } + }, + "type": "object" + }, + "labels": { + "properties": { + "language": { + "type": "string" + } + }, + "type": "object" + }, + "podSecurityContext": { + "properties": {}, + "type": "object" + }, + "redirect": { + "properties": { + "buildin": { + "type": "string" + }, + "defaultFallbackTarget": { + "type": "string" + }, + "enforceHttps": { + "type": "boolean" + }, + "hosts": { + "properties": { + "www.ceesjankiewiet.nl": { + "type": "string" + } + }, + "type": "object" + }, + "ingressHosts": { + "items": { + "type": "string" + }, + "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" + }, + "securityContext": { + "properties": {}, + "type": "object" + }, + "service": { + "properties": { + "type": { + "type": "string" + } + }, + "type": "object" + }, + "serviceAccount": { + "properties": { + "create": { + "type": "boolean" + }, + "name": { + "type": "null" + } + }, + "type": "object" + } + }, + "type": "object" +} diff --git a/charts/redis-db-assignment-operator/values.schema.json b/charts/redis-db-assignment-operator/values.schema.json new file mode 100644 index 0000000..858e730 --- /dev/null +++ b/charts/redis-db-assignment-operator/values.schema.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "image": { + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object" + }, + "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" +}