Ejemplo n.º 1
0
func versionedClientsetForDeployment(internalClient internalclientset.Interface) externalclientset.Interface {
	if internalClient == nil {
		return &externalclientset.Clientset{}
	}
	return &externalclientset.Clientset{
		CoreV1Client:            core.New(internalClient.Core().RESTClient()),
		ExtensionsV1beta1Client: extensions.New(internalClient.Extensions().RESTClient()),
	}
}
Ejemplo n.º 2
0
// 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
}