Skip to content

Commit

Permalink
feat(AM-12243): api changes for envoy gw (#31)
Browse files Browse the repository at this point in the history
* feat(AM-12243): api changes for envoy gw

Signed-off-by: Mridul <[email protected]>

* service discovery port change for multinet slice

Signed-off-by: Mridul Gain <[email protected]>

---------

Signed-off-by: Mridul <[email protected]>
Signed-off-by: Mridul Gain <[email protected]>
  • Loading branch information
mridulgain authored Feb 15, 2024
1 parent ca32055 commit 115db71
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 24 deletions.
26 changes: 15 additions & 11 deletions pkg/controller/v1alpha1/serviceexportconfig_types.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright (c) 2022 Avesha, Inc. All rights reserved. # # SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2022 Avesha, Inc. All rights reserved. # # SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package v1alpha1
Expand Down Expand Up @@ -57,10 +57,14 @@ type ServiceDiscoveryEndpoint struct {
type ServiceDiscoveryPort struct {
// The name of the port.
Name string `json:"name,omitempty"`
// The port number.
// The target port number.
Port int32 `json:"port,omitempty"`
// The protocol.
Protocol string `json:"protocol,omitempty"`
// The port exposed by service
ServicePort int32 `json:"servicePort,omitempty"`
// The service protocol
ServiceProtocol string `json:"serviceProtocol,omitempty"`
}

type ServiceExportConfigStatus struct {
Expand Down
5 changes: 4 additions & 1 deletion pkg/controller/v1alpha1/sliceconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ import (

// SliceConfigSpec defines the desired state of SliceConfig
type SliceConfigSpec struct {
SliceSubnet string `json:"sliceSubnet,omitempty"`
//+kubebuilder:default:=single-network
//+kubebuilder:validation:Enum:=single-network;multi-network
OverlayNetworkDeploymentMode string `json:"overlayNetworkDeploymentMode,omitempty"`
SliceSubnet string `json:"sliceSubnet,omitempty"`
//+kubebuilder:default:=Application
SliceType string `json:"sliceType,omitempty"`
// +kubebuilder:validation:Required
Expand Down
22 changes: 21 additions & 1 deletion pkg/controller/v1alpha1/zz_generated.deepcopy.go

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

26 changes: 15 additions & 11 deletions pkg/worker/v1alpha1/workerserviceimport_types.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright (c) 2022 Avesha, Inc. All rights reserved. # # SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2022 Avesha, Inc. All rights reserved. # # SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package v1alpha1
Expand Down Expand Up @@ -58,10 +58,14 @@ type ServiceDiscoveryEndpoint struct {
type ServiceDiscoveryPort struct {
// The name of the port.
Name string `json:"name,omitempty"`
// The port number.
// The target port number.
Port int32 `json:"port,omitempty"`
// The protocol.
Protocol string `json:"protocol,omitempty"`
// The port exposed by service
ServicePort int32 `json:"servicePort,omitempty"`
// The service protocol
ServiceProtocol string `json:"serviceProtocol,omitempty"`
}

// WorkerServiceImportStatus defines the observed state of WorkerServiceImport
Expand Down
3 changes: 3 additions & 0 deletions pkg/worker/v1alpha1/workersliceconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ type WorkerSliceConfigSpec struct {
Octet *int `json:"octet"`
ClusterSubnetCIDR string `json:"clusterSubnetCIDR,omitempty"`
ExternalGatewayConfig ExternalGatewayConfig `json:"externalGatewayConfig,omitempty"`
//+kubebuilder:default:=single-network
//+kubebuilder:validation:Enum:=single-network;multi-network
OverlayNetworkDeploymentMode string `json:"overlayNetworkDeploymentMode,omitempty"`
}

// WorkerSliceGatewayProvider defines the configuration for slicegateway
Expand Down
5 changes: 5 additions & 0 deletions pkg/worker/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 115db71

Please sign in to comment.