Skip to content

Phase 4 — Kubernetes and DNS #31

Description

@jenniferoko

Please review

Full Documentation Design:

Phase_4_Kubernetes_DNS_Full_Design_Guide.docx

Excel Document:

Phase_4_Kubernetes_DNS_Acceptance_Gate.xlsx

Phase 4 Acceptance Gate – Engineer Sign-off

Overview

Phase 4 introduces two services with unique implementation considerations:

  • Kubernetes provisioning is asynchronous and requires polling until the cluster reaches the Running state.
  • DNS tests require a platform-approved internal test domain before implementation.

The engineer may proceed to Phase 5 only after all acceptance criteria below have been successfully completed.


Jennifer's Engineering Review

Before implementation begins, Jennifer should review the following design considerations with the engineer.

Kubernetes

Asynchronous Resource Provisioning

Unlike previous services, Kubernetes cluster creation is not immediate.

After a successful POST /kubernetes request, the API returns success while the cluster is still provisioning.

The test must not continue immediately.

Instead:

  1. Create the cluster.
  2. Poll the cluster endpoint.
  3. Wait until
data.state == "Running"
  1. Continue with remaining tests.

Required Timeout

Tests 45–47 must use

test.setTimeout(300_000);

which equals

5 minutes

This prevents failures caused by legitimate provisioning delays.


Polling Strategy

Implement a helper similar to:

waitForClusterRunning()

Retry:
GET /kubernetes/{slug}

Until:

state == Running

or

Timeout after 5 minutes

The helper should:

  • retry every 10–15 seconds
  • stop immediately when Running
  • fail gracefully after timeout
  • include useful timeout messages

DNS

Before implementation, confirm the test domain with the Platform Team.

Use an internal testing domain only.

Example:

smoke.test.internal

Do not use

  • .com
  • .net
  • .org
  • any public production domain

The smoke suite must never modify public DNS.


Test Matrix

Kubernetes (06-kubernetes.spec.ts)

Test Description Method Endpoint Expected Result
44 List clusters GET /kubernetes HTTP 200, array
45 Create cluster POST /kubernetes HTTP 200/201, data.slug present
46 Wait until cluster is Running GET (polling) /kubernetes/smoke-k8s-01 data.state == Running within 5 minutes
47 Stop cluster PUT /kubernetes/smoke-k8s-01/stop HTTP 200, status=Success

DNS (07-dns.spec.ts)

Test Description Method Endpoint Expected Result
48 List domains GET /dns HTTP 200, array
49 Create test domain POST /dns HTTP 200/201, domain slug present
50 List DNS records GET /dns/smoke-test-domain/records HTTP 200, array

Resource Lifecycle

Kubernetes

List Clusters
      │
      ▼
Create Cluster
      │
      ▼
Poll Until Running
      │
      ▼
Stop Cluster

DNS

List Domains
      │
      ▼
Create Test Domain
      │
      ▼
List DNS Records

Dependency Rules

Kubernetes

Tests execute in the following order.

44
 │
 ▼
45 Create Cluster
 │
 ▼
46 Wait Until Running
 │
 ▼
47 Stop Cluster

Test 47 must never execute until Test 46 confirms the cluster is Running.


DNS

48
 │
 ▼
49 Create Domain
 │
 ▼
50 List Records

Test 50 depends on successful domain creation.


Cleanup Requirements

Verify the following resources are removed after execution.

  • smoke-k8s-*
  • smoke-test-domain
  • Temporary Kubernetes resources
  • Temporary DNS records

Cleanup must execute even if earlier tests fail.


Acceptance Criteria

Category Acceptance Criteria Verification
Kubernetes Spec 06-kubernetes.spec.ts contains Tests 44–47 Code Review
DNS Spec 07-dns.spec.ts contains Tests 48–50 Code Review
Timeout Tests 45–47 use test.setTimeout(300_000) Code Review
Polling Helper Waits until cluster state equals Running Code Review
Cluster Lifecycle Cluster is created, reaches Running state, then stops successfully Tests 45–47
Polling Timeout Polling fails cleanly after 5 minutes if cluster never reaches Running Test Review
DNS Domain Internal test domain approved by Platform Team Platform Confirmation
DNS Lifecycle Domain is created and records retrieved successfully Tests 48–50
HTTP Responses Expected status codes returned Assertion Review
Cleanup Temporary Kubernetes and DNS resources removed Manual/API Verification
Regression Full smoke suite (Tests 1–50) passes CI Pipeline

Engineer Checklist

Required Before Phase 4 Sign-off

  • 06-kubernetes.spec.ts completed
  • 07-dns.spec.ts completed
  • Tests 44–50 pass
  • Kubernetes tests use 5-minute timeout
  • Polling helper implemented
  • Cluster reaches Running state before Stop test
  • DNS test domain approved by Platform Team
  • Internal domain used
  • Cleanup removes temporary Kubernetes resources
  • Cleanup removes temporary DNS resources
  • Regression suite (Tests 1–50) passes
  • Jennifer reviewed nightly execution report
  • Code review approved

Resource Verification

Resource Verified
smoke-k8s-* removed - [ ]
Test DNS domain removed - [ ]
Temporary DNS records removed - [ ]

Engineer Sign-off

Field Value
Engineer
Reviewer (Jennifer)
Date
Build / Release Version
Git Commit / PR
CI Pipeline Run

Final Result

  • PASS – Approved for Phase 5
  • FAIL – Rework Required

Reviewer Comments

______________________________________________________________

______________________________________________________________

______________________________________________________________

______________________________________________________________

Exit Rule

Phase 4 is complete only when:

  • All Tests 44–50 pass.
  • Kubernetes provisioning completes successfully.
  • Polling confirms the cluster reaches Running.
  • DNS tests use a Platform Team–approved internal domain.
  • Temporary Kubernetes and DNS resources are removed.
  • The complete smoke suite (Tests 1–50) passes.
  • Jennifer reviews the nightly smoke test report and approves the implementation.

Only then may the engineer begin Phase 5.

Metadata

Metadata

Assignees

Labels

mediumRepresents tasks with moderate importance.

Type

Fields

No fields configured for Story.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions