Skip to content

Commit

Permalink
fix: rename ServiceName to Service in the gRPC active health check st…
Browse files Browse the repository at this point in the history
…ructure. (#4063)

* Rename ServiceName to Service in the gRPC active health check structure.

Signed-off-by: Lior Okman <lior.okman@sap.com>

* Make gen-check happy.

Signed-off-by: Lior Okman <lior.okman@sap.com>

---------

Signed-off-by: Lior Okman <lior.okman@sap.com>
  • Loading branch information
liorokman authored Aug 16, 2024
1 parent 27de4b1 commit cf6b325
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/healthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ type TCPActiveHealthChecker struct {

// GRPCActiveHealthChecker defines the settings of the GRPC health check.
type GRPCActiveHealthChecker struct {
// ServiceName to send in the health check request.
// Service to send in the health check request.
// If this is not specified, then the health check request applies to the entire
// server and not to a specific service.
// +optional
ServiceName *string `json:"serviceName,omitempty" yaml:"serviceName,omitempty"`
Service *string `json:"service,omitempty" yaml:"service,omitempty"`
}

// ActiveHealthCheckPayloadType is the type of the payload.
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10595,9 +10595,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down Expand Up @@ -11485,9 +11485,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down Expand Up @@ -12447,9 +12447,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down Expand Up @@ -13349,9 +13349,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down Expand Up @@ -1337,9 +1337,9 @@ spec:
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
properties:
serviceName:
service:
description: |-
ServiceName to send in the health check request.
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
type: string
Expand Down
2 changes: 1 addition & 1 deletion internal/gatewayapi/clustersettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func buildActiveHealthCheck(policy egv1a1.HealthCheck) *ir.ActiveHealthCheck {
irHC.TCP = buildTCPActiveHealthChecker(hc.TCP)
case egv1a1.ActiveHealthCheckerTypeGRPC:
irHC.GRPC = &ir.GRPCHealthChecker{
ServiceName: ptr.Deref(hc.GRPC, egv1a1.GRPCActiveHealthChecker{}).ServiceName,
Service: ptr.Deref(hc.GRPC, egv1a1.GRPCActiveHealthChecker{}).Service,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,5 @@ backendTrafficPolicies:
healthyThreshold: 1
type: GRPC
grpc:
serviceName: foo-service
service: foo-service

Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ backendTrafficPolicies:
healthCheck:
active:
grpc:
serviceName: foo-service
service: foo-service
healthyThreshold: 1
interval: 3s
timeout: 1s
Expand Down Expand Up @@ -676,7 +676,7 @@ xdsIR:
healthCheck:
active:
grpc:
serviceName: foo-service
service: foo-service
healthyThreshold: 1
interval: 3s
timeout: 1s
Expand Down
4 changes: 2 additions & 2 deletions internal/ir/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -2108,10 +2108,10 @@ func (h HTTPStatus) Validate() error {
// GRPCHealthChecker defines the settings of the gRPC health check.
// +k8s:deepcopy-gen=true
type GRPCHealthChecker struct {
// ServiceName is the name of a specific service hosted by the server for
// Service is the name of a specific service hosted by the server for
// which the health check should be requested. If not specified, then the default
// is to send a health check request for the entire server.
ServiceName *string `json:"serviceName,omitempty" yaml:"serviceName,omitempty"`
Service *string `json:"service,omitempty" yaml:"service,omitempty"`
}

// TCPHealthChecker defines the settings of tcp health check.
Expand Down
4 changes: 2 additions & 2 deletions internal/ir/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion internal/xds/translator/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func buildXdsHealthCheck(healthcheck *ir.ActiveHealthCheck) []*corev3.HealthChec
case healthcheck.GRPC != nil:
hc.HealthChecker = &corev3.HealthCheck_GrpcHealthCheck_{
GrpcHealthCheck: &corev3.HealthCheck_GrpcHealthCheck{
ServiceName: ptr.Deref(healthcheck.GRPC.ServiceName, ""),
ServiceName: ptr.Deref(healthcheck.GRPC.Service, ""),
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ http:
unhealthyThreshold: 3
healthyThreshold: 3
grpc:
serviceName: my-service
service: my-service
destination:
name: "fifth-route-dest"
protocol: GRPC
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ _Appears in:_

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceName` | _string_ | false | ServiceName to send in the health check request.<br />If this is not specified, then the health check request applies to the entire<br />server and not to a specific service. |
| `service` | _string_ | false | Service to send in the health check request.<br />If this is not specified, then the health check request applies to the entire<br />server and not to a specific service. |


#### GRPCExtAuthService
Expand Down
2 changes: 1 addition & 1 deletion site/content/zh/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ _Appears in:_

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceName` | _string_ | false | ServiceName to send in the health check request.<br />If this is not specified, then the health check request applies to the entire<br />server and not to a specific service. |
| `service` | _string_ | false | Service to send in the health check request.<br />If this is not specified, then the health check request applies to the entire<br />server and not to a specific service. |


#### GRPCExtAuthService
Expand Down

0 comments on commit cf6b325

Please sign in to comment.