Github user mccheah commented on a diff in the pull request: https://github.com/apache/spark/pull/22805#discussion_r228278972 --- Diff: resource-managers/kubernetes/integration-tests/README.md --- @@ -41,12 +71,127 @@ The Spark code to test is handed to the integration test system via a tarball. H * `--spark-tgz <path-to-tgz>` - set `<path-to-tgz>` to point to a tarball containing the Spark distribution to test. -TODO: Don't require the packaging of the built Spark artifacts into this tarball, just read them out of the current tree. +This Tarball should be created by first running `dev/make-distribution.sh` passing the `--tgz` flag and `-Pkubernetes` as one of the +options to ensure that Kubernetes support is included in the distribution. For more details on building a runnable distribution please +see the [Building Spark](https://spark.apache.org/docs/latest/building-spark.html#building-a-runnable-distribution) documentation. + +**TODO:** Don't require the packaging of the built Spark artifacts into this tarball, just read them out of the current tree. ## Customizing the Namespace and Service Account -* `--namespace <namespace>` - set `<namespace>` to the namespace in which the tests should be run. -* `--service-account <service account name>` - set `<service account name>` to the name of the Kubernetes service account to -use in the namespace specified by the `--namespace`. The service account is expected to have permissions to get, list, watch, +If no namespace is specified then a temporary namespace will be created and deleted during the test run. Similarly if no service +account is specified then the `default` service account for the namespace will be used. + +Using the `--namespace <namespace>` flag sets `<namespace>` to the namespace in which the tests should be run. If this is supplied +then the tests assume this namespace exists in the K8S cluster and will not attempt to create it. Additionally this namespace must +have an appropriately authorized service account which can be customised via the `--service-account` flag. + +The `--service-account <service account name>` flag sets `<service account name>` to the name of the Kubernetes service account to +use in the namespace specified by the `--namespace` flag. The service account is expected to have permissions to get, list, watch, and create pods. For clusters with RBAC turned on, it's important that the right permissions are granted to the service account in the namespace through an appropriate role and role binding. A reference RBAC configuration is provided in `dev/spark-rbac.yaml`. + +# Running the Test Directly + +If you prefer to run just the integration tests directly then you can customise the behaviour via properties passed to Maven using the +`-Dproperty=value` option e.g. --- End diff -- `If you prefer to run just the integration tests directly, then you can customize the behaviour via passing system properties to Maven. For example:`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org