From 79c3aee7467288fe1b0fb99778aa701b8040d98e Mon Sep 17 00:00:00 2001 From: Skye Gill Date: Tue, 14 Mar 2023 16:35:53 +0000 Subject: [PATCH] naming change Signed-off-by: Skye Gill --- apis/core/v1alpha1/clientsideconfiguration_types.go | 2 +- .../core.openfeature.dev_clientsideconfigurations.yaml | 8 ++++---- config/samples/dev.yaml | 2 +- controllers/clientsideconfiguration_controller.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apis/core/v1alpha1/clientsideconfiguration_types.go b/apis/core/v1alpha1/clientsideconfiguration_types.go index b09a8f231..0773b7aca 100644 --- a/apis/core/v1alpha1/clientsideconfiguration_types.go +++ b/apis/core/v1alpha1/clientsideconfiguration_types.go @@ -32,7 +32,7 @@ type ClientSideConfigurationSpec struct { GatewayName string `json:"gatewayName"` HTTPRouteHostname string `json:"httpRouteHostname"` HTTPRouteName string `json:"httpRouteName"` - HTTPRoutePort int32 `json:"httpRoutePort"` + GatewayListenerPort int32 `json:"gatewayListenerPort"` FlagSourceConfiguration string `json:"flagSourceConfiguration"` GatewayClassName string `json:"gatewayClassName"` CorsAllowOrigin string `json:"corsAllowOrigin"` diff --git a/config/crd/bases/core.openfeature.dev_clientsideconfigurations.yaml b/config/crd/bases/core.openfeature.dev_clientsideconfigurations.yaml index e411ecb4c..9b8a8354d 100644 --- a/config/crd/bases/core.openfeature.dev_clientsideconfigurations.yaml +++ b/config/crd/bases/core.openfeature.dev_clientsideconfigurations.yaml @@ -43,25 +43,25 @@ spec: type: string gatewayClassName: type: string + gatewayListenerPort: + format: int32 + type: integer gatewayName: type: string httpRouteHostname: type: string httpRouteName: type: string - httpRoutePort: - format: int32 - type: integer serviceAccountName: type: string required: - corsAllowOrigin - flagSourceConfiguration - gatewayClassName + - gatewayListenerPort - gatewayName - httpRouteHostname - httpRouteName - - httpRoutePort - serviceAccountName type: object status: diff --git a/config/samples/dev.yaml b/config/samples/dev.yaml index 5323c72bf..ef0a2e8c6 100644 --- a/config/samples/dev.yaml +++ b/config/samples/dev.yaml @@ -123,6 +123,6 @@ spec: httpRouteName: clientsidegatewayhttproute httpRouteHostname: flagd.ofoclientapp.com serviceAccountName: default - httpRoutePort: 80 + gatewayListenerPort: 80 corsAllowOrigin: "http://ofoclientapp.com:8080" --- diff --git a/controllers/clientsideconfiguration_controller.go b/controllers/clientsideconfiguration_controller.go index 49add2d35..e7044bf24 100644 --- a/controllers/clientsideconfiguration_controller.go +++ b/controllers/clientsideconfiguration_controller.go @@ -190,7 +190,7 @@ func (r *ClientSideConfigurationReconciler) Reconcile(ctx context.Context, req c Name: clientSideGatewayListenerName, Hostname: &hostname, Protocol: gatewayv1beta1.HTTPProtocolType, - Port: gatewayv1beta1.PortNumber(csconf.Spec.HTTPRoutePort), + Port: gatewayv1beta1.PortNumber(csconf.Spec.GatewayListenerPort), AllowedRoutes: &gatewayv1beta1.AllowedRoutes{ Namespaces: &gatewayv1beta1.RouteNamespaces{ From: &namespacesFromSame, @@ -209,7 +209,7 @@ func (r *ClientSideConfigurationReconciler) Reconcile(ctx context.Context, req c Name: clientSideGatewayListenerName, Hostname: &hostname, Protocol: gatewayv1beta1.HTTPProtocolType, - Port: gatewayv1beta1.PortNumber(csconf.Spec.HTTPRoutePort), + Port: gatewayv1beta1.PortNumber(csconf.Spec.GatewayListenerPort), AllowedRoutes: &gatewayv1beta1.AllowedRoutes{ Namespaces: &gatewayv1beta1.RouteNamespaces{ From: &namespacesFromSame,