From 792a37e2f1ca80b4b7e82698ec5307fab6245ff5 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Fri, 4 Mar 2022 17:29:41 +0000 Subject: [PATCH] promote grpcProbes to beta --- api/openapi-spec/swagger.json | 2 +- api/openapi-spec/v3/api__v1_openapi.json | 2 +- api/openapi-spec/v3/apis__apps__v1_openapi.json | 2 +- api/openapi-spec/v3/apis__batch__v1_openapi.json | 2 +- api/openapi-spec/v3/apis__batch__v1beta1_openapi.json | 2 +- pkg/apis/core/types.go | 2 +- pkg/features/kube_features.go | 5 +++-- pkg/generated/openapi/zz_generated.openapi.go | 4 ++-- staging/src/k8s.io/api/core/v1/generated.proto | 2 +- staging/src/k8s.io/api/core/v1/types.go | 2 +- .../k8s.io/api/core/v1/types_swagger_doc_generated.go | 2 +- test/e2e/common/node/container_probe.go | 10 ++-------- 12 files changed, 16 insertions(+), 21 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 1e714c034f4..7649e18cf26 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -9016,7 +9016,7 @@ }, "grpc": { "$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate." + "description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate." }, "httpGet": { "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction", diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index ea82feb380d..09e16c51320 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -4678,7 +4678,7 @@ }, "grpc": { "$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate." + "description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate." }, "httpGet": { "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction", diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index ac57c66fdd2..e07a6a90f15 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -3177,7 +3177,7 @@ }, "grpc": { "$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate." + "description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate." }, "httpGet": { "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction", diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index ee06995acde..9814ed908f4 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -2403,7 +2403,7 @@ }, "grpc": { "$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate." + "description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate." }, "httpGet": { "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction", diff --git a/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json b/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json index ca8765a2635..879da096f9f 100644 --- a/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json @@ -2205,7 +2205,7 @@ }, "grpc": { "$ref": "#/components/schemas/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate." + "description": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate." }, "httpGet": { "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction", diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 17751be7822..0aeb893085f 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -2243,7 +2243,7 @@ type ProbeHandler struct { TCPSocket *TCPSocketAction // GRPC specifies an action involving a GRPC port. - // This is an alpha field and requires enabling GRPCContainerProbe feature gate. + // This is a beta field and requires enabling GRPCContainerProbe feature gate. // +featureGate=GRPCContainerProbe // +optional GRPC *GRPCAction diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 9145653ac17..b72214eaa84 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -813,9 +813,10 @@ const ( // Allow users to recover from volume expansion failure RecoverVolumeExpansionFailure featuregate.Feature = "RecoverVolumeExpansionFailure" - // owner: @yuzhiquan, @bowei, @PxyUp + // owner: @yuzhiquan, @bowei, @PxyUp, @SergeyKanzhelev // kep: http://kep.k8s.io/2727 // alpha: v1.23 + // beta: v1.24 // // Enables GRPC probe method for {Liveness,Readiness,Startup}Probe. GRPCContainerProbe featuregate.Feature = "GRPCContainerProbe" @@ -945,7 +946,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS PodAndContainerStatsFromCRI: {Default: false, PreRelease: featuregate.Alpha}, HonorPVReclaimPolicy: {Default: false, PreRelease: featuregate.Alpha}, RecoverVolumeExpansionFailure: {Default: false, PreRelease: featuregate.Alpha}, - GRPCContainerProbe: {Default: false, PreRelease: featuregate.Alpha}, + GRPCContainerProbe: {Default: true, PreRelease: featuregate.Beta}, LegacyServiceAccountTokenNoAutoGeneration: {Default: true, PreRelease: featuregate.Beta}, // inherited features from generic apiserver, relisted here to get a conflict if it is changed diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 621fd6e8a57..baf31895d3b 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -22648,7 +22648,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 an alpha field and requires enabling GRPCContainerProbe feature gate.", + Description: "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.", Ref: ref("k8s.io/api/core/v1.GRPCAction"), }, }, @@ -22729,7 +22729,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 an alpha field and requires enabling GRPCContainerProbe feature gate.", + Description: "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.", Ref: ref("k8s.io/api/core/v1.GRPCAction"), }, }, diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index 456670fff1e..4ff763a7dea 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -4011,7 +4011,7 @@ message ProbeHandler { optional TCPSocketAction tcpSocket = 3; // GRPC specifies an action involving a GRPC port. - // This is an alpha field and requires enabling GRPCContainerProbe feature gate. + // This is a beta field and requires enabling GRPCContainerProbe feature gate. // +featureGate=GRPCContainerProbe // +optional optional GRPCAction grpc = 4; diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 41dae3fba70..09ad2a085c6 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -2462,7 +2462,7 @@ type ProbeHandler struct { TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` // GRPC specifies an action involving a GRPC port. - // This is an alpha field and requires enabling GRPCContainerProbe feature gate. + // 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"` diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 125c37f2dff..dbe4bb9d0d8 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1808,7 +1808,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 an alpha field and requires enabling GRPCContainerProbe feature gate.", + "grpc": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.", } func (ProbeHandler) SwaggerDoc() map[string]string { diff --git a/test/e2e/common/node/container_probe.go b/test/e2e/common/node/container_probe.go index b9cbf3d66f2..ddbc40f0220 100644 --- a/test/e2e/common/node/container_probe.go +++ b/test/e2e/common/node/container_probe.go @@ -519,10 +519,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod liveness probe, using grpc call, success Description: A Pod is created with liveness probe on grpc service. Liveness probe on this endpoint will not fail. When liveness probe does not fail then the restart count MUST remain zero. */ - ginkgo.It("should *not* be restarted with a GRPC liveness probe [NodeAlphaFeature:GRPCContainerProbe][Feature:GRPCContainerProbe]", func() { - // TODO(SergeyKanzhelev): it is unclear when feature gates are not working as expected. - //e2eskipper.SkipUnlessFeatureGateEnabled(kubefeatures.GRPCContainerProbe) - + ginkgo.It("should *not* be restarted with a GRPC liveness probe [NodeConformance]", func() { livenessProbe := &v1.Probe{ ProbeHandler: v1.ProbeHandler{ GRPC: &v1.GRPCAction{ @@ -545,10 +542,7 @@ var _ = SIGDescribe("Probing container", func() { Description: A Pod is created with liveness probe on grpc service. Liveness probe on this endpoint should fail because of wrong probe port. When liveness probe does fail then the restart count should +1. */ - ginkgo.It("should be restarted with a GRPC liveness probe [NodeAlphaFeature:GRPCContainerProbe][Feature:GRPCContainerProbe]", func() { - // TODO(SergeyKanzhelev): it is unclear when feature gates are not working as expected. - //e2eskipper.SkipUnlessFeatureGateEnabled(kubefeatures.GRPCContainerProbe) - + ginkgo.It("should be restarted with a GRPC liveness probe [NodeConformance]", func() { livenessProbe := &v1.Probe{ ProbeHandler: v1.ProbeHandler{ GRPC: &v1.GRPCAction{