mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	promote grpcProbes to beta
This commit is contained in:
		
							
								
								
									
										2
									
								
								api/openapi-spec/swagger.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								api/openapi-spec/swagger.json
									
									
									
										generated
									
									
									
								
							@@ -9016,7 +9016,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 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": {
 | 
					        "httpGet": {
 | 
				
			||||||
          "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction",
 | 
					          "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4678,7 +4678,7 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          "grpc": {
 | 
					          "grpc": {
 | 
				
			||||||
            "$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 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": {
 | 
					          "httpGet": {
 | 
				
			||||||
            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
					            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3177,7 +3177,7 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          "grpc": {
 | 
					          "grpc": {
 | 
				
			||||||
            "$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 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": {
 | 
					          "httpGet": {
 | 
				
			||||||
            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
					            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2403,7 +2403,7 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          "grpc": {
 | 
					          "grpc": {
 | 
				
			||||||
            "$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 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": {
 | 
					          "httpGet": {
 | 
				
			||||||
            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
					            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2205,7 +2205,7 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          "grpc": {
 | 
					          "grpc": {
 | 
				
			||||||
            "$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 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": {
 | 
					          "httpGet": {
 | 
				
			||||||
            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
					            "$ref": "#/components/schemas/io.k8s.api.core.v1.HTTPGetAction",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2243,7 +2243,7 @@ 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 an alpha field and requires enabling GRPCContainerProbe feature gate.
 | 
						// This is a beta field and requires enabling GRPCContainerProbe feature gate.
 | 
				
			||||||
	// +featureGate=GRPCContainerProbe
 | 
						// +featureGate=GRPCContainerProbe
 | 
				
			||||||
	// +optional
 | 
						// +optional
 | 
				
			||||||
	GRPC *GRPCAction
 | 
						GRPC *GRPCAction
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -813,9 +813,10 @@ const (
 | 
				
			|||||||
	// Allow users to recover from volume expansion failure
 | 
						// Allow users to recover from volume expansion failure
 | 
				
			||||||
	RecoverVolumeExpansionFailure featuregate.Feature = "RecoverVolumeExpansionFailure"
 | 
						RecoverVolumeExpansionFailure featuregate.Feature = "RecoverVolumeExpansionFailure"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// owner: @yuzhiquan, @bowei, @PxyUp
 | 
						// owner: @yuzhiquan, @bowei, @PxyUp, @SergeyKanzhelev
 | 
				
			||||||
	// kep: http://kep.k8s.io/2727
 | 
						// kep: http://kep.k8s.io/2727
 | 
				
			||||||
	// alpha: v1.23
 | 
						// alpha: v1.23
 | 
				
			||||||
 | 
						// beta: v1.24
 | 
				
			||||||
	//
 | 
						//
 | 
				
			||||||
	// 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"
 | 
				
			||||||
@@ -945,7 +946,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
 | 
				
			|||||||
	PodAndContainerStatsFromCRI:                    {Default: false, PreRelease: featuregate.Alpha},
 | 
						PodAndContainerStatsFromCRI:                    {Default: false, PreRelease: featuregate.Alpha},
 | 
				
			||||||
	HonorPVReclaimPolicy:                           {Default: false, PreRelease: featuregate.Alpha},
 | 
						HonorPVReclaimPolicy:                           {Default: false, PreRelease: featuregate.Alpha},
 | 
				
			||||||
	RecoverVolumeExpansionFailure:                  {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},
 | 
						LegacyServiceAccountTokenNoAutoGeneration:      {Default: true, PreRelease: featuregate.Beta},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// inherited features from generic apiserver, relisted here to get a conflict if it is changed
 | 
						// inherited features from generic apiserver, relisted here to get a conflict if it is changed
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								pkg/generated/openapi/zz_generated.openapi.go
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								pkg/generated/openapi/zz_generated.openapi.go
									
									
									
										generated
									
									
									
								
							@@ -22648,7 +22648,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 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"),
 | 
												Ref:         ref("k8s.io/api/core/v1.GRPCAction"),
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
@@ -22729,7 +22729,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 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"),
 | 
												Ref:         ref("k8s.io/api/core/v1.GRPCAction"),
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4011,7 +4011,7 @@ 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 an alpha field and requires enabling GRPCContainerProbe feature gate.
 | 
					  // This is a beta field and requires enabling GRPCContainerProbe feature gate.
 | 
				
			||||||
  // +featureGate=GRPCContainerProbe
 | 
					  // +featureGate=GRPCContainerProbe
 | 
				
			||||||
  // +optional
 | 
					  // +optional
 | 
				
			||||||
  optional GRPCAction grpc = 4;
 | 
					  optional GRPCAction grpc = 4;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2462,7 +2462,7 @@ 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 an alpha field and requires enabling GRPCContainerProbe feature gate.
 | 
						// This is a beta field and requires enabling GRPCContainerProbe feature gate.
 | 
				
			||||||
	// +featureGate=GRPCContainerProbe
 | 
						// +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"`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1808,7 +1808,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 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 {
 | 
					func (ProbeHandler) SwaggerDoc() map[string]string {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -519,10 +519,7 @@ var _ = SIGDescribe("Probing container", func() {
 | 
				
			|||||||
		Testname: Pod liveness probe, using grpc call, success
 | 
							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.
 | 
							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() {
 | 
						ginkgo.It("should *not* be restarted with a GRPC liveness probe [NodeConformance]", func() {
 | 
				
			||||||
		// TODO(SergeyKanzhelev): it is unclear when feature gates are not working as expected.
 | 
					 | 
				
			||||||
		//e2eskipper.SkipUnlessFeatureGateEnabled(kubefeatures.GRPCContainerProbe)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		livenessProbe := &v1.Probe{
 | 
							livenessProbe := &v1.Probe{
 | 
				
			||||||
			ProbeHandler: v1.ProbeHandler{
 | 
								ProbeHandler: v1.ProbeHandler{
 | 
				
			||||||
				GRPC: &v1.GRPCAction{
 | 
									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.
 | 
								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.
 | 
							                 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() {
 | 
						ginkgo.It("should be restarted with a GRPC liveness probe [NodeConformance]", func() {
 | 
				
			||||||
		// TODO(SergeyKanzhelev): it is unclear when feature gates are not working as expected.
 | 
					 | 
				
			||||||
		//e2eskipper.SkipUnlessFeatureGateEnabled(kubefeatures.GRPCContainerProbe)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		livenessProbe := &v1.Probe{
 | 
							livenessProbe := &v1.Probe{
 | 
				
			||||||
			ProbeHandler: v1.ProbeHandler{
 | 
								ProbeHandler: v1.ProbeHandler{
 | 
				
			||||||
				GRPC: &v1.GRPCAction{
 | 
									GRPC: &v1.GRPCAction{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user