From 739bc28549c32d45fabde673fe1399398336dca9 Mon Sep 17 00:00:00 2001 From: Yi S Date: Tue, 21 Nov 2023 05:43:48 +0800 Subject: [PATCH] chore(notes) warn if Manager without admin API (#951) Feedback from issue kong#11995 highlighted potential user confusion due to the internal connection between Kong Manager and the Admin API. To address this, a warning message will now be displayed to notify users that the current configuration combination will not function as expected. --- charts/kong/CHANGELOG.md | 1 + charts/kong/templates/NOTES.txt | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/charts/kong/CHANGELOG.md b/charts/kong/CHANGELOG.md index f4b7151fe..c5f583f4a 100644 --- a/charts/kong/CHANGELOG.md +++ b/charts/kong/CHANGELOG.md @@ -5,6 +5,7 @@ ### Improvements * Support for `affinity` configuration has been added to migration job templates. +* Display a warning message when Kong Manager is enabled and the Admin API is disabled. ## 2.32.0 diff --git a/charts/kong/templates/NOTES.txt b/charts/kong/templates/NOTES.txt index 9b01d1846..2d7e4ea0d 100644 --- a/charts/kong/templates/NOTES.txt +++ b/charts/kong/templates/NOTES.txt @@ -12,10 +12,17 @@ Once installed, please follow along the getting started guide to start using Kong: https://docs.konghq.com/kubernetes-ingress-controller/latest/guides/getting-started/ {{ $warnings := list -}} + {{- if (hasKey .Values.ingressController "serviceAccount") -}} {{- if (or (hasKey .Values.ingressController.serviceAccount "name") (hasKey .Values.ingressController.serviceAccount "annotations")) -}} {{- $warnings = append $warnings "you have set either .ingressController.serviceAccount.name or .ingressController.serviceAccount.annotations. These settings have moved to .deployment.serviceAccount.name and .deployment.serviceAccount.annotations. You must move your configuration to the new location in values.yaml" -}} {{- end -}} {{- end -}} +{{- if and .Values.manager.enabled (or .Values.manager.http.enabled .Values.manager.tls.enabled) -}} +{{- if not (and .Values.admin.enabled (or .Values.admin.http.enabled .Values.admin.tls.enabled)) -}} +{{- $warnings = append $warnings "Kong Manager will not be functional because the Admin API is not enabled. Setting both .admin.enabled and .admin.http.enabled and/or .admin.tls.enabled to true to enable the Admin API over HTTP/TLS." -}} +{{- end -}} +{{- end -}} + {{- include "kong.deprecation-warnings" $warnings -}}