// E2EDockerConfigFile is a docker credentials configuration file used which contains authorization token that can be used to pull images from certain private registries provided by the users.
// For more details refer https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#log-in-to-docker-hub
E2EDockerConfigFilestring
// KubeTestRepoConfigFile is a yaml file used for overriding registries for test images.
// The default is too low for objects like pods, even when using YAML. We double the default.
flags.IntVar(&gomegaformat.MaxLength,"gomega-max-length",8000,"Sets the maximum size for the gomega formatter (= gomega.MaxLength). Use 0 to disable truncation.")
flags.StringVar(&TestContext.GatherKubeSystemResourceUsageData,"gather-resource-usage","false","If set to 'true' or 'all' framework will be monitoring resource usage of system all add-ons in (some) e2e tests, if set to 'master' framework will be monitoring master node only, if set to 'none' of 'false' monitoring will be turned off.")
flags.BoolVar(&TestContext.GatherLogsSizes,"gather-logs-sizes",false,"If set to true framework will be monitoring logs sizes on all machines running e2e tests.")
flags.IntVar(&TestContext.MaxNodesToGather,"max-nodes-to-gather-from",20,"The maximum number of nodes to gather extended info from on test failure.")
flags.StringVar(&TestContext.GatherMetricsAfterTest,"gather-metrics-at-teardown","false","If set to 'true' framework will gather metrics from all components after each test. If set to 'master' only master component metrics would be gathered.")
flags.BoolVar(&TestContext.GatherSuiteMetricsAfterTest,"gather-suite-metrics-at-teardown",false,"If set to true framework will gather metrics from all components after the whole test suite completes.")
flags.BoolVar(&TestContext.IncludeClusterAutoscalerMetrics,"include-cluster-autoscaler",false,"If set to true, framework will include Cluster Autoscaler when gathering metrics.")
flags.StringVar(&TestContext.OutputPrintType,"output-print-type","json","Format in which summaries should be printed: 'hr' for human readable, 'json' for JSON ones.")
flags.BoolVar(&TestContext.DumpLogsOnFailure,"dump-logs-on-failure",true,"If set to true test will dump data about the namespace in which test was running.")
flags.BoolVar(&TestContext.DisableLogDump,"disable-log-dump",false,"If set to true, logs from master and nodes won't be gathered after test run.")
flags.StringVar(&TestContext.LogexporterGCSPath,"logexporter-gcs-path","","Path to the GCS artifacts directory to dump logs from nodes. Logexporter gets enabled if this is non-empty.")
flags.BoolVar(&TestContext.DeleteNamespace,"delete-namespace",true,"If true tests will delete namespace after completion. It is only designed to make debugging easier, DO NOT turn it off by default.")
flags.BoolVar(&TestContext.DeleteNamespaceOnFailure,"delete-namespace-on-failure",true,"If true, framework will delete test namespace on failure. Used only during test debugging.")
flags.IntVar(&TestContext.AllowedNotReadyNodes,"allowed-not-ready-nodes",0,"If greater than zero, framework will allow for that many non-ready nodes when checking for all ready nodes. If -1, no waiting will be performed for ready nodes or daemonset pods.")
flags.StringVar(&TestContext.Host,"host","",fmt.Sprintf("The host, or apiserver, to connect to. Will default to %s if this argument and --kubeconfig are not set.",defaultHost))
flags.StringVar(&TestContext.ReportPrefix,"report-prefix","","Optional prefix for JUnit XML reports. Default is empty, which doesn't prepend anything to the default name.")
flags.StringVar(&TestContext.ReportDir,"report-dir","","Path to the directory where the simplified JUnit XML reports and other tests results should be saved. Default is empty, which doesn't generate these reports. If ginkgo's -junit-report parameter is used, that parameter instead of -report-dir determines the location of a single JUnit report.")
flags.BoolVar(&TestContext.ReportCompleteGinkgo,"report-complete-ginkgo",false,"Enables writing a complete test report as Ginkgo JSON to <report dir>/ginkgo/report.json. Ignored if --report-dir is not set.")
flags.BoolVar(&TestContext.ReportCompleteJUnit,"report-complete-junit",false,"Enables writing a complete test report as JUnit XML to <report dir>/ginkgo/report.json. Ignored if --report-dir is not set.")
flags.StringVar(&TestContext.ContainerRuntimeEndpoint,"container-runtime-endpoint","unix:///run/containerd/containerd.sock","The container runtime endpoint of cluster VM instances.")
flags.StringVar(&TestContext.ContainerRuntimeProcessName,"container-runtime-process-name","containerd","The name of the container runtime process.")
flags.StringVar(&TestContext.ContainerRuntimePidFile,"container-runtime-pid-file","/run/containerd/containerd.pid","The pid file of the container runtime.")
flags.StringVar(&TestContext.SystemdServices,"systemd-services","containerd*","The comma separated list of systemd services the framework will dump logs for.")
flags.StringVar(&TestContext.NonblockingTaints,"non-blocking-taints",`node-role.kubernetes.io/control-plane`,"Nodes with taints in this comma-delimited list will not block the test framework from starting tests.")
flags.BoolVar(&TestContext.listLabels,"list-labels",false,"If true, will show the list of labels that can be used to select tests via -ginkgo.label-filter.")
flags.BoolVar(&TestContext.listTests,"list-tests",false,"If true, will show the full names of all tests (aka specs) that can be used to select test via -ginkgo.focus/skip.")
flags.StringVar(&TestContext.KubectlPath,"kubectl-path","kubectl","The kubectl binary to use. For development, you might use 'cluster/kubectl.sh' here.")
flags.StringVar(&TestContext.ProgressReportURL,"progress-report-url","","The URL to POST progress updates to as the suite runs to assist in aiding integrations. If empty, no messages sent.")
flags.StringVar(&TestContext.SpecSummaryOutput,"spec-dump","","The file to dump all ginkgo.SpecSummary to after tests run. If empty, no objects are saved/printed.")
flags.StringVar(&TestContext.DockerConfigFile,"docker-config-file","","A docker credential file which contains authorization token that is used to perform image pull tests from an authenticated registry. For more details regarding the content of the file refer https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#log-in-to-docker-hub")
flags.StringVar(&TestContext.E2EDockerConfigFile,"e2e-docker-config-file","","A docker credentials configuration file used which contains authorization token that can be used to pull images from certain private registries provided by the users. For more details refer https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#log-in-to-docker-hub")
flags.StringVar(&TestContext.KubeTestRepoList,"kube-test-repo-list","","A yaml file used for overriding registries for test images. Alternatively, the KUBE_TEST_REPO_LIST env variable can be set.")
flags.StringVar(&TestContext.SnapshotControllerPodName,"snapshot-controller-pod-name","","The pod name to use for identifying the snapshot controller in the kube-system namespace.")
flags.IntVar(&TestContext.SnapshotControllerHTTPPort,"snapshot-controller-http-port",0,"The port to use for snapshot controller HTTP communication.")
flags.Var(&stringArrayValue{&TestContext.EnabledVolumeDrivers},"enabled-volume-drivers","Comma-separated list of in-tree volume drivers to enable for testing. This is only needed for in-tree drivers disabled by default. An example is gcepd; see test/e2e/storage/in_tree_volumes.go for full details.")
flags.BoolVar(&TestContext.VerifyServiceAccount,"e2e-verify-service-account",true,"If true tests will verify the service account before running.")
flags.StringVar(&TestContext.KubeConfig,clientcmd.RecommendedConfigPathFlag,os.Getenv(clientcmd.RecommendedConfigPathEnvVar),"Path to kubeconfig containing embedded authinfo.")
flags.StringVar(&TestContext.KubeContext,clientcmd.FlagContext,"","kubeconfig context to use/override. If unset, will use value from 'current-context'")
flags.StringVar(&TestContext.KubeAPIContentType,"kube-api-content-type","application/vnd.kubernetes.protobuf","ContentType used to communicate with apiserver")
flags.StringVar(&TestContext.KubeletRootDir,"kubelet-root-dir","/var/lib/kubelet","The data directory of kubelet. Some tests (for example, CSI storage tests) deploy DaemonSets which need to know this value and cannot query it. Such tests only work in clusters where the data directory is the same on all nodes.")
flags.StringVar(&TestContext.KubeletRootDir,"volume-dir","/var/lib/kubelet","An alias for --kubelet-root-dir, kept for backwards compatibility.")
flags.StringVar(&TestContext.Provider,"provider","","The name of the Kubernetes provider (gce, gke, local, skeleton (the fallback if not set), etc.)")
flags.StringVar(&TestContext.Tooling,"tooling","","The tooling in use (kops, gke, etc.)")
flags.StringVar(&TestContext.OutputDir,"e2e-output-dir","/tmp","Output directory for interesting/useful test data, like performance data, benchmarks, and other metrics.")
flags.StringVar(&TestContext.Prefix,"prefix","e2e","A prefix to be added to cloud resources created during testing.")
flags.StringVar(&TestContext.MasterOSDistro,"master-os-distro","debian","The OS distribution of cluster master (debian, ubuntu, gci, coreos, or custom).")
flags.StringVar(&TestContext.NodeOSDistro,"node-os-distro","debian","The OS distribution of cluster VM instances (debian, ubuntu, gci, coreos, windows, or custom), which determines how specific tests are implemented.")
flags.Var(cliflag.NewStringSlice(&cloudConfig.Zones),"gce-zones","The set of zones to use in a multi-zone test instead of querying the cloud provider.")
flags.StringVar(&cloudConfig.Region,"gce-region","","GCE region being used, if applicable")
flags.BoolVar(&cloudConfig.MultiZone,"gce-multizone",false,"If true, start GCE cloud provider with multizone support.")
flags.BoolVar(&cloudConfig.MultiMaster,"gce-multimaster",false,"If true, the underlying GCE/GKE cluster is assumed to be multi-master.")
flags.StringVar(&cloudConfig.Cluster,"gke-cluster","","GKE name of cluster being used, if applicable")
flags.StringVar(&cloudConfig.NodeInstanceGroup,"node-instance-group","","Name of the managed instance group for nodes. Valid only for gce, gke or aws. If there is more than one group: comma separated list of groups.")
flags.StringVar(&cloudConfig.Network,"network","e2e","The cloud provider network for this e2e cluster.")
flags.IntVar(&cloudConfig.NumNodes,"num-nodes",DefaultNumNodes,fmt.Sprintf("Number of nodes in the cluster. If the default value of '%q' is used the number of schedulable nodes is auto-detected.",DefaultNumNodes))
flags.StringVar(&cloudConfig.ClusterIPRange,"cluster-ip-range","10.64.0.0/14","A CIDR notation IP range from which to assign IPs in the cluster.")
flags.StringVar(&cloudConfig.NodeTag,"node-tag","","Network tags used on node instances. Valid only for gce, gke")
flags.StringVar(&cloudConfig.MasterTag,"master-tag","","Network tags used on master instances. Valid only for gce, gke")
flags.StringVar(&cloudConfig.ClusterTag,"cluster-tag","","Tag used to identify resources. Only required if provider is aws.")
flags.IntVar(&TestContext.MinStartupPods,"minStartupPods",0,"The number of pods which we need to see in 'Running' state with a 'Ready' condition of true, before we try running tests. This is useful in any cluster which needs some base pod-based services running before it can be used. If set to -1, no pods are checked and tests run straight away.")
flags.DurationVar(&TestContext.timeouts.SystemPodsStartup,"system-pods-startup-timeout",TestContext.timeouts.SystemPodsStartup,"Timeout for waiting for all system pods to be running before starting tests.")
flags.DurationVar(&TestContext.timeouts.NodeSchedulable,"node-schedulable-timeout",TestContext.timeouts.NodeSchedulable,"Timeout for waiting for all nodes to be schedulable.")
flags.DurationVar(&TestContext.timeouts.SystemDaemonsetStartup,"system-daemonsets-startup-timeout",TestContext.timeouts.SystemDaemonsetStartup,"Timeout for waiting for all system daemonsets to be ready.")
flags.StringVar(&TestContext.EtcdUpgradeStorage,"etcd-upgrade-storage","","The storage version to upgrade to (either 'etcdv2' or 'etcdv3') if doing an etcd upgrade test.")
flags.StringVar(&TestContext.EtcdUpgradeVersion,"etcd-upgrade-version","","The etcd binary version to upgrade to (e.g., '3.0.14', '2.3.7') if doing an etcd upgrade test.")
flags.StringVar(&TestContext.GCEUpgradeScript,"gce-upgrade-script","","Script to use to upgrade a GCE cluster.")
flags.BoolVar(&TestContext.CleanStart,"clean-start",false,"If true, purge all namespaces except default and system before running tests. This serves to Cleanup test namespaces from failed/interrupted e2e runs in a long-lived cluster.")