@@ -51,6 +51,7 @@ GO_MODULES := \
5151 node-drainer \
5252 fault-remediation \
5353 janitor \
54+ lifecycle-manager \
5455 metadata-collector \
5556 event-exporter \
5657 store-client \
@@ -79,7 +80,8 @@ PRIVATE_MODULES := \
7980# Modules requiring kubebuilder for tests
8081KUBEBUILDER_MODULES := \
8182 node-drainer \
82- fault-remediation
83+ fault-remediation \
84+ lifecycle-manager
8385
8486# Default target
8587.PHONY : all
@@ -455,6 +457,11 @@ lint-test-janitor:
455457 @echo " Linting and testing janitor (using standardized Makefile)..."
456458 $(MAKE ) -C janitor lint-test
457459
460+ .PHONY : lint-test-lifecycle-manager
461+ lint-test-lifecycle-manager :
462+ @echo " Linting and testing lifecycle-manager (using standardized Makefile)..."
463+ $(MAKE ) -C lifecycle-manager lint-test
464+
458465.PHONY : lint-test-store-client
459466lint-test-store-client :
460467 @echo " Linting and testing store-client..."
@@ -485,6 +492,12 @@ kubernetes-distro-lint:
485492 $(MAKE ) -C distros/kubernetes lint
486493
487494# Helm chart validation
495+ # Subcharts that cannot render standalone: they reference umbrella helpers or
496+ # globals that only exist when rendered as part of the parent chart.
497+ UMBRELLA_ONLY_CHARTS := csp-health-monitor event-exporter fault-quarantine \
498+ fault-remediation health-events-analyzer mongodb-store \
499+ node-drainer
500+
488501.PHONY : helm-lint
489502helm-lint :
490503 @echo " 🎯 Validating Helm charts..."
@@ -501,17 +514,38 @@ helm-lint:
501514 @echo " "
502515 @# Individual component charts
503516 @echo " Validating component charts..."
517+ @# Recipes run under /bin/sh, so this uses [ rather than [[.
518+ @# UMBRELLA_ONLY_CHARTS reference umbrella helpers (for example
519+ @# nvsentinel.mongodb.certVolume) or umbrella globals, so they cannot render
520+ @# standalone. They are skipped by name and reported, rather than being
521+ @# silently included in a success message they did not earn. They are still
522+ @# covered by the umbrella lint above and by helm-test.
504523 @for chart_dir in distros/kubernetes/nvsentinel/charts/* /; do \
505- if [[ -f " $$ chart_dir/Chart.yaml" ] ]; then \
524+ if [ -f " $$ chart_dir/Chart.yaml" ]; then \
506525 chart_name=$$(basename "$$chart_dir") ; \
526+ case " $( UMBRELLA_ONLY_CHARTS) " in \
527+ * " $$ chart_name " * ) \
528+ echo " Skipping $$ chart_name (needs umbrella context)" ; \
529+ continue ;; \
530+ esac ; \
507531 echo " Validating chart: $$ chart_name" ; \
508532 helm lint " $$ chart_dir" -f distros/kubernetes/nvsentinel/values.yaml || exit 1; \
509533 echo " Testing template rendering for: $$ chart_name" ; \
510534 helm template " $$ chart_name" " $$ chart_dir" -f distros/kubernetes/nvsentinel/values.yaml > /dev/null || exit 1; \
511535 echo " " ; \
512536 fi ; \
513537 done
514- @echo " ✅ All Helm charts validated successfully"
538+ @# The charts in UMBRELLA_ONLY_CHARTS ship disabled, so neither the parent
539+ @# lint above (which renders defaults) nor the loop above exercises them.
540+ @# Render once with every dependency condition turned on so they are
541+ @# validated with the parent chart context they need. The conditions are
542+ @# read from Chart.yaml so a newly added chart is picked up automatically.
543+ @echo " Validating disabled-by-default charts with full context..."
544+ helm template nvsentinel distros/kubernetes/nvsentinel \
545+ $$(grep -oE 'condition: *[a-zA-Z0-9_.]+' distros/kubernetes/nvsentinel/Chart.yaml \
546+ | awk ' {print "--set "$$2"=true"}' | tr ' \n' ' ' ) > /dev/null
547+ @echo " "
548+ @echo " ✅ Parent chart, standalone-renderable component charts, and all charts with every dependency enabled validated"
515549
516550# Helm chart unit tests
517551.PHONY : helm-test
@@ -521,8 +555,17 @@ helm-test:
521555 echo " ❌ Error: helm-unittest plugin not found. Install with: helm plugin install https://github.com/helm-unittest/helm-unittest" ; \
522556 exit 1; \
523557 fi
558+ @# The umbrella's own suite covers the cross-chart consistency checks, which
559+ @# no subchart can see. --with-subchart=false because the subchart suites
560+ @# address their templates by chart-relative path and are run separately
561+ @# below.
562+ @if [ -d " distros/kubernetes/nvsentinel/tests" ]; then \
563+ echo " Running unit tests for chart: nvsentinel (umbrella)" ; \
564+ helm unittest --with-subchart=false distros/kubernetes/nvsentinel || exit 1; \
565+ echo " " ; \
566+ fi
524567 @for chart_dir in distros/kubernetes/nvsentinel/charts/* /; do \
525- if [[ -d " $$ chart_dir/tests" ] ]; then \
568+ if [ -d " $$ chart_dir/tests" ]; then \
526569 chart_name=$$(basename "$$chart_dir") ; \
527570 echo " Running unit tests for chart: $$ chart_name" ; \
528571 helm unittest " $$ chart_dir" || exit 1; \
0 commit comments