From 9f7949682a192d325ec83ae58e54e7f4df02fe50 Mon Sep 17 00:00:00 2001 From: jesse goodier <31039225+jessegoodier@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:40:11 +0000 Subject: [PATCH] add warning for federated storage --- cost-analyzer/templates/NOTES.txt | 1 + cost-analyzer/templates/_helpers.tpl | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/cost-analyzer/templates/NOTES.txt b/cost-analyzer/templates/NOTES.txt index bdb83d549..e885e0950 100644 --- a/cost-analyzer/templates/NOTES.txt +++ b/cost-analyzer/templates/NOTES.txt @@ -26,3 +26,4 @@ Please allow 25 minutes for Kubecost to gather metrics. A progress indicator wil Having installation issues? View our Troubleshooting Guide at http://docs.kubecost.com/troubleshoot-install {{- include "kubecostV2-3-notices" . -}} +{{- include "federatedStorageCheck" . -}} \ No newline at end of file diff --git a/cost-analyzer/templates/_helpers.tpl b/cost-analyzer/templates/_helpers.tpl index 513c8011a..69c07c155 100755 --- a/cost-analyzer/templates/_helpers.tpl +++ b/cost-analyzer/templates/_helpers.tpl @@ -113,6 +113,14 @@ Kubecost 2.0 preconditions {{- end }} {{- end -}} +{{- define "federatedStorageCheck" -}} + {{- if or (.Values.federatedETL).federatedStore (.Values.kubecostModel).federatedStorageConfig }} + {{- if and (not (eq (include "aggregator.deployMethod" .) "statefulset")) (not (.Values.federatedETL).agentOnly) }} + {{- printf "\n\n***Configuration issue detected:***\nWhen a federated store is provided, Kubecost should either be running as agentOnly or as a statefulset.\n.Values.federatedETL.agentOnly=true\nOr\n.Values.kubecostAggregator.deployMethod=statefulset\n***" }} + {{- end }} + {{- end }} +{{- end }} + {{- define "cloudIntegrationFromProductConfigs" }} { {{- if ((.Values.kubecostProductConfigs).athenaBucketName) }}