Skip to content

Commit 8116563

Browse files
authored
Merge pull request #779 from Tharsanan1/remove-gateway-class-name
Remove gatewayClassName from APIGateway CRD
2 parents f357590 + e60bbe6 commit 8116563

8 files changed

Lines changed: 5 additions & 30 deletions

File tree

.github/workflows/operator-integration-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,6 @@ jobs:
841841
name: test-gateway
842842
namespace: default
843843
spec:
844-
gatewayClassName: "test"
845844
apiSelector:
846845
scope: Cluster
847846
configRef:
@@ -1296,7 +1295,6 @@ jobs:
12961295
name: scoped-gateway
12971296
namespace: scoped-test
12981297
spec:
1299-
gatewayClassName: "test"
13001298
apiSelector:
13011299
scope: Cluster
13021300
configRef:

kubernetes/gateway-operator/api/v1alpha1/apigateway_types.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ type GatewayInfrastructure struct {
9999

100100
// GatewaySpec defines the desired state of APIGateway
101101
type GatewaySpec struct {
102-
// GatewayClassName is an optional identifier for grouping gateways
103-
// This can be used to categorize gateways (e.g., "production", "development")
104-
// +optional
105-
GatewayClassName string `json:"gatewayClassName,omitempty"`
106-
107102
// APISelector defines how this gateway selects which APIs to route
108103
// +kubebuilder:validation:Required
109104
APISelector APISelector `json:"apiSelector"`

kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_apigateways.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ spec:
185185
type: object
186186
x-kubernetes-map-type: atomic
187187
type: object
188-
gatewayClassName:
189-
description: |-
190-
GatewayClassName is an optional identifier for grouping gateways
191-
This can be used to categorize gateways (e.g., "production", "development")
192-
type: string
193188
infrastructure:
194189
description: Infrastructure defines the deployment configuration for
195190
the gateway

kubernetes/gateway-operator/config/samples/api_v1_apigateway.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ kind: APIGateway
66
metadata:
77
name: cluster-gateway
88
spec:
9-
gatewayClassName: "production"
10-
119
apiSelector:
1210
scope: Cluster
1311

kubernetes/gateway-operator/config/samples/gateway-custom-config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,6 @@ data:
586586
# name: custom-gateway
587587
# namespace: default
588588
# spec:
589-
# gatewayClassName: production
590-
591589
# apiSelector:
592590
# scope: LabelSelector
593591
# matchLabels:
@@ -615,8 +613,6 @@ metadata:
615613
name: default-gateway
616614
namespace: default
617615
spec:
618-
gatewayClassName: development-1
619-
620616
apiSelector:
621617
scope: Cluster
622618

kubernetes/gateway-operator/internal/controller/apigateway_controller.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -885,12 +885,11 @@ func (r *GatewayReconciler) registerGateway(ctx context.Context, gatewayConfig *
885885

886886
// Create gateway info for registry
887887
gatewayInfo := &registry.GatewayInfo{
888-
Name: gatewayConfig.Name,
889-
Namespace: namespace,
890-
GatewayClassName: gatewayConfig.Spec.GatewayClassName,
891-
APISelector: &gatewayConfig.Spec.APISelector,
892-
ServiceName: service.Name,
893-
ServicePort: restPort,
888+
Name: gatewayConfig.Name,
889+
Namespace: namespace,
890+
APISelector: &gatewayConfig.Spec.APISelector,
891+
ServiceName: service.Name,
892+
ServicePort: restPort,
894893
}
895894

896895
if gatewayConfig.Spec.ControlPlane != nil {

kubernetes/gateway-operator/internal/registry/gateway_registry.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
type GatewayInfo struct {
2929
Name string
3030
Namespace string
31-
GatewayClassName string
3231
APISelector *apiv1.APISelector
3332
ServiceName string // Name of the gateway controller service
3433
ServicePort int32 // Port of the gateway controller API

kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_apigateways.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ spec:
185185
type: object
186186
x-kubernetes-map-type: atomic
187187
type: object
188-
gatewayClassName:
189-
description: |-
190-
GatewayClassName is an optional identifier for grouping gateways
191-
This can be used to categorize gateways (e.g., "production", "development")
192-
type: string
193188
infrastructure:
194189
description: Infrastructure defines the deployment configuration for
195190
the gateway

0 commit comments

Comments
 (0)