diff --git a/docs/run-conformance-tests.md b/docs/run-conformance-tests.md index f70db4407..57c208263 100644 --- a/docs/run-conformance-tests.md +++ b/docs/run-conformance-tests.md @@ -3,16 +3,74 @@ title: Conformance tests weight: 50 --- -This document enumerates the steps required to run conformance tests for various platforms supported by Lokomotive. +This document enumerates the steps required to run conformance tests for various platforms supported +by Lokomotive. -**Note**: There is only one caveat to consider when running tests for AWS. For other platforms you can run conformance tests without making special arrangements. +## Step 1: Platform specific preparations -## AWS +### Step 1.1: AWS -For AWS you need to make sure that node ports are allowed in the security group. To do so make sure you set the `expose_nodeports` cluster property to `true` in the AWS config. Read more about this flag in the [AWS reference docs](configuration-reference/platforms/aws.md). +For AWS you need to make sure that node ports are allowed in the security group. To do so, make sure +you set the `expose_nodeports` cluster property to `true` in the AWS config. Read more about this +flag in the [AWS reference docs](configuration-reference/platforms/aws.md). -To install the cluster on AWS follow the [AWS quick start guide](quickstarts/aws.md). +To install the AWS cluster, follow the [AWS quick start guide](quickstarts/aws.md). -## Running conformance tests +### Step 1.2: Packet -Follow the canonical document [here](https://github.com/cncf/k8s-conformance/blob/master/instructions.md) which instructs on installing sonobuoy and running tests. +#### Step 1.2.1: Cluster Requirements + +Create a cluster with at least two worker nodes. Follow the [Packet quick start +guide](quickstarts/packet.md) to install a cluster. + +#### Step 1.2.2: Expose kube-proxy + +Edit the kube-proxy Daemonset config to expose the metrics port on all interfaces. Run the following +command to edit the configuration: + +```bash +kubectl -n kube-system edit ds kube-proxy +``` + +Change the following flag from `- --metrics-bind-address=$(HOST_IP)` to +`- --metrics-bind-address=0.0.0.0`. + +#### Step 1.2.3: Expose the node ports on the worker nodes + +Apply the following Calico configuration to expose the ports in the default node port range `30000` +to `32767`: + +```yaml +echo " +apiVersion: crd.projectcalico.org/v1 +kind: GlobalNetworkPolicy +metadata: + name: allow-nodeport +spec: + applyOnForward: true + ingress: + - action: Allow + destination: + ports: + - 30000:32767 + protocol: TCP + order: 20 + preDNAT: true + selector: nodetype == 'worker' +" | kubectl apply -f - +``` + +## Step 2: Disable the mutating webhook server + +Run the following commands to disable the mutating webhook server that disallows the usage `default` +service account tokens: + +```bash +kubectl delete MutatingWebhookConfiguration admission-webhook-server +``` + +## Step 3: Running conformance tests + +Follow the canonical document +[here](https://github.com/cncf/k8s-conformance/blob/master/instructions.md) which instructs on +installing sonobuoy and running tests.