mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Rename experimental-runtime-integration-type to experimental-cri
This commit is contained in:
		@@ -221,8 +221,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
 | 
				
			|||||||
	fs.StringSliceVar(&s.AllowedUnsafeSysctls, "experimental-allowed-unsafe-sysctls", s.AllowedUnsafeSysctls, "Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk.")
 | 
						fs.StringSliceVar(&s.AllowedUnsafeSysctls, "experimental-allowed-unsafe-sysctls", s.AllowedUnsafeSysctls, "Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Flags intended for testing, not recommended used in production environments.
 | 
						// Flags intended for testing, not recommended used in production environments.
 | 
				
			||||||
	fs.StringVar(&s.RemoteRuntimeEndpoint, "container-runtime-endpoint", s.RemoteRuntimeEndpoint, "The unix socket endpoint of remote runtime service. This is an experimental feature. Intended for testing only.")
 | 
					 | 
				
			||||||
	fs.StringVar(&s.RemoteImageEndpoint, "image-service-endpoint", s.RemoteImageEndpoint, "The unix socket endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. This is an experimental feature. Intended for testing only.")
 | 
					 | 
				
			||||||
	fs.BoolVar(&s.ReallyCrashForTesting, "really-crash-for-testing", s.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.")
 | 
						fs.BoolVar(&s.ReallyCrashForTesting, "really-crash-for-testing", s.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.")
 | 
				
			||||||
	fs.Float64Var(&s.ChaosChance, "chaos-chance", s.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing. [default=0.0]")
 | 
						fs.Float64Var(&s.ChaosChance, "chaos-chance", s.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing. [default=0.0]")
 | 
				
			||||||
	fs.BoolVar(&s.Containerized, "containerized", s.Containerized, "Experimental support for running kubelet in a container.  Intended for testing. [default=false]")
 | 
						fs.BoolVar(&s.Containerized, "containerized", s.Containerized, "Experimental support for running kubelet in a container.  Intended for testing. [default=false]")
 | 
				
			||||||
@@ -249,7 +247,9 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
 | 
				
			|||||||
	fs.Int32Var(&s.PodsPerCore, "pods-per-core", s.PodsPerCore, "Number of Pods per core that can run on this Kubelet. The total number of Pods on this Kubelet cannot exceed max-pods, so max-pods will be used if this calculation results in a larger number of Pods allowed on the Kubelet. A value of 0 disables this limit.")
 | 
						fs.Int32Var(&s.PodsPerCore, "pods-per-core", s.PodsPerCore, "Number of Pods per core that can run on this Kubelet. The total number of Pods on this Kubelet cannot exceed max-pods, so max-pods will be used if this calculation results in a larger number of Pods allowed on the Kubelet. A value of 0 disables this limit.")
 | 
				
			||||||
	fs.BoolVar(&s.ProtectKernelDefaults, "protect-kernel-defaults", s.ProtectKernelDefaults, "Default kubelet behaviour for kernel tuning. If set, kubelet errors if any of kernel tunables is different than kubelet defaults.")
 | 
						fs.BoolVar(&s.ProtectKernelDefaults, "protect-kernel-defaults", s.ProtectKernelDefaults, "Default kubelet behaviour for kernel tuning. If set, kubelet errors if any of kernel tunables is different than kubelet defaults.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Hidden flags for experimental features that are still under development.
 | 
						// CRI flags.
 | 
				
			||||||
	fs.StringVar(&s.ExperimentalRuntimeIntegrationType, "experimental-runtime-integration-type", s.ExperimentalRuntimeIntegrationType, "Choose the integration path for the container runtime (specified via --container-runtime). Currently, this supports only Docker. If set to \"cri\", Kubelet will use interact with docker through the new Container Runtime Interface.")
 | 
						fs.BoolVar(&s.EnableCRI, "experimental-cri", s.EnableCRI, "[Experimental] Enable the Container Runtime Interface (CRI) integration. If --container-runtime is set to \"remote\", Kubelet will communicate with the runtime/image CRI server listening on the endpoint specified by --remote-runtime-endpoint/--remote-image-endpoint. If --container-runtime is set to \"docker\", Kubelet will launch a in-process CRI server on behalf of docker, and communicate over a default endpoint.")
 | 
				
			||||||
	fs.MarkHidden("experimental-runtime-integration-type")
 | 
						fs.StringVar(&s.RemoteRuntimeEndpoint, "container-runtime-endpoint", s.RemoteRuntimeEndpoint, "[Experimental] The unix socket endpoint of remote runtime service. The endpoint is used only when CRI integration is enabled (--experimental-cri)")
 | 
				
			||||||
 | 
						fs.StringVar(&s.RemoteImageEndpoint, "image-service-endpoint", s.RemoteImageEndpoint, "[Experimental] The unix socket endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. The endpoint is used only when CRI integration is enabled (--experimental-cri)")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -443,7 +443,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
 | 
				
			|||||||
			CgroupRoot:            s.CgroupRoot,
 | 
								CgroupRoot:            s.CgroupRoot,
 | 
				
			||||||
			CgroupDriver:          s.CgroupDriver,
 | 
								CgroupDriver:          s.CgroupDriver,
 | 
				
			||||||
			ProtectKernelDefaults: s.ProtectKernelDefaults,
 | 
								ProtectKernelDefaults: s.ProtectKernelDefaults,
 | 
				
			||||||
			RuntimeIntegrationType: s.ExperimentalRuntimeIntegrationType,
 | 
								EnableCRI:             s.EnableCRI,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -173,8 +173,7 @@ CLAIM_BINDER_SYNC_PERIOD=${CLAIM_BINDER_SYNC_PERIOD:-"15s"} # current k8s defaul
 | 
				
			|||||||
ENABLE_CONTROLLER_ATTACH_DETACH=${ENABLE_CONTROLLER_ATTACH_DETACH:-"true"} # current default
 | 
					ENABLE_CONTROLLER_ATTACH_DETACH=${ENABLE_CONTROLLER_ATTACH_DETACH:-"true"} # current default
 | 
				
			||||||
CERT_DIR=${CERT_DIR:-"/var/run/kubernetes"}
 | 
					CERT_DIR=${CERT_DIR:-"/var/run/kubernetes"}
 | 
				
			||||||
ROOT_CA_FILE=$CERT_DIR/apiserver.crt
 | 
					ROOT_CA_FILE=$CERT_DIR/apiserver.crt
 | 
				
			||||||
# How the kubelet interacts with the runtime, eg: "cri"
 | 
					EXPERIMENTAL_CRI=${EXPERIMENTAL_CRI:-"false"}
 | 
				
			||||||
EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE=${EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE:-""}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function test_apiserver_off {
 | 
					function test_apiserver_off {
 | 
				
			||||||
@@ -485,7 +484,7 @@ function start_kubelet {
 | 
				
			|||||||
        --v=${LOG_LEVEL} \
 | 
					        --v=${LOG_LEVEL} \
 | 
				
			||||||
        --chaos-chance="${CHAOS_CHANCE}" \
 | 
					        --chaos-chance="${CHAOS_CHANCE}" \
 | 
				
			||||||
        --container-runtime="${CONTAINER_RUNTIME}" \
 | 
					        --container-runtime="${CONTAINER_RUNTIME}" \
 | 
				
			||||||
        --experimental-runtime-integration-type="${EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE}" \
 | 
					        --experimental-cri=${EXPERIMENTAL_CRI} \
 | 
				
			||||||
        --rkt-path="${RKT_PATH}" \
 | 
					        --rkt-path="${RKT_PATH}" \
 | 
				
			||||||
        --rkt-stage1-image="${RKT_STAGE1_IMAGE}" \
 | 
					        --rkt-stage1-image="${RKT_STAGE1_IMAGE}" \
 | 
				
			||||||
        --hostname-override="${HOSTNAME_OVERRIDE}" \
 | 
					        --hostname-override="${HOSTNAME_OVERRIDE}" \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -152,6 +152,7 @@ duration-sec
 | 
				
			|||||||
e2e-output-dir
 | 
					e2e-output-dir
 | 
				
			||||||
e2e-verify-service-account
 | 
					e2e-verify-service-account
 | 
				
			||||||
enable-controller-attach-detach
 | 
					enable-controller-attach-detach
 | 
				
			||||||
 | 
					enable-cri
 | 
				
			||||||
enable-custom-metrics
 | 
					enable-custom-metrics
 | 
				
			||||||
enable-debugging-handlers
 | 
					enable-debugging-handlers
 | 
				
			||||||
enable-dynamic-provisioning
 | 
					enable-dynamic-provisioning
 | 
				
			||||||
@@ -193,7 +194,7 @@ experimental-mounter-path
 | 
				
			|||||||
experimental-mounter-rootfs-path
 | 
					experimental-mounter-rootfs-path
 | 
				
			||||||
experimental-nvidia-gpus
 | 
					experimental-nvidia-gpus
 | 
				
			||||||
experimental-prefix
 | 
					experimental-prefix
 | 
				
			||||||
experimental-runtime-integration-type
 | 
					experimental-cri
 | 
				
			||||||
external-etcd-cafile
 | 
					external-etcd-cafile
 | 
				
			||||||
external-etcd-certfile
 | 
					external-etcd-certfile
 | 
				
			||||||
external-etcd-endpoints
 | 
					external-etcd-endpoints
 | 
				
			||||||
@@ -494,7 +495,6 @@ run-proxy
 | 
				
			|||||||
run-services-mode
 | 
					run-services-mode
 | 
				
			||||||
runtime-cgroups
 | 
					runtime-cgroups
 | 
				
			||||||
runtime-config
 | 
					runtime-config
 | 
				
			||||||
runtime-integration-type
 | 
					 | 
				
			||||||
runtime-request-timeout
 | 
					runtime-request-timeout
 | 
				
			||||||
save-config
 | 
					save-config
 | 
				
			||||||
schedule-pods-here
 | 
					schedule-pods-here
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -462,10 +462,9 @@ type KubeletConfiguration struct {
 | 
				
			|||||||
	// featureGates is a string of comma-separated key=value pairs that describe feature
 | 
						// featureGates is a string of comma-separated key=value pairs that describe feature
 | 
				
			||||||
	// gates for alpha/experimental features.
 | 
						// gates for alpha/experimental features.
 | 
				
			||||||
	FeatureGates string `json:"featureGates"`
 | 
						FeatureGates string `json:"featureGates"`
 | 
				
			||||||
	// How to integrate with runtime. If set to cri, kubelet will switch to
 | 
						// Enable Container Runtime Interface (CRI) integration.
 | 
				
			||||||
	// using the new Container Runtine Interface.
 | 
					 | 
				
			||||||
	// +optional
 | 
						// +optional
 | 
				
			||||||
	ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
 | 
						EnableCRI bool `json:"enableCRI,omitempty"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type KubeletAuthorizationMode string
 | 
					type KubeletAuthorizationMode string
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -501,10 +501,9 @@ type KubeletConfiguration struct {
 | 
				
			|||||||
	// featureGates is a string of comma-separated key=value pairs that describe feature
 | 
						// featureGates is a string of comma-separated key=value pairs that describe feature
 | 
				
			||||||
	// gates for alpha/experimental features.
 | 
						// gates for alpha/experimental features.
 | 
				
			||||||
	FeatureGates string `json:"featureGates,omitempty"`
 | 
						FeatureGates string `json:"featureGates,omitempty"`
 | 
				
			||||||
	// How to integrate with runtime. If set to CRI, kubelet will switch to
 | 
						// Enable Container Runtime Interface (CRI) integration.
 | 
				
			||||||
	// using the new Container Runtine Interface.
 | 
					 | 
				
			||||||
	// +optional
 | 
						// +optional
 | 
				
			||||||
	ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
 | 
						EnableCRI bool `json:"enableCRI,omitempty"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type KubeletAuthorizationMode string
 | 
					type KubeletAuthorizationMode string
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -406,7 +406,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls))
 | 
						out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls))
 | 
				
			||||||
	out.FeatureGates = in.FeatureGates
 | 
						out.FeatureGates = in.FeatureGates
 | 
				
			||||||
	out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
 | 
						out.EnableCRI = in.EnableCRI
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -574,7 +574,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls))
 | 
						out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls))
 | 
				
			||||||
	out.FeatureGates = in.FeatureGates
 | 
						out.FeatureGates = in.FeatureGates
 | 
				
			||||||
	out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
 | 
						out.EnableCRI = in.EnableCRI
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -460,7 +460,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c *
 | 
				
			|||||||
			out.AllowedUnsafeSysctls = nil
 | 
								out.AllowedUnsafeSysctls = nil
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		out.FeatureGates = in.FeatureGates
 | 
							out.FeatureGates = in.FeatureGates
 | 
				
			||||||
		out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
 | 
							out.EnableCRI = in.EnableCRI
 | 
				
			||||||
		return nil
 | 
							return nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -391,7 +391,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface
 | 
				
			|||||||
			out.AllowedUnsafeSysctls = nil
 | 
								out.AllowedUnsafeSysctls = nil
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		out.FeatureGates = in.FeatureGates
 | 
							out.FeatureGates = in.FeatureGates
 | 
				
			||||||
		out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
 | 
							out.EnableCRI = in.EnableCRI
 | 
				
			||||||
		return nil
 | 
							return nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2996,10 +2996,10 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
 | 
				
			|||||||
							Format:      "",
 | 
												Format:      "",
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					"experimentalRuntimeIntegrationType": {
 | 
										"enableCRI": {
 | 
				
			||||||
						SchemaProps: spec.SchemaProps{
 | 
											SchemaProps: spec.SchemaProps{
 | 
				
			||||||
							Description: "How to integrate with runtime. If set to cri, kubelet will switch to using the new Container Runtine Interface.",
 | 
												Description: "Enable Container Runtime Interface (CRI) integration.",
 | 
				
			||||||
							Type:        []string{"string"},
 | 
												Type:        []string{"boolean"},
 | 
				
			||||||
							Format:      "",
 | 
												Format:      "",
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
@@ -14750,10 +14750,10 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
 | 
				
			|||||||
							Format:      "",
 | 
												Format:      "",
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					"experimentalRuntimeIntegrationType": {
 | 
										"enableCRI": {
 | 
				
			||||||
						SchemaProps: spec.SchemaProps{
 | 
											SchemaProps: spec.SchemaProps{
 | 
				
			||||||
							Description: "How to integrate with runtime. If set to CRI, kubelet will switch to using the new Container Runtine Interface.",
 | 
												Description: "Enable Container Runtime Interface (CRI) integration.",
 | 
				
			||||||
							Type:        []string{"string"},
 | 
												Type:        []string{"boolean"},
 | 
				
			||||||
							Format:      "",
 | 
												Format:      "",
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ type NodeConfig struct {
 | 
				
			|||||||
	CgroupRoot            string
 | 
						CgroupRoot            string
 | 
				
			||||||
	CgroupDriver          string
 | 
						CgroupDriver          string
 | 
				
			||||||
	ProtectKernelDefaults bool
 | 
						ProtectKernelDefaults bool
 | 
				
			||||||
	RuntimeIntegrationType string
 | 
						EnableCRI             bool
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Status struct {
 | 
					type Status struct {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -335,7 +335,7 @@ func (cm *containerManagerImpl) setupNode() error {
 | 
				
			|||||||
	systemContainers := []*systemContainer{}
 | 
						systemContainers := []*systemContainer{}
 | 
				
			||||||
	if cm.ContainerRuntime == "docker" {
 | 
						if cm.ContainerRuntime == "docker" {
 | 
				
			||||||
		dockerVersion := getDockerVersion(cm.cadvisorInterface)
 | 
							dockerVersion := getDockerVersion(cm.cadvisorInterface)
 | 
				
			||||||
		if cm.RuntimeIntegrationType == "cri" {
 | 
							if cm.EnableCRI {
 | 
				
			||||||
			// If kubelet uses CRI, dockershim will manage the cgroups and oom
 | 
								// If kubelet uses CRI, dockershim will manage the cgroups and oom
 | 
				
			||||||
			// score for the docker processes.
 | 
								// score for the docker processes.
 | 
				
			||||||
			// In the future, NodeSpec should mandate the cgroup that the
 | 
								// In the future, NodeSpec should mandate the cgroup that the
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -514,7 +514,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub
 | 
				
			|||||||
	var nl *noOpLegacyHost
 | 
						var nl *noOpLegacyHost
 | 
				
			||||||
	pluginSettings.LegacyRuntimeHost = nl
 | 
						pluginSettings.LegacyRuntimeHost = nl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if kubeCfg.ExperimentalRuntimeIntegrationType == "cri" {
 | 
						if kubeCfg.EnableCRI {
 | 
				
			||||||
		// kubelet defers to the runtime shim to setup networking. Setting
 | 
							// kubelet defers to the runtime shim to setup networking. Setting
 | 
				
			||||||
		// this to nil will prevent it from trying to invoke the plugin.
 | 
							// this to nil will prevent it from trying to invoke the plugin.
 | 
				
			||||||
		// It's easier to always probe and initialize plugins till cri
 | 
							// It's easier to always probe and initialize plugins till cri
 | 
				
			||||||
@@ -2002,7 +2002,7 @@ func (kl *Kubelet) updateRuntimeUp() {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	// Only check specific conditions when runtime integration type is cri,
 | 
						// Only check specific conditions when runtime integration type is cri,
 | 
				
			||||||
	// because the old integration doesn't populate any runtime condition.
 | 
						// because the old integration doesn't populate any runtime condition.
 | 
				
			||||||
	if kl.kubeletConfiguration.ExperimentalRuntimeIntegrationType == "cri" {
 | 
						if kl.kubeletConfiguration.EnableCRI {
 | 
				
			||||||
		if s == nil {
 | 
							if s == nil {
 | 
				
			||||||
			glog.Errorf("Container runtime status is nil")
 | 
								glog.Errorf("Container runtime status is nil")
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -836,7 +836,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) {
 | 
				
			|||||||
	checkNodeStatus(api.ConditionFalse, "KubeletNotReady")
 | 
						checkNodeStatus(api.ConditionFalse, "KubeletNotReady")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Test cri integration.
 | 
						// Test cri integration.
 | 
				
			||||||
	kubelet.kubeletConfiguration.ExperimentalRuntimeIntegrationType = "cri"
 | 
						kubelet.kubeletConfiguration.EnableCRI = true
 | 
				
			||||||
	fakeRuntime.StatusErr = nil
 | 
						fakeRuntime.StatusErr = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Should report node not ready if runtime status is nil.
 | 
						// Should report node not ready if runtime status is nil.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,8 +114,8 @@ type NodeTestContextType struct {
 | 
				
			|||||||
	ManifestPath string
 | 
						ManifestPath string
 | 
				
			||||||
	// PrepullImages indicates whether node e2e framework should prepull images.
 | 
						// PrepullImages indicates whether node e2e framework should prepull images.
 | 
				
			||||||
	PrepullImages bool
 | 
						PrepullImages bool
 | 
				
			||||||
	// RuntimeIntegrationType indicates how runtime is integrated with Kubelet. This is mainly used for CRI validation test.
 | 
						// Enable CRI integration.
 | 
				
			||||||
	RuntimeIntegrationType string
 | 
						EnableCRI bool
 | 
				
			||||||
	// ContainerRuntimeEndpoint is the endpoint of remote container runtime grpc server. This is mainly used for Remote CRI
 | 
						// ContainerRuntimeEndpoint is the endpoint of remote container runtime grpc server. This is mainly used for Remote CRI
 | 
				
			||||||
	// validation test.
 | 
						// validation test.
 | 
				
			||||||
	ContainerRuntimeEndpoint string
 | 
						ContainerRuntimeEndpoint string
 | 
				
			||||||
@@ -217,7 +217,7 @@ func RegisterNodeFlags() {
 | 
				
			|||||||
	flag.StringVar(&TestContext.CgroupDriver, "cgroup-driver", "", "Driver that the kubelet uses to manipulate cgroups on the host.  Possible values: 'cgroupfs', 'systemd'")
 | 
						flag.StringVar(&TestContext.CgroupDriver, "cgroup-driver", "", "Driver that the kubelet uses to manipulate cgroups on the host.  Possible values: 'cgroupfs', 'systemd'")
 | 
				
			||||||
	flag.StringVar(&TestContext.ManifestPath, "manifest-path", "", "The path to the static pod manifest file.")
 | 
						flag.StringVar(&TestContext.ManifestPath, "manifest-path", "", "The path to the static pod manifest file.")
 | 
				
			||||||
	flag.BoolVar(&TestContext.PrepullImages, "prepull-images", true, "If true, prepull images so image pull failures do not cause test failures.")
 | 
						flag.BoolVar(&TestContext.PrepullImages, "prepull-images", true, "If true, prepull images so image pull failures do not cause test failures.")
 | 
				
			||||||
	flag.StringVar(&TestContext.RuntimeIntegrationType, "runtime-integration-type", "", "Choose the integration path for the container runtime, mainly used for CRI validation.")
 | 
						flag.BoolVar(&TestContext.EnableCRI, "enable-cri", false, "Enable Container Runtime Interface (CRI) integration.")
 | 
				
			||||||
	flag.StringVar(&TestContext.ContainerRuntimeEndpoint, "container-runtime-endpoint", "", "The endpoint of remote container runtime grpc server, mainly used for Remote CRI validation.")
 | 
						flag.StringVar(&TestContext.ContainerRuntimeEndpoint, "container-runtime-endpoint", "", "The endpoint of remote container runtime grpc server, mainly used for Remote CRI validation.")
 | 
				
			||||||
	flag.StringVar(&TestContext.MounterPath, "experimental-mounter-path", "", "Path of mounter binary. Leave empty to use the default mount.")
 | 
						flag.StringVar(&TestContext.MounterPath, "experimental-mounter-path", "", "Path of mounter binary. Leave empty to use the default mount.")
 | 
				
			||||||
	flag.StringVar(&TestContext.MounterRootfsPath, "experimental-mounter-rootfs-path", "", "Absolute path to root filesystem for the mounter binary.")
 | 
						flag.StringVar(&TestContext.MounterRootfsPath, "experimental-mounter-rootfs-path", "", "Absolute path to root filesystem for the mounter binary.")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,7 +63,7 @@ func init() {
 | 
				
			|||||||
	// It seems that someone is using flag.Parse() after init() and TestMain().
 | 
						// It seems that someone is using flag.Parse() after init() and TestMain().
 | 
				
			||||||
	// TODO(random-liu): Find who is using flag.Parse() and cause errors and move the following logic
 | 
						// TODO(random-liu): Find who is using flag.Parse() and cause errors and move the following logic
 | 
				
			||||||
	// into TestContext.
 | 
						// into TestContext.
 | 
				
			||||||
	pflag.CommandLine.MarkHidden("runtime-integration-type")
 | 
						pflag.CommandLine.MarkHidden("enable-cri")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestMain(m *testing.M) {
 | 
					func TestMain(m *testing.M) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,5 +5,5 @@ GCE_PROJECT=k8s-jkns-ci-node-e2e
 | 
				
			|||||||
CLEANUP=true
 | 
					CLEANUP=true
 | 
				
			||||||
GINKGO_FLAGS='--skip="\[Flaky\]"'
 | 
					GINKGO_FLAGS='--skip="\[Flaky\]"'
 | 
				
			||||||
SETUP_NODE=false
 | 
					SETUP_NODE=false
 | 
				
			||||||
TEST_ARGS='--runtime-integration-type=cri --feature-gates="DynamicKubeletConfig=true,StreamingProxyRedirects=true" --experimental-mounter-path="" --experimental-mounter-rootfs-path=""'
 | 
					TEST_ARGS='--enable-cri=true --feature-gates=DynamicKubeletConfig=true,StreamingProxyRedirects=true --experimental-mounter-path="" --experimental-mounter-rootfs-path=""'
 | 
				
			||||||
PARALLELISM=1
 | 
					PARALLELISM=1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,4 +5,4 @@ GCE_PROJECT=k8s-jkns-pr-node-e2e
 | 
				
			|||||||
CLEANUP=true
 | 
					CLEANUP=true
 | 
				
			||||||
GINKGO_FLAGS='--skip="\[Flaky\]|\[Slow\]|\[Serial\]" --flakeAttempts=2'
 | 
					GINKGO_FLAGS='--skip="\[Flaky\]|\[Slow\]|\[Serial\]" --flakeAttempts=2'
 | 
				
			||||||
SETUP_NODE=false
 | 
					SETUP_NODE=false
 | 
				
			||||||
TEST_ARGS='--runtime-integration-type=cri --experimental-mounter-path="" --experimental-mounter-rootfs-path="" --feature-gates="StreamingProxyRedirects=true"'
 | 
					TEST_ARGS='--enable-cri=true --experimental-mounter-path="" --experimental-mounter-rootfs-path="" --feature-gates="StreamingProxyRedirects=true"'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,6 +5,6 @@ GCE_PROJECT=k8s-jkns-ci-node-e2e
 | 
				
			|||||||
CLEANUP=true
 | 
					CLEANUP=true
 | 
				
			||||||
GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"'
 | 
					GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"'
 | 
				
			||||||
SETUP_NODE=false
 | 
					SETUP_NODE=false
 | 
				
			||||||
TEST_ARGS='--runtime-integration-type=cri --feature-gates="DynamicKubeletConfig=true,StreamingProxyRedirects=true" --experimental-mounter-path="" --experimental-mounter-rootfs-path=""'
 | 
					TEST_ARGS='--enable-cri=true --feature-gates=DynamicKubeletConfig=true,StreamingProxyRedirects=true --experimental-mounter-path="" --experimental-mounter-rootfs-path=""'
 | 
				
			||||||
PARALLELISM=1
 | 
					PARALLELISM=1
 | 
				
			||||||
TIMEOUT=3h
 | 
					TIMEOUT=3h
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,4 +5,4 @@ GCE_PROJECT=k8s-jkns-ci-node-e2e
 | 
				
			|||||||
CLEANUP=true
 | 
					CLEANUP=true
 | 
				
			||||||
GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
 | 
					GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
 | 
				
			||||||
SETUP_NODE=false
 | 
					SETUP_NODE=false
 | 
				
			||||||
TEST_ARGS='--runtime-integration-type=cri  --experimental-mounter-path="" --experimental-mounter-rootfs-path="" --feature-gates="StreamingProxyRedirects=true"'
 | 
					TEST_ARGS='--enable-cri=true --experimental-mounter-path="" --experimental-mounter-rootfs-path="" --feature-gates="StreamingProxyRedirects=true"'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -217,9 +217,8 @@ func (e *E2EServices) startKubelet() (*server, error) {
 | 
				
			|||||||
		// "--experimental-mounter-rootfs-path", framework.TestContext.MounterRootfsPath,
 | 
							// "--experimental-mounter-rootfs-path", framework.TestContext.MounterRootfsPath,
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if framework.TestContext.RuntimeIntegrationType != "" {
 | 
						if framework.TestContext.EnableCRI {
 | 
				
			||||||
		cmdArgs = append(cmdArgs, "--experimental-runtime-integration-type",
 | 
							cmdArgs = append(cmdArgs, "--experimental-cri", "true") // Whether to use experimental cri integration.
 | 
				
			||||||
			framework.TestContext.RuntimeIntegrationType) // Whether to use experimental cri integration.
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if framework.TestContext.ContainerRuntimeEndpoint != "" {
 | 
						if framework.TestContext.ContainerRuntimeEndpoint != "" {
 | 
				
			||||||
		cmdArgs = append(cmdArgs, "--container-runtime-endpoint", framework.TestContext.ContainerRuntimeEndpoint)
 | 
							cmdArgs = append(cmdArgs, "--container-runtime-endpoint", framework.TestContext.ContainerRuntimeEndpoint)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user