Skip to content

kubernetes: trim client-go dependency surface#3707

Open
tonistiigi wants to merge 3 commits intodocker:masterfrom
tonistiigi:k8s-trim
Open

kubernetes: trim client-go dependency surface#3707
tonistiigi wants to merge 3 commits intodocker:masterfrom
tonistiigi:k8s-trim

Conversation

@tonistiigi
Copy link
Member

Replace the full generated clientset and global Kubernetes scheme with a small local REST client layer and minimal scheme registration.

This keeps the existing kubeconfig/auth and remote exec behavior while significantly reducing the linked and vendored Kubernetes dependency set.

Replace the full generated clientset and global Kubernetes scheme
with a small local REST client layer and minimal scheme registration.

This keeps the existing kubeconfig/auth and remote exec behavior while
significantly reducing the linked and vendored Kubernetes dependency set.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Use sync.OnceValue to initialize the kubeclient scheme, codec factory,
and parameter codec as a single lazy-loaded bundle.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi marked this pull request as ready for review March 7, 2026 01:24
Drops the gogo-proto XXX_* methods.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
TTY: false,
}, scheme.ParameterCodec)
}, kubeclient.ParameterCodec())
exec, err := remotecommand.NewSPDYExecutor(restConfig, "POST", req.URL())
Copy link
Member Author

Choose a reason for hiding this comment

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

@AkihiroSuda Iiuc we could also replace this spdy dependency with kubernetes/enhancements#4006 . Seems that would require k8s 1.31+ . When do you think we could do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant