From 0d9d51ad7198e22edbf23cfddcac7f8835aac31e Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Thu, 19 Dec 2024 13:47:14 +0100 Subject: [PATCH 1/2] Add a warning when pattern folder and pattern name differ Co-Authored-By: Akos Eros --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 20e543fc3..37984d1e5 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,13 @@ validate-schema: ## validates values files against schema in common/clustergroup .PHONY: validate-prereq validate-prereq: ## verify pre-requisites + $(eval GLOBAL_PATTERN := $(shell yq -r .global.pattern values-global.yaml)) + @if [ $(NAME) != $(GLOBAL_PATTERN) ]; then\ + echo "";\ + echo "WARNING: folder directory is \"$(NAME)\" and global.pattern is set to \"$(GLOBAL_PATTERN)\"";\ + echo "this can create problems. Please make sure they are the same!";\ + echo "";\ + fi @if [ ! -f /run/.containerenv ]; then\ echo "Checking prerequisites:";\ for t in $(EXECUTABLES); do if ! which $$t > /dev/null 2>&1; then echo "No $$t in PATH"; exit 1; fi; done;\ From 0cc13f6d9f41330516118c7fc4650b54e195a130 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Thu, 19 Dec 2024 13:48:16 +0100 Subject: [PATCH 2/2] Drop some old and unused prereq test --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 37984d1e5..1be6bbf38 100644 --- a/Makefile +++ b/Makefile @@ -173,8 +173,6 @@ validate-prereq: ## verify pre-requisites fi @if [ ! -f /run/.containerenv ]; then\ echo "Checking prerequisites:";\ - for t in $(EXECUTABLES); do if ! which $$t > /dev/null 2>&1; then echo "No $$t in PATH"; exit 1; fi; done;\ - echo " Check for '$(EXECUTABLES)': OK";\ echo -n " Check for python-kubernetes: ";\ if ! ansible -m ansible.builtin.command -a "{{ ansible_python_interpreter }} -c 'import kubernetes'" localhost > /dev/null 2>&1; then echo "Not found"; exit 1; fi;\ echo "OK";\