Skip to content

Commit 8be3403

Browse files
author
Mridul Gain
authored
Merge pull request #29 from kubeslice/feature-slicegw-lb
feat(AM-11646): slicegw external lb changes
2 parents 3e194ed + 1ab0bfc commit 8be3403

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

pkg/controller/v1alpha1/sliceconfig_types.go

+13-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ type SliceConfigSpec struct {
3838
QosProfileDetails *QOSProfile `json:"qosProfileDetails,omitempty"` // FIXME: Add OneOf StandardQosProfileName vs QosProfileDetails
3939
NamespaceIsolationProfile NamespaceIsolationProfile `json:"namespaceIsolationProfile,omitempty"`
4040
ExternalGatewayConfig []ExternalGatewayConfig `json:"externalGatewayConfig,omitempty"`
41-
//+kubebuilder:default:=16
4241
//+kubebuilder:validation:Minimum=2
4342
//+kubebuilder:validation:Maximum=32
44-
MaxClusters int `json:"maxClusters"`
43+
//+kubebuilder:default:=16
44+
MaxClusters int `json:"maxClusters,omitempty"`
4545
//+kubebuilder:validation:Minimum=30
4646
//+kubebuilder:validation:Maximum=90
4747
//+kubebuilder:default:=30
@@ -74,6 +74,17 @@ type WorkerSliceGatewayProvider struct {
7474
//+kubebuilder:default:=Local
7575
// +kubebuilder:validation:Required
7676
SliceCaType string `json:"sliceCaType"`
77+
78+
SliceGatewayServiceType []SliceGatewayServiceType `json:"sliceGatewayServiceType,omitempty"`
79+
}
80+
81+
type SliceGatewayServiceType struct {
82+
// +kubebuilder:validation:Required
83+
Cluster string `json:"cluster"`
84+
// +kubebuilder:validation:Required
85+
//+kubebuilder:default:=NodePort
86+
//+kubebuilder:validation:Enum:=NodePort;LoadBalancer
87+
Type string `json:"type"`
7788
}
7889

7990
// QOSProfile is the QOS Profile configuration from backend

pkg/worker/v1alpha1/workersliceconfig_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ type WorkerSliceGatewayProvider struct {
5959
SliceGatewayType string `json:"sliceGatewayType,omitempty"`
6060
//+kubebuilder:default:=Local
6161
SliceCaType string `json:"sliceCaType,omitempty"`
62+
//+kubebuilder:default:=NodePort
63+
//+kubebuilder:validation:Enum:=NodePort;LoadBalancer
64+
SliceGatewayServiceType string `json:"sliceGatewayServiceType,omitempty"`
6265
}
6366

6467
// QOSProfile is the QOS Profile configuration from backend

pkg/worker/v1alpha1/workerslicegateway_types.go

+18-13
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,27 @@ type WorkerSliceGatewaySpec struct {
2929
//+kubebuilder:default:=OpenVPN
3030
GatewayType string `json:"gatewayType,omitempty"`
3131
//+kubebuilder:validation:Enum:=Client;Server
32-
GatewayHostType string `json:"gatewayHostType,omitempty"`
33-
GatewayCredentials GatewayCredentials `json:"gatewayCredentials,omitempty"`
34-
LocalGatewayConfig SliceGatewayConfig `json:"localGatewayConfig,omitempty"`
35-
RemoteGatewayConfig SliceGatewayConfig `json:"remoteGatewayConfig,omitempty"`
36-
GatewayNumber int `json:"gatewayNumber,omitempty"`
32+
GatewayHostType string `json:"gatewayHostType,omitempty"`
33+
//+kubebuilder:default:=NodePort
34+
//+kubebuilder:validation:Enum:=NodePort;LoadBalancer
35+
GatewayConnectivityType string `json:"gatewayConnectivityType,omitempty"`
36+
GatewayCredentials GatewayCredentials `json:"gatewayCredentials,omitempty"`
37+
LocalGatewayConfig SliceGatewayConfig `json:"localGatewayConfig,omitempty"`
38+
RemoteGatewayConfig SliceGatewayConfig `json:"remoteGatewayConfig,omitempty"`
39+
GatewayNumber int `json:"gatewayNumber,omitempty"`
3740
}
3841

3942
type SliceGatewayConfig struct {
40-
NodeIp string `json:"nodeIp,omitempty"`
41-
NodeIps []string `json:"nodeIps,omitempty"`
42-
NodePort int `json:"nodePort,omitempty"`
43-
NodePorts []int `json:"nodePorts,omitempty"`
44-
GatewayName string `json:"gatewayName,omitempty"`
45-
ClusterName string `json:"clusterName,omitempty"`
46-
VpnIp string `json:"vpnIp,omitempty"`
47-
GatewaySubnet string `json:"gatewaySubnet,omitempty"`
43+
//+kubebuilder:deprecatedversion:warning="worker/v1alpha1 NodeIp is deprecated...use NodeIps"
44+
NodeIp string `json:"nodeIp,omitempty"`
45+
NodeIps []string `json:"nodeIps,omitempty"`
46+
LoadBalancerIps []string `json:"loadBalancerIps,omitempty"`
47+
NodePort int `json:"nodePort,omitempty"`
48+
NodePorts []int `json:"nodePorts,omitempty"`
49+
GatewayName string `json:"gatewayName,omitempty"`
50+
ClusterName string `json:"clusterName,omitempty"`
51+
VpnIp string `json:"vpnIp,omitempty"`
52+
GatewaySubnet string `json:"gatewaySubnet,omitempty"`
4853
}
4954

5055
type GatewayCredentials struct {

0 commit comments

Comments
 (0)