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 #236 from kinvolk/surajssd/document-conformance-te…
Browse files Browse the repository at this point in the history
…sts-run

docs: Add instructions to run conformance tests
  • Loading branch information
surajssd authored Apr 2, 2020
2 parents 49e8346 + a17e3ec commit 4589317
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,15 @@ resource "aws_security_group_rule" "worker-egress" {
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
}

resource "aws_security_group_rule" "worker-nodeport" {
count = var.expose_nodeports ? 1 : 0

security_group_id = aws_security_group.worker.id

type = "ingress"
protocol = "tcp"
from_port = 30000
to_port = 32767
self = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ variable "dns_zone_id" {
description = "AWS Route53 DNS Zone ID (e.g. Z3PAABBCFAKEC0)"
}

variable "expose_nodeports" {
type = bool
default = false
description = "Expose node ports 30000-32767 in the security group"
}

# instances

variable "controller_count" {
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration-reference/platforms/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ cluster "aws" {
dns_zone_id = route53_zone_id
expose_nodeports = false
ssh_pubkeys = var.ssh_public_keys
certs_validity_period_hours = 8760
Expand Down Expand Up @@ -178,6 +180,7 @@ worker_pool "my-worker-pool" {
| `os_version` | Flatcar Container Linux version to install. Version such as "2303.3.1" or "current". | "current" | false |
| `dns_zone` | Route 53 DNS Zone. | - | true |
| `dns_zone_id` | Route 53 DNS Zone ID. | - | true |
| `expose_nodeports` | Expose node ports `30000-32767` in the security group, if set to `true`. | false | false |
| `ssh_pubkeys` | List of SSH public keys for user `core`. Each element must be specified in a valid OpenSSH public key format, as defined in RFC 4253 Section 6.6, e.g. "ssh-rsa AAAAB3N...". | - | true |
| `controller_count` | Number of controller nodes. | 1 | false |
| `controller_type` | AWS instance type for controllers. | "t3.small" | false |
Expand Down
15 changes: 15 additions & 0 deletions docs/run-conformance-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Conformance tests

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.

## 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).

To install the cluster on AWS follow the [AWS quick start guide](quickstarts/aws.md).

## 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.
8 changes: 4 additions & 4 deletions pkg/assets/generated_assets.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/platform/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type config struct {
OSVersion string `hcl:"os_version,optional"`
DNSZone string `hcl:"dns_zone"`
DNSZoneID string `hcl:"dns_zone_id"`
ExposeNodePorts bool `hcl:"expose_nodeports,optional"`
SSHPubKeys []string `hcl:"ssh_pubkeys"`
CredsPath string `hcl:"creds_path,optional"`
ControllerCount int `hcl:"controller_count,optional"`
Expand Down
4 changes: 4 additions & 0 deletions pkg/platform/aws/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ module "aws-{{.Config.ClusterName}}" {
cluster_domain_suffix = "{{.Config.ClusterDomainSuffix}}"
{{- end }}
{{- if .Config.ExposeNodePorts }}
expose_nodeports = {{.Config.ExposeNodePorts}}
{{- end }}
ssh_keys = {{$.SSHPublicKeys}}
asset_dir = "../cluster-assets"
Expand Down

0 comments on commit 4589317

Please sign in to comment.