adutra commented on code in PR #3759:
URL: https://github.com/apache/polaris/pull/3759#discussion_r2812062170


##########
Makefile:
##########
@@ -215,16 +215,62 @@ client-cleanup: ## Cleanup virtual environment and Python 
cache files
 
 ##@ Helm
 
+helm-install-plugins: DEPENDENCIES := helm
+.PHONY: helm-install-plugins
+helm-install-plugins: check-dependencies ## Install required Helm plugins 
(unittest, schema)
+       @echo "--- Installing Helm plugins ---"
+       # Pin unittest version to 1.0.2 due to 
https://github.com/helm-unittest/helm-unittest/issues/790
+       @if helm plugin list | grep -q "^unittest"; then \
+               echo "Plugin 'unittest' is already installed."; \
+       else \
+               echo "Installing 'unittest' plugin..."; \
+               helm plugin install 
https://github.com/helm-unittest/helm-unittest --version 1.0.2; \
+       fi
+       @if helm plugin list | grep -q "^schema"; then \
+               echo "Plugin 'schema' is already installed."; \
+       else \
+               echo "Installing 'schema' plugin..."; \
+               helm plugin install 
https://github.com/losisin/helm-values-schema-json.git; \
+       fi
+       @echo "--- Helm plugins installed ---"
+
+helm-schema-verify: DEPENDENCIES := helm git
+.PHONY: helm-schema-verify
+helm-schema-verify: helm-schema-generate ## Verify Helm chart JSON schema is 
up to date
+       @echo "--- Verifying Helm values schema is up to date ---"
+       @if ! git diff --exit-code helm/polaris/values.schema.json; then \
+               echo "ERROR: Helm schema is out of date. Please run 'make 
helm-schema-generate' and commit the changes."; \
+               exit 1; \
+       fi
+       @echo "--- Helm values schema is up to date ---"
+
+helm-schema-generate: DEPENDENCIES := helm
+.PHONY: helm-schema-generate
+helm-schema-generate: helm-install-plugins ## Generate Helm chart JSON schema 
from values.yaml
+       @echo "--- Generating Helm values schema ---"
+       @helm schema -f helm/polaris/values.yaml -o 
helm/polaris/values.schema.json --use-helm-docs --draft 7
+       @echo "--- Helm values schema generated ---"
+
 helm-doc-generate: DEPENDENCIES := helm-docs
 .PHONY: helm-doc-generate
 helm-doc-generate: check-dependencies ## Generate Helm chart documentation
        @echo "--- Generating Helm documentation ---"
        @helm-docs --chart-search-root=helm --template-files helm.md.gotmpl 
--output-file ../../site/content/in-dev/unreleased/helm.md
        @echo "--- Helm documentation generated and copied ---"
 
+helm-doc-verify: DEPENDENCIES := helm-docs git
+.PHONY: helm-doc-verify
+helm-doc-verify: helm-doc-generate ## Verify Helm chart documentation is up to 
date
+       @echo "--- Verifying Helm documentation is up to date ---"
+       @if ! git diff --exit-code helm/polaris/README.md 
site/content/in-dev/unreleased/helm.md; then \

Review Comment:
   I removed `helm/polaris/README.md` which indeed no longer exists but the 
rest of the target is still valid imho.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to