GRPCContainerProbe is GA

This commit is contained in:
Sergey Kanzhelev 2023-03-02 22:07:59 +00:00
parent 2898a044d9
commit e360de48b2
11 changed files with 10 additions and 17 deletions

View File

@ -8192,7 +8192,7 @@
},
"grpc": {
"$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction",
"description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate."
"description": "GRPC specifies an action involving a GRPC port."
},
"httpGet": {
"$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction",

View File

@ -5687,7 +5687,7 @@
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
}
],
"description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate."
"description": "GRPC specifies an action involving a GRPC port."
},
"httpGet": {
"allOf": [

View File

@ -3891,7 +3891,7 @@
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
}
],
"description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate."
"description": "GRPC specifies an action involving a GRPC port."
},
"httpGet": {
"allOf": [

View File

@ -3065,7 +3065,7 @@
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
}
],
"description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate."
"description": "GRPC specifies an action involving a GRPC port."
},
"httpGet": {
"allOf": [

View File

@ -2326,8 +2326,6 @@ type ProbeHandler struct {
TCPSocket *TCPSocketAction
// GRPC specifies an action involving a GRPC port.
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
// +featureGate=GRPCContainerProbe
// +optional
GRPC *GRPCAction
}

View File

@ -298,6 +298,7 @@ const (
// kep: https://kep.k8s.io/2727
// alpha: v1.23
// beta: v1.24
// stable: v1.27
//
// Enables GRPC probe method for {Liveness,Readiness,Startup}Probe.
GRPCContainerProbe featuregate.Feature = "GRPCContainerProbe"
@ -934,7 +935,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: featuregate.Beta},
GRPCContainerProbe: {Default: true, PreRelease: featuregate.Beta},
GRPCContainerProbe: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, //remove in 1.29
GracefulNodeShutdown: {Default: true, PreRelease: featuregate.Beta},

View File

@ -24174,7 +24174,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI
},
"grpc": {
SchemaProps: spec.SchemaProps{
Description: "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.",
Description: "GRPC specifies an action involving a GRPC port.",
Ref: ref("k8s.io/api/core/v1.GRPCAction"),
},
},
@ -24255,7 +24255,7 @@ func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.
},
"grpc": {
SchemaProps: spec.SchemaProps{
Description: "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.",
Description: "GRPC specifies an action involving a GRPC port.",
Ref: ref("k8s.io/api/core/v1.GRPCAction"),
},
},

View File

@ -23,9 +23,7 @@ import (
"time"
v1 "k8s.io/api/core/v1"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/record"
kubefeatures "k8s.io/kubernetes/pkg/features"
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
"k8s.io/kubernetes/pkg/kubelet/events"
"k8s.io/kubernetes/pkg/kubelet/prober/results"
@ -170,7 +168,7 @@ func (pb *prober) runProbe(ctx context.Context, probeType probeType, p *v1.Probe
return pb.tcp.Probe(host, port, timeout)
}
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.GRPCContainerProbe) && p.GRPC != nil {
if p.GRPC != nil {
host := status.PodIP
service := ""
if p.GRPC.Service != nil {

View File

@ -4170,8 +4170,6 @@ message ProbeHandler {
optional TCPSocketAction tcpSocket = 3;
// GRPC specifies an action involving a GRPC port.
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
// +featureGate=GRPCContainerProbe
// +optional
optional GRPCAction grpc = 4;
}

View File

@ -2548,8 +2548,6 @@ type ProbeHandler struct {
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
// GRPC specifies an action involving a GRPC port.
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
// +featureGate=GRPCContainerProbe
// +optional
GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"`
}

View File

@ -1856,7 +1856,7 @@ var map_ProbeHandler = map[string]string{
"exec": "Exec specifies the action to take.",
"httpGet": "HTTPGet specifies the http request to perform.",
"tcpSocket": "TCPSocket specifies an action involving a TCP port.",
"grpc": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.",
"grpc": "GRPC specifies an action involving a GRPC port.",
}
func (ProbeHandler) SwaggerDoc() map[string]string {