예제 #1
0
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
	var clientset Clientset
	clientset.CoreClient = unversionedcore.New(c)
	clientset.ExtensionsClient = unversionedextensions.New(c)
	clientset.AutoscalingClient = unversionedautoscaling.New(c)
	clientset.BatchClient = unversionedbatch.New(c)
	clientset.RbacClient = unversionedrbac.New(c)
	clientset.CertificatesClient = unversionedcertificates.New(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}
예제 #2
0
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
	var clientset Clientset
	clientset.CoreClient = unversionedcore.New(c)
	clientset.AuthenticationClient = unversionedauthentication.New(c)
	clientset.AuthorizationClient = unversionedauthorization.New(c)
	clientset.AutoscalingClient = unversionedautoscaling.New(c)
	clientset.BatchClient = unversionedbatch.New(c)
	clientset.CertificatesClient = unversionedcertificates.New(c)
	clientset.ExtensionsClient = unversionedextensions.New(c)
	clientset.RbacClient = unversionedrbac.New(c)
	clientset.StorageClient = unversionedstorage.New(c)
	clientset.AppsClient = unversionedapps.New(c)
	clientset.PolicyClient = unversionedpolicy.New(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}