Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API changes for Vpc Service access #209

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions apis/controller/v1alpha1/sliceconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ const (
NONET NetworkType = "no-network"
)

// +kubebuilder:validation:Enum:=none;istio;envoy
type GatewayType string

const (
NONE GatewayType = "none"
ISTIO GatewayType = "istio"
ENVOY GatewayType = "envoy"
)

// SliceConfigSpec defines the desired state of SliceConfig
type SliceConfigSpec struct {
//+kubebuilder:default:=single-network
Expand Down Expand Up @@ -69,12 +78,17 @@ type SliceConfigSpec struct {

// ExternalGatewayConfig is the configuration for external gateways like 'istio', etc/
type ExternalGatewayConfig struct {
Ingress ExternalGatewayConfigOptions `json:"ingress,omitempty"`
Egress ExternalGatewayConfigOptions `json:"egress,omitempty"`
NsIngress ExternalGatewayConfigOptions `json:"nsIngress,omitempty"`
//+kubebuilder:validation:Enum:=none;istio
GatewayType string `json:"gatewayType,omitempty"`
Clusters []string `json:"clusters,omitempty"`
Ingress ExternalGatewayConfigOptions `json:"ingress,omitempty"`
Egress ExternalGatewayConfigOptions `json:"egress,omitempty"`
NsIngress ExternalGatewayConfigOptions `json:"nsIngress,omitempty"`
GatewayType GatewayType `json:"gatewayType,omitempty"`
Clusters []string `json:"clusters,omitempty"`
VPCServiceAccess ServiceAccess `json:"vpcServiceAccess,omitempty"`
}

type ServiceAccess struct {
Ingress ExternalGatewayConfigOptions `json:"ingress,omitempty"`
Egress ExternalGatewayConfigOptions `json:"egress,omitempty"`
}

type ExternalGatewayConfigOptions struct {
Expand Down
18 changes: 18 additions & 0 deletions apis/controller/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions apis/worker/v1alpha1/workersliceconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ type NamespaceIsolationProfile struct {
}

type ExternalGatewayConfig struct {
Ingress ExternalGatewayConfigOptions `json:"ingress,omitempty"`
Egress ExternalGatewayConfigOptions `json:"egress,omitempty"`
NsIngress ExternalGatewayConfigOptions `json:"nsIngress,omitempty"`
//+kubebuilder:validation:Enum:=none;istio
GatewayType string `json:"gatewayType,omitempty"`
Ingress ExternalGatewayConfigOptions `json:"ingress,omitempty"`
Egress ExternalGatewayConfigOptions `json:"egress,omitempty"`
NsIngress ExternalGatewayConfigOptions `json:"nsIngress,omitempty"`
GatewayType controllerv1alpha1.GatewayType `json:"gatewayType,omitempty"`
VPCServiceAccess controllerv1alpha1.ServiceAccess `json:"vpcServiceAccess,omitempty"`
}

type ExternalGatewayConfigOptions struct {
Expand Down
1 change: 1 addition & 0 deletions apis/worker/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions config/crd/bases/controller.kubeslice.io_sliceconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ spec:
enum:
- none
- istio
- envoy
type: string
ingress:
properties:
Expand All @@ -68,6 +69,19 @@ spec:
enabled:
type: boolean
type: object
vpcServiceAccess:
properties:
egress:
properties:
enabled:
type: boolean
type: object
ingress:
properties:
enabled:
type: boolean
type: object
type: object
type: object
type: array
maxClusters:
Expand Down
14 changes: 14 additions & 0 deletions config/crd/bases/worker.kubeslice.io_workersliceconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
enum:
- none
- istio
- envoy
type: string
ingress:
properties:
Expand All @@ -59,6 +60,19 @@ spec:
enabled:
type: boolean
type: object
vpcServiceAccess:
properties:
egress:
properties:
enabled:
type: boolean
type: object
ingress:
properties:
enabled:
type: boolean
type: object
type: object
type: object
ipamClusterOctet:
type: integer
Expand Down
Loading