Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
  • Loading branch information
tao12345666333 committed Jan 17, 2024
1 parent 8643a3d commit 2fbe930
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ Adding a new version? You'll need three changes:
[#5354](https://github.com/Kong/kubernetes-ingress-controller/pull/5354)
[#5384](https://github.com/Kong/kubernetes-ingress-controller/pull/5384)
[#5435](https://github.com/Kong/kubernetes-ingress-controller/pull/5435)
- Add new flag `--gateway-to-reconcile` KIC can only reconciling the specified Gateway.
- Added flag `--gateway-to-reconcile` to set KIC to only reconcile
the specified Gateway resource in Kubernetes.
[#5405](https://github.com/Kong/kubernetes-ingress-controller/pull/5405)

### Fixed
Expand Down
3 changes: 1 addition & 2 deletions internal/controllers/gateway/gateway_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ func (r *GatewayReconciler) gatewayHasMatchingGatewayClass(obj client.Object) bo
return false
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down
6 changes: 2 additions & 4 deletions internal/controllers/gateway/grpcroute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ func (r *GRPCRouteReconciler) listGRPCRoutesForGatewayClass(ctx context.Context,
gateways := make(map[string]map[string]struct{})
for _, gateway := range gatewayList.Items {
if string(gateway.Spec.GatewayClassName) == gwc.Name {
// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down Expand Up @@ -230,8 +229,7 @@ func (r *GRPCRouteReconciler) listGRPCRoutesForGateway(ctx context.Context, obj
return nil
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gw.Namespace || gatewayToReconcile.Name != gw.Name {
Expand Down
6 changes: 2 additions & 4 deletions internal/controllers/gateway/httproute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ func (r *HTTPRouteReconciler) listHTTPRoutesForGatewayClass(ctx context.Context,
gateways := make(map[string]map[string]struct{})
for _, gateway := range gatewayList.Items {
if string(gateway.Spec.GatewayClassName) == gwc.Name {
// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down Expand Up @@ -304,8 +303,7 @@ func (r *HTTPRouteReconciler) listHTTPRoutesForGateway(ctx context.Context, obj
return nil
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gw.Namespace || gatewayToReconcile.Name != gw.Name {
Expand Down
3 changes: 1 addition & 2 deletions internal/controllers/gateway/route_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ func getSupportedGatewayForRoute[T gatewayapi.RouteT](ctx context.Context, logge
}
name := string(parentRef.Name)

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := specifiedGW.Get(); ok {
namespace = gatewayToReconcile.Namespace
Expand Down
6 changes: 2 additions & 4 deletions internal/controllers/gateway/tcproute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func (r *TCPRouteReconciler) listTCPRoutesForGatewayClass(ctx context.Context, o
gateways := make(map[string]map[string]struct{})
for _, gateway := range gatewayList.Items {
if string(gateway.Spec.GatewayClassName) == gwc.Name {
// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down Expand Up @@ -227,8 +226,7 @@ func (r *TCPRouteReconciler) listTCPRoutesForGateway(ctx context.Context, obj cl
return nil
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gw.Namespace || gatewayToReconcile.Name != gw.Name {
Expand Down
6 changes: 2 additions & 4 deletions internal/controllers/gateway/tlsroute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ func (r *TLSRouteReconciler) listTLSRoutesForGatewayClass(ctx context.Context, o
gateways := make(map[string]map[string]struct{})
for _, gateway := range gatewayList.Items {
if string(gateway.Spec.GatewayClassName) == gwc.Name {
// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down Expand Up @@ -226,8 +225,7 @@ func (r *TLSRouteReconciler) listTLSRoutesForGateway(ctx context.Context, obj cl
return nil
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gw.Namespace || gatewayToReconcile.Name != gw.Name {
Expand Down
6 changes: 2 additions & 4 deletions internal/controllers/gateway/udproute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ func (r *UDPRouteReconciler) listUDPRoutesForGatewayClass(ctx context.Context, o
gateways := make(map[string]map[string]struct{})
for _, gateway := range gatewayList.Items {
if string(gateway.Spec.GatewayClassName) == gwc.Name {
// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gateway.Namespace || gatewayToReconcile.Name != gateway.Name {
Expand Down Expand Up @@ -226,8 +225,7 @@ func (r *UDPRouteReconciler) listUDPRoutesForGateway(ctx context.Context, obj cl
return nil
}

// KIC introduced a new flag called `--gateway-to-reconcile`.
// If this flag is set, KIC will only reconcile the specified gateway.
// If the flag `--gateway-to-reconcile` is set, KIC will only reconcile the specified gateway.
// https://github.com/Kong/kubernetes-ingress-controller/issues/5322
if gatewayToReconcile, ok := r.GatewayNN.Get(); ok {
if gatewayToReconcile.Namespace != gw.Namespace || gatewayToReconcile.Name != gw.Name {
Expand Down

0 comments on commit 2fbe930

Please sign in to comment.