~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
14 lines · 284 B Raw History
package kcprest

import (
	"strings"

	"k8s.io/client-go/rest"
)

func ForCluster(base *rest.Config, ws string) *rest.Config {
	cfg := rest.CopyConfig(base)
	host, _, _ := strings.Cut(strings.TrimSuffix(cfg.Host, "/"), "/clusters/")
	cfg.Host = host + "/clusters/" + ws
	return cfg
}