mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #116233 from SergeyKanzhelev/GRPCContainerProbeGA
GRPCContainerProbe is GA
This commit is contained in:
commit
6260796b63
2
api/openapi-spec/swagger.json
generated
2
api/openapi-spec/swagger.json
generated
@ -8192,7 +8192,7 @@
|
|||||||
},
|
},
|
||||||
"grpc": {
|
"grpc": {
|
||||||
"$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction",
|
"$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": {
|
"httpGet": {
|
||||||
"$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction",
|
"$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction",
|
||||||
|
@ -5687,7 +5687,7 @@
|
|||||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
|
"$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": {
|
"httpGet": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -3891,7 +3891,7 @@
|
|||||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
|
"$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": {
|
"httpGet": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -3065,7 +3065,7 @@
|
|||||||
"$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction"
|
"$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": {
|
"httpGet": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -2326,8 +2326,6 @@ type ProbeHandler struct {
|
|||||||
TCPSocket *TCPSocketAction
|
TCPSocket *TCPSocketAction
|
||||||
|
|
||||||
// GRPC specifies an action involving a GRPC port.
|
// GRPC specifies an action involving a GRPC port.
|
||||||
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
|
|
||||||
// +featureGate=GRPCContainerProbe
|
|
||||||
// +optional
|
// +optional
|
||||||
GRPC *GRPCAction
|
GRPC *GRPCAction
|
||||||
}
|
}
|
||||||
|
@ -298,6 +298,7 @@ const (
|
|||||||
// kep: https://kep.k8s.io/2727
|
// kep: https://kep.k8s.io/2727
|
||||||
// alpha: v1.23
|
// alpha: v1.23
|
||||||
// beta: v1.24
|
// beta: v1.24
|
||||||
|
// stable: v1.27
|
||||||
//
|
//
|
||||||
// Enables GRPC probe method for {Liveness,Readiness,Startup}Probe.
|
// Enables GRPC probe method for {Liveness,Readiness,Startup}Probe.
|
||||||
GRPCContainerProbe featuregate.Feature = "GRPCContainerProbe"
|
GRPCContainerProbe featuregate.Feature = "GRPCContainerProbe"
|
||||||
@ -934,7 +935,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
|
|
||||||
ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: featuregate.Beta},
|
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},
|
GracefulNodeShutdown: {Default: true, PreRelease: featuregate.Beta},
|
||||||
|
|
||||||
|
4
pkg/generated/openapi/zz_generated.openapi.go
generated
4
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -24174,7 +24174,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI
|
|||||||
},
|
},
|
||||||
"grpc": {
|
"grpc": {
|
||||||
SchemaProps: spec.SchemaProps{
|
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"),
|
Ref: ref("k8s.io/api/core/v1.GRPCAction"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -24255,7 +24255,7 @@ func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.
|
|||||||
},
|
},
|
||||||
"grpc": {
|
"grpc": {
|
||||||
SchemaProps: spec.SchemaProps{
|
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"),
|
Ref: ref("k8s.io/api/core/v1.GRPCAction"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -23,9 +23,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
|
||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
kubefeatures "k8s.io/kubernetes/pkg/features"
|
|
||||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/events"
|
"k8s.io/kubernetes/pkg/kubelet/events"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/prober/results"
|
"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)
|
return pb.tcp.Probe(host, port, timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.GRPCContainerProbe) && p.GRPC != nil {
|
if p.GRPC != nil {
|
||||||
host := status.PodIP
|
host := status.PodIP
|
||||||
service := ""
|
service := ""
|
||||||
if p.GRPC.Service != nil {
|
if p.GRPC.Service != nil {
|
||||||
|
@ -4170,8 +4170,6 @@ message ProbeHandler {
|
|||||||
optional TCPSocketAction tcpSocket = 3;
|
optional TCPSocketAction tcpSocket = 3;
|
||||||
|
|
||||||
// GRPC specifies an action involving a GRPC port.
|
// GRPC specifies an action involving a GRPC port.
|
||||||
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
|
|
||||||
// +featureGate=GRPCContainerProbe
|
|
||||||
// +optional
|
// +optional
|
||||||
optional GRPCAction grpc = 4;
|
optional GRPCAction grpc = 4;
|
||||||
}
|
}
|
||||||
|
@ -2548,8 +2548,6 @@ type ProbeHandler struct {
|
|||||||
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
|
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
|
||||||
|
|
||||||
// GRPC specifies an action involving a GRPC port.
|
// GRPC specifies an action involving a GRPC port.
|
||||||
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
|
|
||||||
// +featureGate=GRPCContainerProbe
|
|
||||||
// +optional
|
// +optional
|
||||||
GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"`
|
GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"`
|
||||||
}
|
}
|
||||||
|
@ -1856,7 +1856,7 @@ var map_ProbeHandler = map[string]string{
|
|||||||
"exec": "Exec specifies the action to take.",
|
"exec": "Exec specifies the action to take.",
|
||||||
"httpGet": "HTTPGet specifies the http request to perform.",
|
"httpGet": "HTTPGet specifies the http request to perform.",
|
||||||
"tcpSocket": "TCPSocket specifies an action involving a TCP port.",
|
"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 {
|
func (ProbeHandler) SwaggerDoc() map[string]string {
|
||||||
|
Loading…
Reference in New Issue
Block a user