From 9b3fd3c895e18879fc6a3deb5c6339ca396cb595 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sun, 19 May 2024 20:24:23 +0200 Subject: [PATCH] Add global to possible values --- .gitignore | 1 + Makefile | 13 +++++++++++++ charts/crds/Chart.yaml | 2 +- charts/crds/values.schema.json | 12 ++++++++++++ charts/workload/Chart.yaml | 2 +- charts/workload/values.schema.json | 15 +++++++++++++++ charts/workload/values.yaml | 2 +- 7 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 charts/crds/values.schema.json create mode 100644 charts/workload/values.schema.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba077a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..267da52 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +LOCALBIN ?= $(shell pwd)/bin +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +.PHONY: gen_docs +gen_docs: ## Generate helm documentation + test -s $(LOCALBIN)/helm-docs || GOBIN=$(LOCALBIN) go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest + ./bin/helm-docs --template-files=./README.md.gotmpl --template-files=./docs --sort-values-order file + +.PHONY: gen_schema +gen_schema: ## Generate helm schema + test -s $(LOCALBIN)/helm-schema || GOBIN=$(LOCALBIN) go install github.com/dadav/helm-schema/cmd/helm-schema@latest + ./bin/helm-schema --chart-search-root charts diff --git a/charts/crds/Chart.yaml b/charts/crds/Chart.yaml index 4d50e48..224a6ed 100644 --- a/charts/crds/Chart.yaml +++ b/charts/crds/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: softplayer-lib-crd description: A library to be reused accross softplayer charts type: library -version: 0.1.0 +version: 0.1.1 maintainers: - name: allanger email: allanger@badhouseplants.net diff --git a/charts/crds/values.schema.json b/charts/crds/values.schema.json new file mode 100644 index 0000000..3e67707 --- /dev/null +++ b/charts/crds/values.schema.json @@ -0,0 +1,12 @@ +{ + "additionalProperties": false, + "properties": { + "global": { + "description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.", + "title": "global", + "type": "object" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object" +} \ No newline at end of file diff --git a/charts/workload/Chart.yaml b/charts/workload/Chart.yaml index 1e01e39..2125d3b 100644 --- a/charts/workload/Chart.yaml +++ b/charts/workload/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: softplayer-lib-workload description: A library to be reused accross softplayer charts type: library -version: 0.1.0 +version: 0.1.1 maintainers: - name: allanger email: allanger@badhouseplants.net diff --git a/charts/workload/values.schema.json b/charts/workload/values.schema.json new file mode 100644 index 0000000..b523728 --- /dev/null +++ b/charts/workload/values.schema.json @@ -0,0 +1,15 @@ +{ + "additionalProperties": false, + "properties": { + "global": { + "additionalProperties": false, + "title": "global", + "type": "object" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": [ + "global" + ] +} diff --git a/charts/workload/values.yaml b/charts/workload/values.yaml index 54bcf30..490a0b7 100644 --- a/charts/workload/values.yaml +++ b/charts/workload/values.yaml @@ -1 +1 @@ -~ +global: {}