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

feat(AM-12243): api changes for envoy gw #31

Merged
merged 2 commits into from
Feb 15, 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: 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.

Loading