Skip to content

chore: bump k8s client libraries and controller-runtime to v0.35.x line#401

Open
anishbista60 wants to merge 3 commits into
kubevela:masterfrom
anishbista60:bump-k8s
Open

chore: bump k8s client libraries and controller-runtime to v0.35.x line#401
anishbista60 wants to merge 3 commits into
kubevela:masterfrom
anishbista60:bump-k8s

Conversation

@anishbista60

@anishbista60 anishbista60 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tracking issue: #kubevela/kubevela#7238

Summary

  • Bumps k8s client libraries from v0.31.10v0.35.6:
    • k8s.io/api
    • k8s.io/apimachinery
    • k8s.io/apiserver
    • k8s.io/client-go
    • k8s.io/component-base
    • k8s.io/apiextensions-apiserver
  • Bumps sigs.k8s.io/controller-runtime from v0.19.1v0.23.3
  • Raises go.mod to Go 1.25
  • First step in the coordinated k8s dependency bump toward v1.35.x, targeting more runway ahead of upstream v1.37

Includes minor fallout fixes required by the bump:

  • logging_test.go: patch fake Pods.GetLogs via ApplyMethodFunc (fake type is now unexported in client-go)
  • credentials_test.go: fix expectation — client.Get() never populates TypeMeta, now correctly reflected by the fake client
  • S3Backend.HCL: switched to pointer receiver to match its other methods (recvcheck lint finding)
  • CI: Go 1.25.12, golangci-lint v1.64.8, e2e kind image bumped from v1.20.7 → v1.35.5 (kind v0.32.0)

Test plan

  • Verified locally

Summary by cubic

Upgrade Kubernetes client libraries to v0.35.6 and sigs.k8s.io/controller-runtime to v0.23.3, adopt Go 1.25 across builds/CI, and refresh kind-based e2e to Kubernetes 1.35. Migrates linting to golangci-lint v2 with a new v2 config.

  • Dependencies

    • k8s.io/{api,apimachinery,apiserver,client-go,component-base,apiextensions-apiserver}: v0.31.10 → v0.35.6
    • sigs.k8s.io/controller-runtime: v0.19.1 → v0.23.3
    • sigs.k8s.io/yaml: v1.4.0 → v1.6.0; github.com/go-logr/logr: v1.4.3; github.com/google/go-cmp: v0.7.0; github.com/onsi/gomega: v1.38.2; github.com/stretchr/testify: v1.11.1; github.com/spf13/pflag: v1.0.9
    • Go: 1.25.x required; CI uses Go 1.25.12; Dockerfile builder set to golang:1.25.12-alpine
    • CI: kind v0.32.0, node image kindest/node:v1.35.5
    • Linting: golangci-lint v2.12.2; .golangci.yml migrated to v2 schema with additional linters
  • Bug Fixes

    • Terraform pod logs test: patch Pods.GetLogs via ApplyMethodFunc (fake type now unexported in client-go)
    • Provider credentials test: expect empty TypeMeta from client.Get()
    • S3Backend.HCL: use pointer receiver; backend reflection uses reflect.Pointer

Written for commit 85acea9. Summary will update on new commits.

Review in cubic

@anishbista60
anishbista60 marked this pull request as draft July 15, 2026 18:29

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 10 files

Re-trigger cubic

@anishbista60

anishbista60 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Work on progess.

Comment thread Makefile
endif

GOLANGCILINT_VERSION ?= v1.60.1
GOLANGCILINT_VERSION ?= v2.12.2

@anishbista60 anishbista60 Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for golang version 1.26.0

@anishbista60

Copy link
Copy Markdown
Contributor Author

Blocked by #403

Signed-off-by: anish bista <anishbista053@gmail.com>
Signed-off-by: anish bista <anishbista053@gmail.com>
@anishbista60
anishbista60 marked this pull request as ready for review July 17, 2026 17:15
@anishbista60

Copy link
Copy Markdown
Contributor Author

I'm not sure security/synk CI is failing.

Signed-off-by: anish bista <anishbista053@gmail.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".golangci.yml">

<violation number="1" location=".golangci.yml:138">
P1: Exclusion rule references `exportloopref`, which was removed as a linter in golangci-lint v2. The `exportloopref` check was merged into `govet` and no longer exists as a standalone linter. This will either cause a configuration parsing error or be silently ignored as dead config. 

Remove `exportloopref` from the exclusion linters list. If the loopvar capture check is still needed for older Go versions, reference `govet` instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread .golangci.yml
- errcheck
- dupl
- gosec
- exportloopref

@cubic-dev-ai cubic-dev-ai Bot Jul 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Exclusion rule references exportloopref, which was removed as a linter in golangci-lint v2. The exportloopref check was merged into govet and no longer exists as a standalone linter. This will either cause a configuration parsing error or be silently ignored as dead config.

Remove exportloopref from the exclusion linters list. If the loopvar capture check is still needed for older Go versions, reference govet instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .golangci.yml, line 138:

<comment>Exclusion rule references `exportloopref`, which was removed as a linter in golangci-lint v2. The `exportloopref` check was merged into `govet` and no longer exists as a standalone linter. This will either cause a configuration parsing error or be silently ignored as dead config. 

Remove `exportloopref` from the exclusion linters list. If the loopvar capture check is still needed for older Go versions, reference `govet` instead.</comment>

<file context>
@@ -1,215 +1,147 @@
+    - gofmt
+    - goimports
+  settings:
+    gofmt:
+      simplify: true
+  exclusions:
</file context>
Fix with cubic

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