Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1310 from kinvolk/surajssd/fix-packet-conformance…
Browse files Browse the repository at this point in the history
…-tests

docs: Add steps for packet conformance tests
  • Loading branch information
surajssd authored Jan 15, 2021
2 parents cbeba92 + c16ff15 commit 39d4f89
Showing 1 changed file with 65 additions and 7 deletions.
72 changes: 65 additions & 7 deletions docs/run-conformance-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 39d4f89

Please sign in to comment.