add alerting v2beta1 apis (#5115)

* generate alerting resource client

Signed-off-by: junot <junotxiang@kubesphere.io>

* add alerting v2beta1 apis

Signed-off-by: junot <junotxiang@kubesphere.io>

* tweak some varibles and descs

Signed-off-by: junot <junotxiang@kubesphere.io>
This commit is contained in:
junot
2022-08-04 13:38:41 +08:00
committed by GitHub
parent d87d7d2428
commit 74e127e1a6
35 changed files with 2947 additions and 15 deletions

View File

@@ -24,6 +24,7 @@ import (
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
alertingv2beta1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/alerting/v2beta1"
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/application/v1alpha1"
auditingv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/auditing/v1alpha1"
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/cluster/v1alpha1"
@@ -44,6 +45,7 @@ import (
type Interface interface {
Discovery() discovery.DiscoveryInterface
AlertingV2beta1() alertingv2beta1.AlertingV2beta1Interface
ApplicationV1alpha1() applicationv1alpha1.ApplicationV1alpha1Interface
AuditingV1alpha1() auditingv1alpha1.AuditingV1alpha1Interface
ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface
@@ -66,6 +68,7 @@ type Interface interface {
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
alertingV2beta1 *alertingv2beta1.AlertingV2beta1Client
applicationV1alpha1 *applicationv1alpha1.ApplicationV1alpha1Client
auditingV1alpha1 *auditingv1alpha1.AuditingV1alpha1Client
clusterV1alpha1 *clusterv1alpha1.ClusterV1alpha1Client
@@ -84,6 +87,11 @@ type Clientset struct {
typesV1beta2 *typesv1beta2.TypesV1beta2Client
}
// AlertingV2beta1 retrieves the AlertingV2beta1Client
func (c *Clientset) AlertingV2beta1() alertingv2beta1.AlertingV2beta1Interface {
return c.alertingV2beta1
}
// ApplicationV1alpha1 retrieves the ApplicationV1alpha1Client
func (c *Clientset) ApplicationV1alpha1() applicationv1alpha1.ApplicationV1alpha1Interface {
return c.applicationV1alpha1
@@ -185,6 +193,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
}
var cs Clientset
var err error
cs.alertingV2beta1, err = alertingv2beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.applicationV1alpha1, err = applicationv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -261,6 +273,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.alertingV2beta1 = alertingv2beta1.NewForConfigOrDie(c)
cs.applicationV1alpha1 = applicationv1alpha1.NewForConfigOrDie(c)
cs.auditingV1alpha1 = auditingv1alpha1.NewForConfigOrDie(c)
cs.clusterV1alpha1 = clusterv1alpha1.NewForConfigOrDie(c)
@@ -285,6 +298,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.alertingV2beta1 = alertingv2beta1.New(c)
cs.applicationV1alpha1 = applicationv1alpha1.New(c)
cs.auditingV1alpha1 = auditingv1alpha1.New(c)
cs.clusterV1alpha1 = clusterv1alpha1.New(c)