Skip to content

feat(k8s/cluster): standardize timeout configuration across providers#12

Open
rafeegnash wants to merge 1 commit intok8-gcp-supportfrom
issue-72-timeout-standardization
Open

feat(k8s/cluster): standardize timeout configuration across providers#12
rafeegnash wants to merge 1 commit intok8-gcp-supportfrom
issue-72-timeout-standardization

Conversation

@rafeegnash
Copy link
Copy Markdown

Summary

  • Adds standard timeout constants to provider.go
  • Updates EKS, GKE, and kubeadm providers to use these constants
  • Improves maintainability and ensures consistent behavior

New Constants

Constant Value Purpose
DefaultClusterCreateTimeout 20 min Cluster creation wait
DefaultNodeGroupCreateTimeout 15 min Node group creation wait
DefaultNodeGroupDeleteTimeout 10 min Node group deletion wait
DefaultSSHConnectTimeout 5 min SSH connection wait
DefaultNodeReadyTimeout 5 min Node readiness wait
DefaultPollInterval 30 sec Status polling interval
DefaultCommandTimeout 2 min CLI command timeout

Files Updated

  • provider.go: Add timeout constants
  • eks.go: Use constants in wait functions
  • gke.go: Use constants in wait functions
  • kubeadm.go: Use constants for SSH and polling

Test Plan

  • All existing cluster tests pass
  • New tests for timeout constants and relationships
  • New tests for provider types and error types
  • Code formatted with gofmt

Closes bgdnvk#72

Add standard timeout constants to provider.go and apply them consistently
across EKS, GKE, and kubeadm providers. This improves maintainability and
ensures consistent behavior across all cluster providers.

New constants:
- DefaultClusterCreateTimeout (20 min)
- DefaultNodeGroupCreateTimeout (15 min)
- DefaultNodeGroupDeleteTimeout (10 min)
- DefaultSSHConnectTimeout (5 min)
- DefaultNodeReadyTimeout (5 min)
- DefaultPollInterval (30 sec)
- DefaultCommandTimeout (2 min)

Files updated:
- provider.go: Add timeout constants
- eks.go: Use constants in wait functions
- gke.go: Use constants in wait functions
- kubeadm.go: Use constants for SSH and polling

Also adds comprehensive tests for timeout constants and provider types.

Refs bgdnvk#72

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant