Skip to content

feat: upgrade to Go 1.25 and Kubernetes client-go v0.35.0#102

Open
eddiebarth1 wants to merge 4 commits intotarget:masterfrom
eddiebarth1:feat/go-1.25-upgrade
Open

feat: upgrade to Go 1.25 and Kubernetes client-go v0.35.0#102
eddiebarth1 wants to merge 4 commits intotarget:masterfrom
eddiebarth1:feat/go-1.25-upgrade

Conversation

@eddiebarth1
Copy link

Summary

  • Upgrade Go version from 1.22 to 1.25
  • Update Kubernetes dependencies (api, apimachinery, client-go) from v0.31.4 to v0.35.0
  • Remove deprecated rand.Seed() calls (Go 1.22+ auto-seeds the global random source)
  • Refactor random sort test to be resilient to true randomness

Changes

  • go.mod/go.sum: Updated Go version and all k8s.io dependencies
  • rules/chaos.go: Removed deprecated rand.Seed() init function
  • reaper/options_test.go: Refactored random sort test to run multiple shuffles instead of relying on deprecated seeding

Compatibility

  • client-go v0.35.0 corresponds to Kubernetes 1.35
  • Compatible with Kubernetes clusters 1.33, 1.34, and 1.35 (±1 minor version skew)
  • All tests pass with maintained coverage (rules: 100%, reaper: 86.5%)

Test plan

  • go build ./... compiles successfully
  • go vet ./... passes
  • go test ./... all tests pass
  • Coverage maintained: rules 100%, reaper 86.5%

🤖 Generated with Claude Code

Eduardo Barth and others added 4 commits January 8, 2026 12:57
- Update Go version from 1.13 to 1.22.0
- Upgrade k8s.io/api, apimachinery, client-go from v0.17 to v0.31.4
- Migrate from policy/v1beta1 to policy/v1 for Eviction API
- Update client-go calls to use context.TODO() (required in newer API)
- Update joonix/log to use NewFormatter() API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add edge case tests for all 6 rules (chaos, container_status, duration,
  unready, pod_status, pod_status_phase) covering boundary conditions,
  whitespace handling, case sensitivity, and special values
- Add comprehensive reaper package tests using k8s fake client for
  getPods(), reapPod(), scytheCycle(), and harvest()
- Change clientSet type from *kubernetes.Clientset to kubernetes.Interface
  to enable testing with fake client
- Fix bug in getPods() where error was checked after using podList
- Remove redundant panic() calls after logrus.Panic()
- Add defensive check in unready rule for zero-value LastTransitionTime

Test coverage improved:
- Rules package: 97% -> 100%
- Reaper package: 62% -> 86.5%
- Overall: 72.6% -> ~90%

Co-authored-by: Eduardo Barth <ebarth@medium.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Update Go version from 1.22 to 1.25
- Update k8s.io/api, apimachinery, client-go from v0.31.4 to v0.35.0
- Remove deprecated rand.Seed() from rules/chaos.go (Go 1.22+ auto-seeds)
- Refactor options_test.go random sort test to avoid deprecated rand.Seed()
- Update all indirect dependencies via go mod tidy

Co-Authored-By: Claude Opus 4.5 <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