Example #1
0
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
	var clientset Clientset
	clientset.CoreClient = v1core.NewForConfigOrDie(c)
	clientset.AppsClient = v1alpha1apps.NewForConfigOrDie(c)
	clientset.AuthenticationClient = v1beta1authentication.NewForConfigOrDie(c)
	clientset.AuthorizationClient = v1beta1authorization.NewForConfigOrDie(c)
	clientset.AutoscalingClient = v1autoscaling.NewForConfigOrDie(c)
	clientset.BatchClient = v1batch.NewForConfigOrDie(c)
	clientset.CertificatesClient = v1alpha1certificates.NewForConfigOrDie(c)
	clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)
	clientset.PolicyClient = v1alpha1policy.NewForConfigOrDie(c)
	clientset.RbacClient = v1alpha1rbac.NewForConfigOrDie(c)
	clientset.StorageClient = v1beta1storage.NewForConfigOrDie(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
	return &clientset
}
Example #2
0
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
	var cs Clientset
	cs.CoreV1Client = v1core.NewForConfigOrDie(c)
	cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c)
	cs.AuthenticationV1beta1Client = v1beta1authentication.NewForConfigOrDie(c)
	cs.AuthorizationV1beta1Client = v1beta1authorization.NewForConfigOrDie(c)
	cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
	cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
	cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c)
	cs.CertificatesV1alpha1Client = v1alpha1certificates.NewForConfigOrDie(c)
	cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
	cs.PolicyV1beta1Client = v1beta1policy.NewForConfigOrDie(c)
	cs.RbacV1alpha1Client = v1alpha1rbac.NewForConfigOrDie(c)
	cs.StorageV1beta1Client = v1beta1storage.NewForConfigOrDie(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
	return &cs
}