INNER CODE UNIT · Go
NewCluster
getseabird/seabird · api/cluster.go:64
func NewCluster(ctx context.Context, clusterPrefs pubsub.Property[ClusterPreferences]) (*Cluster, error) {
config := &rest.Config{
Host: clusterPrefs.Value().Host,
BearerToken: clusterPrefs.Value().BearerToken,
TLSClientConfig: clusterPrefs.Value().TLS,
ExecProvider: clusterPrefs.Value().Exec,
Proxy: http.ProxyFromEnvironment,
}
scheme := runtime.NewScheme()
corev1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme)
apiextensionsv1.AddToScheme(scheme)
appsv1.AddToScheme(scheme)
rbacv1.AddToScheme(scheme)
storagev1.AddToScheme(scheme)
eventsv1.AddToScheme(scheme)
batchv1.AddToScheme(scheme)