Skip to content

Conversation

@mmorel-35
Copy link
Contributor

Description

Migrate to grpc-gateway/v2 and eliminate gogo/protobuf

k8s.io/code-generator v0.35.1 provides two critical flags:

  • --drop-gogo-go: Generates protobuf methods using google.golang.org/protobuf instead of gogo (for .pb.go files)
  • --keep-gogoproto=false: Removes gogo imports and annotations from proto files (for .proto files)

This allows manually-defined CRD types to coexist with protobuf serialization without duplicate type declarations.

Changes

Dependencies:

  • k8s.io/code-generator v0.34.0 → v0.35.1
  • All k8s.io/* packages updated to v0.35.1 (30+ packages with consistent replace directives)
  • Added k8s.io/kubernetes v1.35.1 for compatibility
  • grpc-gateway v1.16.0 → indirect dependency only (from argoproj/pkg)

Proto Generation:

  • v1alpha1: go-to-protobuf --drop-gogo-go --keep-gogoproto=false
  • Server protos: protoc-gen-go + protoc-gen-go-grpc (v2 tooling)
  • All 103 .pb.go files regenerated without gogo imports
  • Local plugin installation (dist/) eliminates network dependency

Code:

  • github.com/grpc-ecosystem/grpc-gatewaygithub.com/grpc-ecosystem/grpc-gateway/v2/runtime (server.go, forwarder_overwrite.go, json.go)
  • Removed gogoproto imports/options from server/settings/settings.proto
  • Added jq filter to strip Kubernetes markers (+optional, +genclient, etc.) from swagger.json descriptions

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@bunnyshell
Copy link

bunnyshell bot commented Feb 11, 2026

❗ Preview Environment deployment failed on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@mmorel-35 mmorel-35 force-pushed the github.com/grpc-ecosystem/grpc-gateway/v2 branch from ce7346b to 9c691ac Compare February 11, 2026 06:59
@mmorel-35 mmorel-35 changed the title Migrate to grpc-gateway/v2 and eliminate gogo/protobuf chore: migrate to grpc-gateway/v2 and eliminate gogo/protobuf Feb 11, 2026
@mmorel-35 mmorel-35 force-pushed the github.com/grpc-ecosystem/grpc-gateway/v2 branch from 9c691ac to 08db620 Compare February 11, 2026 07:05
Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
There is ongoing work on K8s client upgrade here:
#25767
If @chansuke is unable to work on #25768 , it is a good idea to address only the grpc-gateway/v2 in this PR.

@mmorel-35 mmorel-35 force-pushed the github.com/grpc-ecosystem/grpc-gateway/v2 branch from a3204e9 to aa8360f Compare February 11, 2026 16:23
@mmorel-35 mmorel-35 force-pushed the github.com/grpc-ecosystem/grpc-gateway/v2 branch from aa8360f to 3d87130 Compare February 11, 2026 16:24
@mmorel-35 mmorel-35 force-pushed the github.com/grpc-ecosystem/grpc-gateway/v2 branch from 1829a3d to fb23664 Compare February 11, 2026 17:28
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