From 696a035c08a4b780f84ca542593a31008c93bac6 Mon Sep 17 00:00:00 2001 From: Mridul Date: Wed, 25 Oct 2023 20:16:37 +0530 Subject: [PATCH] feat(AM-11741): specify protocol for slice gw LB Signed-off-by: Mridul --- pkg/controller/v1alpha1/sliceconfig_types.go | 4 ++++ pkg/worker/v1alpha1/workersliceconfig_types.go | 3 +++ pkg/worker/v1alpha1/workerslicegateway_types.go | 13 ++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pkg/controller/v1alpha1/sliceconfig_types.go b/pkg/controller/v1alpha1/sliceconfig_types.go index 1a80d10..ce16514 100644 --- a/pkg/controller/v1alpha1/sliceconfig_types.go +++ b/pkg/controller/v1alpha1/sliceconfig_types.go @@ -85,6 +85,10 @@ type SliceGatewayServiceType struct { //+kubebuilder:default:=NodePort //+kubebuilder:validation:Enum:=NodePort;LoadBalancer Type string `json:"type"` + // +kubebuilder:validation:Required + //+kubebuilder:default:=UDP + //+kubebuilder:validation:Enum:=TCP;UDP + Protocol string `json:"protocol"` } // QOSProfile is the QOS Profile configuration from backend diff --git a/pkg/worker/v1alpha1/workersliceconfig_types.go b/pkg/worker/v1alpha1/workersliceconfig_types.go index 55125e1..3215b92 100644 --- a/pkg/worker/v1alpha1/workersliceconfig_types.go +++ b/pkg/worker/v1alpha1/workersliceconfig_types.go @@ -62,6 +62,9 @@ type WorkerSliceGatewayProvider struct { //+kubebuilder:default:=NodePort //+kubebuilder:validation:Enum:=NodePort;LoadBalancer SliceGatewayServiceType string `json:"sliceGatewayServiceType,omitempty"` + //+kubebuilder:default:=UDP + //+kubebuilder:validation:Enum:=TCP;UDP + SliceGatewayProtocol string `json:"sliceGatewayProtocol,omitempty"` } // QOSProfile is the QOS Profile configuration from backend diff --git a/pkg/worker/v1alpha1/workerslicegateway_types.go b/pkg/worker/v1alpha1/workerslicegateway_types.go index 06c39de..f0cdb00 100644 --- a/pkg/worker/v1alpha1/workerslicegateway_types.go +++ b/pkg/worker/v1alpha1/workerslicegateway_types.go @@ -32,11 +32,14 @@ type WorkerSliceGatewaySpec struct { GatewayHostType string `json:"gatewayHostType,omitempty"` //+kubebuilder:default:=NodePort //+kubebuilder:validation:Enum:=NodePort;LoadBalancer - GatewayConnectivityType string `json:"gatewayConnectivityType,omitempty"` - GatewayCredentials GatewayCredentials `json:"gatewayCredentials,omitempty"` - LocalGatewayConfig SliceGatewayConfig `json:"localGatewayConfig,omitempty"` - RemoteGatewayConfig SliceGatewayConfig `json:"remoteGatewayConfig,omitempty"` - GatewayNumber int `json:"gatewayNumber,omitempty"` + GatewayConnectivityType string `json:"gatewayConnectivityType,omitempty"` + //+kubebuilder:default:=UDP + //+kubebuilder:validation:Enum:=TCP;UDP + GatewayProtocol string `json:"gatewayProtocol,omitempty"` + GatewayCredentials GatewayCredentials `json:"gatewayCredentials,omitempty"` + LocalGatewayConfig SliceGatewayConfig `json:"localGatewayConfig,omitempty"` + RemoteGatewayConfig SliceGatewayConfig `json:"remoteGatewayConfig,omitempty"` + GatewayNumber int `json:"gatewayNumber,omitempty"` } type SliceGatewayConfig struct {