Skip to content

Conversation

@hellt
Copy link
Member

@hellt hellt commented Jan 27, 2026

Summary

This PR updates the srl-controller dependencies to their latest versions and adds support for custom init container images. The changes modernize the project's toolchain, improve resource efficiency with adjusted default constraints, and provide more flexibility for init container configuration.

Key Changes

  1. Dependency Updates
  • Upgraded Go version from 1.20.2 to 1.24.9 across all workflows and Dockerfiles
  • Updated controller-runtime and related dependencies to v0.19.0
  • Updated controller-gen tools from v0.10.0 to v0.16.5
  • Updated kustomize from v3.8.7 to v5.4.2
  • Updated GitHub Actions workflow dependencies (checkout@v6, setup-go@v6, codecov@v5, golangci-lint@v9)
  • Updated golangci-lint from v1.51.2 to v2.1
  • Updated KNE reference from v0.1.9 to v0.3.1
  • Updated KinD version from v0.17.0 to v0.24.0
  • Updated scrapligo from v1.1.7 to v1.3.3
  • Updated envtest from 1.25.0 to 1.31.0
  • Moved from deprecated k8s.io/utils/pointer to k8s.io/utils/ptr
  1. Custom Init Container Image Support
  • Added InitImage field to NodeConfig allowing users to specify a custom init container image
  • Added GetInitImage() helper method with fallback to default image
  • Created unit test for init image functionality
  • Added E2E test TestSrlinuxReconciler_WithCustomInitImage to validate custom init image feature
  • Removed hardcoded init container image constant in favor of spec-based retrieval
  1. Resource Constraint Adjustments
  • Changed default CPU constraint from "2" to "500Mi" (more resource-efficient)
  • Changed default memory constraint from "4Gi" to "2Gi" (50% reduction)
  1. Code Organization & Quality
  • Moved API helper functions from srlinux_types.go to new srlinux_helpers.go file for better organization
  • Fixed various lint issues to comply with updated linter requirements
  • Added status subresource to fake client in tests
  • Fixed typos in comments ("succesfully" → "successfully", "occured" → "occurred")
  • Updated CRD generation with new controller-gen version
  • Simplified object metadata assignments (e.g., cfgMap.Namespace instead of cfgMap.ObjectMeta.Namespace)
  • Added proper defer error handling for driver close operations
  1. CI/CD & Testing Updates
  • Updated Ubuntu runner from 22.04 to 24.04
  • Updated default SR Linux image from latest to specific version 25.10 in E2E tests
  • Updated model default from "ixrd2" to "ixrd2l"
  • Added custom init image test to E2E matrix

@hellt hellt merged commit 606f2b9 into main Jan 27, 2026
3 checks passed
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.

2 participants