From 0cccc010cc49e01635040a7747bd1d8295c3b5a1 Mon Sep 17 00:00:00 2001 From: Mason Johnson Date: Wed, 11 Dec 2024 18:08:26 -0700 Subject: [PATCH] lowercase feature names are supported now --- internal/controller/ngrok/kubernetesoperator_controller.go | 7 +++---- .../controller/ngrok/kubernetsoperator_controller_test.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/controller/ngrok/kubernetesoperator_controller.go b/internal/controller/ngrok/kubernetesoperator_controller.go index 5e0cf20e..32cc689a 100644 --- a/internal/controller/ngrok/kubernetesoperator_controller.go +++ b/internal/controller/ngrok/kubernetesoperator_controller.go @@ -55,11 +55,10 @@ import ( "github.com/ngrok/ngrok-operator/internal/ngrokapi" ) -// TODO: features need to be capitalized in the ngrok API currently, this is subject to change var featureMap = map[string]string{ - ngrokv1alpha1.KubernetesOperatorFeatureBindings: "Bindings", - ngrokv1alpha1.KubernetesOperatorFeatureIngress: "Ingress", - ngrokv1alpha1.KubernetesOperatorFeatureGateway: "Gateway", + ngrokv1alpha1.KubernetesOperatorFeatureBindings: "bindings", + ngrokv1alpha1.KubernetesOperatorFeatureIngress: "ingress", + ngrokv1alpha1.KubernetesOperatorFeatureGateway: "gateway", } // KubernetesOperatorReconciler reconciles a KubernetesOperator object diff --git a/internal/controller/ngrok/kubernetsoperator_controller_test.go b/internal/controller/ngrok/kubernetsoperator_controller_test.go index fbeaff49..4dbbe93e 100644 --- a/internal/controller/ngrok/kubernetsoperator_controller_test.go +++ b/internal/controller/ngrok/kubernetsoperator_controller_test.go @@ -31,7 +31,7 @@ func TestCalculateFeaturesEnabled(t *testing.T) { }, }, }, - expected: []string{"Bindings", "Ingress", "Gateway"}, + expected: []string{"bindings", "ingress", "gateway"}, }, }