Example #1
0
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
	var clientset Clientset
	clientset.CoreClient = v1core.New(c)
	clientset.AppsClient = v1alpha1apps.New(c)
	clientset.AuthenticationClient = v1beta1authentication.New(c)
	clientset.AuthorizationClient = v1beta1authorization.New(c)
	clientset.AutoscalingClient = v1autoscaling.New(c)
	clientset.BatchClient = v1batch.New(c)
	clientset.CertificatesClient = v1alpha1certificates.New(c)
	clientset.ExtensionsClient = v1beta1extensions.New(c)
	clientset.PolicyClient = v1alpha1policy.New(c)
	clientset.RbacClient = v1alpha1rbac.New(c)
	clientset.StorageClient = v1beta1storage.New(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
	var clientset Clientset
	clientset.CoreV1Client = v1core.New(c)
	clientset.AppsV1beta1Client = v1beta1apps.New(c)
	clientset.AuthenticationV1beta1Client = v1beta1authentication.New(c)
	clientset.AuthorizationV1beta1Client = v1beta1authorization.New(c)
	clientset.AutoscalingV1Client = v1autoscaling.New(c)
	clientset.BatchV1Client = v1batch.New(c)
	clientset.BatchV2alpha1Client = v2alpha1batch.New(c)
	clientset.CertificatesV1alpha1Client = v1alpha1certificates.New(c)
	clientset.ExtensionsV1beta1Client = v1beta1extensions.New(c)
	clientset.PolicyV1beta1Client = v1beta1policy.New(c)
	clientset.RbacV1alpha1Client = v1alpha1rbac.New(c)
	clientset.StorageV1beta1Client = v1beta1storage.New(c)

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