update the grpc field name for consistency

This commit is contained in:
Sergey Kanzhelev
2021-12-01 18:16:08 +00:00
parent 108c284a33
commit 1918ecad04
2 changed files with 3 additions and 3 deletions

View File

@@ -2882,10 +2882,10 @@ func validateHandler(handler commonHandler, fldPath *field.Path) field.ErrorList
}
if handler.GRPC != nil {
if numHandlers > 0 {
allErrors = append(allErrors, field.Forbidden(fldPath.Child("gRPC"), "may not specify more than 1 handler type"))
allErrors = append(allErrors, field.Forbidden(fldPath.Child("grpc"), "may not specify more than 1 handler type"))
} else {
numHandlers++
allErrors = append(allErrors, validateGRPCAction(handler.GRPC, fldPath.Child("gRPC"))...)
allErrors = append(allErrors, validateGRPCAction(handler.GRPC, fldPath.Child("grpc"))...)
}
}
if numHandlers == 0 {

View File

@@ -2468,7 +2468,7 @@ type ProbeHandler struct {
// This is an alpha field and requires enabling GRPCContainerProbe feature gate.
// +featureGate=GRPCContainerProbe
// +optional
GRPC *GRPCAction `json:"gRPC,omitempty" protobuf:"bytes,4,opt,name=grpc"`
GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"`
}
// LifecycleHandler defines a specific action that should be taken in a lifecycle