openpitrix crd
Signed-off-by: LiHui <andrewli@yunify.com> delete helm repo, release and app Signed-off-by: LiHui <andrewli@yunify.com> Fix Dockerfile Signed-off-by: LiHui <andrewli@yunify.com> add unit test for category controller Signed-off-by: LiHui <andrewli@yunify.com> resource api Signed-off-by: LiHui <andrewli@yunify.com> miscellaneous Signed-off-by: LiHui <andrewli@yunify.com> resource api Signed-off-by: LiHui <andrewli@yunify.com> add s3 repo indx Signed-off-by: LiHui <andrewli@yunify.com> attachment api Signed-off-by: LiHui <andrewli@yunify.com> repo controller test Signed-off-by: LiHui <andrewli@yunify.com> application controller test Signed-off-by: LiHui <andrewli@yunify.com> release metric Signed-off-by: LiHui <andrewli@yunify.com> helm release controller test Signed-off-by: LiHui <andrewli@yunify.com> move constants to /pkg/apis/application Signed-off-by: LiHui <andrewli@yunify.com> remove unused code Signed-off-by: LiHui <andrewli@yunify.com> add license header Signed-off-by: LiHui <andrewli@yunify.com> Fix bugs Signed-off-by: LiHui <andrewli@yunify.com> cluster cluent Signed-off-by: LiHui <andrewli@yunify.com> format code Signed-off-by: LiHui <andrewli@yunify.com> move workspace,cluster from spec to labels Signed-off-by: LiHui <andrewli@yunify.com> add license header Signed-off-by: LiHui <andrewli@yunify.com> openpitrix test Signed-off-by: LiHui <andrewli@yunify.com> add worksapce labels for app in appstore Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
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"
|
||||
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/devops/v1alpha1"
|
||||
@@ -40,6 +41,7 @@ import (
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
ApplicationV1alpha1() applicationv1alpha1.ApplicationV1alpha1Interface
|
||||
AuditingV1alpha1() auditingv1alpha1.AuditingV1alpha1Interface
|
||||
ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface
|
||||
DevopsV1alpha1() devopsv1alpha1.DevopsV1alpha1Interface
|
||||
@@ -58,6 +60,7 @@ type Interface interface {
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
applicationV1alpha1 *applicationv1alpha1.ApplicationV1alpha1Client
|
||||
auditingV1alpha1 *auditingv1alpha1.AuditingV1alpha1Client
|
||||
clusterV1alpha1 *clusterv1alpha1.ClusterV1alpha1Client
|
||||
devopsV1alpha1 *devopsv1alpha1.DevopsV1alpha1Client
|
||||
@@ -72,6 +75,11 @@ type Clientset struct {
|
||||
typesV1beta1 *typesv1beta1.TypesV1beta1Client
|
||||
}
|
||||
|
||||
// ApplicationV1alpha1 retrieves the ApplicationV1alpha1Client
|
||||
func (c *Clientset) ApplicationV1alpha1() applicationv1alpha1.ApplicationV1alpha1Interface {
|
||||
return c.applicationV1alpha1
|
||||
}
|
||||
|
||||
// AuditingV1alpha1 retrieves the AuditingV1alpha1Client
|
||||
func (c *Clientset) AuditingV1alpha1() auditingv1alpha1.AuditingV1alpha1Interface {
|
||||
return c.auditingV1alpha1
|
||||
@@ -153,6 +161,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.applicationV1alpha1, err = applicationv1alpha1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.auditingV1alpha1, err = auditingv1alpha1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -213,6 +225,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.applicationV1alpha1 = applicationv1alpha1.NewForConfigOrDie(c)
|
||||
cs.auditingV1alpha1 = auditingv1alpha1.NewForConfigOrDie(c)
|
||||
cs.clusterV1alpha1 = clusterv1alpha1.NewForConfigOrDie(c)
|
||||
cs.devopsV1alpha1 = devopsv1alpha1.NewForConfigOrDie(c)
|
||||
@@ -233,6 +246,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.applicationV1alpha1 = applicationv1alpha1.New(c)
|
||||
cs.auditingV1alpha1 = auditingv1alpha1.New(c)
|
||||
cs.clusterV1alpha1 = clusterv1alpha1.New(c)
|
||||
cs.devopsV1alpha1 = devopsv1alpha1.New(c)
|
||||
|
||||
@@ -25,6 +25,8 @@ import (
|
||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
clientset "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/application/v1alpha1"
|
||||
fakeapplicationv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/application/v1alpha1/fake"
|
||||
auditingv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/auditing/v1alpha1"
|
||||
fakeauditingv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/auditing/v1alpha1/fake"
|
||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/cluster/v1alpha1"
|
||||
@@ -98,6 +100,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// ApplicationV1alpha1 retrieves the ApplicationV1alpha1Client
|
||||
func (c *Clientset) ApplicationV1alpha1() applicationv1alpha1.ApplicationV1alpha1Interface {
|
||||
return &fakeapplicationv1alpha1.FakeApplicationV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// AuditingV1alpha1 retrieves the AuditingV1alpha1Client
|
||||
func (c *Clientset) AuditingV1alpha1() auditingv1alpha1.AuditingV1alpha1Interface {
|
||||
return &fakeauditingv1alpha1.FakeAuditingV1alpha1{Fake: &c.Fake}
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
auditingv1alpha1 "kubesphere.io/kubesphere/pkg/apis/auditing/v1alpha1"
|
||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
||||
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
|
||||
@@ -42,6 +43,7 @@ var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
applicationv1alpha1.AddToScheme,
|
||||
auditingv1alpha1.AddToScheme,
|
||||
clusterv1alpha1.AddToScheme,
|
||||
devopsv1alpha1.AddToScheme,
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
auditingv1alpha1 "kubesphere.io/kubesphere/pkg/apis/auditing/v1alpha1"
|
||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
||||
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
|
||||
@@ -42,6 +43,7 @@ var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
applicationv1alpha1.AddToScheme,
|
||||
auditingv1alpha1.AddToScheme,
|
||||
clusterv1alpha1.AddToScheme,
|
||||
devopsv1alpha1.AddToScheme,
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
type ApplicationV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
HelmApplicationsGetter
|
||||
HelmApplicationVersionsGetter
|
||||
HelmCategoriesGetter
|
||||
HelmReleasesGetter
|
||||
HelmReposGetter
|
||||
}
|
||||
|
||||
// ApplicationV1alpha1Client is used to interact with features provided by the application.kubesphere.io group.
|
||||
type ApplicationV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ApplicationV1alpha1Client) HelmApplications() HelmApplicationInterface {
|
||||
return newHelmApplications(c)
|
||||
}
|
||||
|
||||
func (c *ApplicationV1alpha1Client) HelmApplicationVersions() HelmApplicationVersionInterface {
|
||||
return newHelmApplicationVersions(c)
|
||||
}
|
||||
|
||||
func (c *ApplicationV1alpha1Client) HelmCategories() HelmCategoryInterface {
|
||||
return newHelmCategories(c)
|
||||
}
|
||||
|
||||
func (c *ApplicationV1alpha1Client) HelmReleases() HelmReleaseInterface {
|
||||
return newHelmReleases(c)
|
||||
}
|
||||
|
||||
func (c *ApplicationV1alpha1Client) HelmRepos() HelmRepoInterface {
|
||||
return newHelmRepos(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ApplicationV1alpha1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ApplicationV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ApplicationV1alpha1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ApplicationV1alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ApplicationV1alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new ApplicationV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ApplicationV1alpha1Client {
|
||||
return &ApplicationV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *ApplicationV1alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/application/v1alpha1"
|
||||
)
|
||||
|
||||
type FakeApplicationV1alpha1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeApplicationV1alpha1) HelmApplications() v1alpha1.HelmApplicationInterface {
|
||||
return &FakeHelmApplications{c}
|
||||
}
|
||||
|
||||
func (c *FakeApplicationV1alpha1) HelmApplicationVersions() v1alpha1.HelmApplicationVersionInterface {
|
||||
return &FakeHelmApplicationVersions{c}
|
||||
}
|
||||
|
||||
func (c *FakeApplicationV1alpha1) HelmCategories() v1alpha1.HelmCategoryInterface {
|
||||
return &FakeHelmCategories{c}
|
||||
}
|
||||
|
||||
func (c *FakeApplicationV1alpha1) HelmReleases() v1alpha1.HelmReleaseInterface {
|
||||
return &FakeHelmReleases{c}
|
||||
}
|
||||
|
||||
func (c *FakeApplicationV1alpha1) HelmRepos() v1alpha1.HelmRepoInterface {
|
||||
return &FakeHelmRepos{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeApplicationV1alpha1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// FakeHelmApplications implements HelmApplicationInterface
|
||||
type FakeHelmApplications struct {
|
||||
Fake *FakeApplicationV1alpha1
|
||||
}
|
||||
|
||||
var helmapplicationsResource = schema.GroupVersionResource{Group: "application.kubesphere.io", Version: "v1alpha1", Resource: "helmapplications"}
|
||||
|
||||
var helmapplicationsKind = schema.GroupVersionKind{Group: "application.kubesphere.io", Version: "v1alpha1", Kind: "HelmApplication"}
|
||||
|
||||
// Get takes name of the helmApplication, and returns the corresponding helmApplication object, and an error if there is any.
|
||||
func (c *FakeHelmApplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(helmapplicationsResource, name), &v1alpha1.HelmApplication{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmApplications that match those selectors.
|
||||
func (c *FakeHelmApplications) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmApplicationList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(helmapplicationsResource, helmapplicationsKind, opts), &v1alpha1.HelmApplicationList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.HelmApplicationList{ListMeta: obj.(*v1alpha1.HelmApplicationList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.HelmApplicationList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmApplications.
|
||||
func (c *FakeHelmApplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(helmapplicationsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmApplication and creates it. Returns the server's representation of the helmApplication, and an error, if there is any.
|
||||
func (c *FakeHelmApplications) Create(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.CreateOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(helmapplicationsResource, helmApplication), &v1alpha1.HelmApplication{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmApplication and updates it. Returns the server's representation of the helmApplication, and an error, if there is any.
|
||||
func (c *FakeHelmApplications) Update(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(helmapplicationsResource, helmApplication), &v1alpha1.HelmApplication{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHelmApplications) UpdateStatus(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (*v1alpha1.HelmApplication, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(helmapplicationsResource, "status", helmApplication), &v1alpha1.HelmApplication{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), err
|
||||
}
|
||||
|
||||
// Delete takes name of the helmApplication and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHelmApplications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(helmapplicationsResource, name), &v1alpha1.HelmApplication{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHelmApplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(helmapplicationsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.HelmApplicationList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmApplication.
|
||||
func (c *FakeHelmApplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplication, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(helmapplicationsResource, name, pt, data, subresources...), &v1alpha1.HelmApplication{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// FakeHelmApplicationVersions implements HelmApplicationVersionInterface
|
||||
type FakeHelmApplicationVersions struct {
|
||||
Fake *FakeApplicationV1alpha1
|
||||
}
|
||||
|
||||
var helmapplicationversionsResource = schema.GroupVersionResource{Group: "application.kubesphere.io", Version: "v1alpha1", Resource: "helmapplicationversions"}
|
||||
|
||||
var helmapplicationversionsKind = schema.GroupVersionKind{Group: "application.kubesphere.io", Version: "v1alpha1", Kind: "HelmApplicationVersion"}
|
||||
|
||||
// Get takes name of the helmApplicationVersion, and returns the corresponding helmApplicationVersion object, and an error if there is any.
|
||||
func (c *FakeHelmApplicationVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(helmapplicationversionsResource, name), &v1alpha1.HelmApplicationVersion{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmApplicationVersions that match those selectors.
|
||||
func (c *FakeHelmApplicationVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmApplicationVersionList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(helmapplicationversionsResource, helmapplicationversionsKind, opts), &v1alpha1.HelmApplicationVersionList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.HelmApplicationVersionList{ListMeta: obj.(*v1alpha1.HelmApplicationVersionList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.HelmApplicationVersionList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmApplicationVersions.
|
||||
func (c *FakeHelmApplicationVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(helmapplicationversionsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmApplicationVersion and creates it. Returns the server's representation of the helmApplicationVersion, and an error, if there is any.
|
||||
func (c *FakeHelmApplicationVersions) Create(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.CreateOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(helmapplicationversionsResource, helmApplicationVersion), &v1alpha1.HelmApplicationVersion{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmApplicationVersion and updates it. Returns the server's representation of the helmApplicationVersion, and an error, if there is any.
|
||||
func (c *FakeHelmApplicationVersions) Update(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(helmapplicationversionsResource, helmApplicationVersion), &v1alpha1.HelmApplicationVersion{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHelmApplicationVersions) UpdateStatus(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.HelmApplicationVersion, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(helmapplicationversionsResource, "status", helmApplicationVersion), &v1alpha1.HelmApplicationVersion{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), err
|
||||
}
|
||||
|
||||
// Delete takes name of the helmApplicationVersion and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHelmApplicationVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(helmapplicationversionsResource, name), &v1alpha1.HelmApplicationVersion{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHelmApplicationVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(helmapplicationversionsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.HelmApplicationVersionList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmApplicationVersion.
|
||||
func (c *FakeHelmApplicationVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(helmapplicationversionsResource, name, pt, data, subresources...), &v1alpha1.HelmApplicationVersion{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// FakeHelmCategories implements HelmCategoryInterface
|
||||
type FakeHelmCategories struct {
|
||||
Fake *FakeApplicationV1alpha1
|
||||
}
|
||||
|
||||
var helmcategoriesResource = schema.GroupVersionResource{Group: "application.kubesphere.io", Version: "v1alpha1", Resource: "helmcategories"}
|
||||
|
||||
var helmcategoriesKind = schema.GroupVersionKind{Group: "application.kubesphere.io", Version: "v1alpha1", Kind: "HelmCategory"}
|
||||
|
||||
// Get takes name of the helmCategory, and returns the corresponding helmCategory object, and an error if there is any.
|
||||
func (c *FakeHelmCategories) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(helmcategoriesResource, name), &v1alpha1.HelmCategory{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmCategories that match those selectors.
|
||||
func (c *FakeHelmCategories) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmCategoryList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(helmcategoriesResource, helmcategoriesKind, opts), &v1alpha1.HelmCategoryList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.HelmCategoryList{ListMeta: obj.(*v1alpha1.HelmCategoryList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.HelmCategoryList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmCategories.
|
||||
func (c *FakeHelmCategories) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(helmcategoriesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmCategory and creates it. Returns the server's representation of the helmCategory, and an error, if there is any.
|
||||
func (c *FakeHelmCategories) Create(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.CreateOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(helmcategoriesResource, helmCategory), &v1alpha1.HelmCategory{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmCategory and updates it. Returns the server's representation of the helmCategory, and an error, if there is any.
|
||||
func (c *FakeHelmCategories) Update(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(helmcategoriesResource, helmCategory), &v1alpha1.HelmCategory{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHelmCategories) UpdateStatus(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (*v1alpha1.HelmCategory, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(helmcategoriesResource, "status", helmCategory), &v1alpha1.HelmCategory{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), err
|
||||
}
|
||||
|
||||
// Delete takes name of the helmCategory and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHelmCategories) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(helmcategoriesResource, name), &v1alpha1.HelmCategory{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHelmCategories) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(helmcategoriesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.HelmCategoryList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmCategory.
|
||||
func (c *FakeHelmCategories) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmCategory, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(helmcategoriesResource, name, pt, data, subresources...), &v1alpha1.HelmCategory{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// FakeHelmReleases implements HelmReleaseInterface
|
||||
type FakeHelmReleases struct {
|
||||
Fake *FakeApplicationV1alpha1
|
||||
}
|
||||
|
||||
var helmreleasesResource = schema.GroupVersionResource{Group: "application.kubesphere.io", Version: "v1alpha1", Resource: "helmreleases"}
|
||||
|
||||
var helmreleasesKind = schema.GroupVersionKind{Group: "application.kubesphere.io", Version: "v1alpha1", Kind: "HelmRelease"}
|
||||
|
||||
// Get takes name of the helmRelease, and returns the corresponding helmRelease object, and an error if there is any.
|
||||
func (c *FakeHelmReleases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(helmreleasesResource, name), &v1alpha1.HelmRelease{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmReleases that match those selectors.
|
||||
func (c *FakeHelmReleases) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmReleaseList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(helmreleasesResource, helmreleasesKind, opts), &v1alpha1.HelmReleaseList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.HelmReleaseList{ListMeta: obj.(*v1alpha1.HelmReleaseList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.HelmReleaseList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmReleases.
|
||||
func (c *FakeHelmReleases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(helmreleasesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmRelease and creates it. Returns the server's representation of the helmRelease, and an error, if there is any.
|
||||
func (c *FakeHelmReleases) Create(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.CreateOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(helmreleasesResource, helmRelease), &v1alpha1.HelmRelease{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmRelease and updates it. Returns the server's representation of the helmRelease, and an error, if there is any.
|
||||
func (c *FakeHelmReleases) Update(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(helmreleasesResource, helmRelease), &v1alpha1.HelmRelease{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHelmReleases) UpdateStatus(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (*v1alpha1.HelmRelease, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(helmreleasesResource, "status", helmRelease), &v1alpha1.HelmRelease{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), err
|
||||
}
|
||||
|
||||
// Delete takes name of the helmRelease and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHelmReleases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(helmreleasesResource, name), &v1alpha1.HelmRelease{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHelmReleases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(helmreleasesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.HelmReleaseList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmRelease.
|
||||
func (c *FakeHelmReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(helmreleasesResource, name, pt, data, subresources...), &v1alpha1.HelmRelease{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// FakeHelmRepos implements HelmRepoInterface
|
||||
type FakeHelmRepos struct {
|
||||
Fake *FakeApplicationV1alpha1
|
||||
}
|
||||
|
||||
var helmreposResource = schema.GroupVersionResource{Group: "application.kubesphere.io", Version: "v1alpha1", Resource: "helmrepos"}
|
||||
|
||||
var helmreposKind = schema.GroupVersionKind{Group: "application.kubesphere.io", Version: "v1alpha1", Kind: "HelmRepo"}
|
||||
|
||||
// Get takes name of the helmRepo, and returns the corresponding helmRepo object, and an error if there is any.
|
||||
func (c *FakeHelmRepos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(helmreposResource, name), &v1alpha1.HelmRepo{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmRepos that match those selectors.
|
||||
func (c *FakeHelmRepos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmRepoList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(helmreposResource, helmreposKind, opts), &v1alpha1.HelmRepoList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.HelmRepoList{ListMeta: obj.(*v1alpha1.HelmRepoList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.HelmRepoList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmRepos.
|
||||
func (c *FakeHelmRepos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(helmreposResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmRepo and creates it. Returns the server's representation of the helmRepo, and an error, if there is any.
|
||||
func (c *FakeHelmRepos) Create(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.CreateOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(helmreposResource, helmRepo), &v1alpha1.HelmRepo{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmRepo and updates it. Returns the server's representation of the helmRepo, and an error, if there is any.
|
||||
func (c *FakeHelmRepos) Update(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(helmreposResource, helmRepo), &v1alpha1.HelmRepo{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHelmRepos) UpdateStatus(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (*v1alpha1.HelmRepo, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(helmreposResource, "status", helmRepo), &v1alpha1.HelmRepo{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), err
|
||||
}
|
||||
|
||||
// Delete takes name of the helmRepo and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHelmRepos) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(helmreposResource, name), &v1alpha1.HelmRepo{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHelmRepos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(helmreposResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.HelmRepoList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmRepo.
|
||||
func (c *FakeHelmRepos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRepo, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(helmreposResource, name, pt, data, subresources...), &v1alpha1.HelmRepo{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), err
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
type HelmApplicationExpansion interface{}
|
||||
|
||||
type HelmApplicationVersionExpansion interface{}
|
||||
|
||||
type HelmCategoryExpansion interface{}
|
||||
|
||||
type HelmReleaseExpansion interface{}
|
||||
|
||||
type HelmRepoExpansion interface{}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// HelmApplicationsGetter has a method to return a HelmApplicationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HelmApplicationsGetter interface {
|
||||
HelmApplications() HelmApplicationInterface
|
||||
}
|
||||
|
||||
// HelmApplicationInterface has methods to work with HelmApplication resources.
|
||||
type HelmApplicationInterface interface {
|
||||
Create(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.CreateOptions) (*v1alpha1.HelmApplication, error)
|
||||
Update(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (*v1alpha1.HelmApplication, error)
|
||||
UpdateStatus(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (*v1alpha1.HelmApplication, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmApplication, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmApplicationList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplication, err error)
|
||||
HelmApplicationExpansion
|
||||
}
|
||||
|
||||
// helmApplications implements HelmApplicationInterface
|
||||
type helmApplications struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newHelmApplications returns a HelmApplications
|
||||
func newHelmApplications(c *ApplicationV1alpha1Client) *helmApplications {
|
||||
return &helmApplications{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the helmApplication, and returns the corresponding helmApplication object, and an error if there is any.
|
||||
func (c *helmApplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
result = &v1alpha1.HelmApplication{}
|
||||
err = c.client.Get().
|
||||
Resource("helmapplications").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmApplications that match those selectors.
|
||||
func (c *helmApplications) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmApplicationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.HelmApplicationList{}
|
||||
err = c.client.Get().
|
||||
Resource("helmapplications").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmApplications.
|
||||
func (c *helmApplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("helmapplications").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmApplication and creates it. Returns the server's representation of the helmApplication, and an error, if there is any.
|
||||
func (c *helmApplications) Create(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.CreateOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
result = &v1alpha1.HelmApplication{}
|
||||
err = c.client.Post().
|
||||
Resource("helmapplications").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplication).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmApplication and updates it. Returns the server's representation of the helmApplication, and an error, if there is any.
|
||||
func (c *helmApplications) Update(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
result = &v1alpha1.HelmApplication{}
|
||||
err = c.client.Put().
|
||||
Resource("helmapplications").
|
||||
Name(helmApplication.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplication).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *helmApplications) UpdateStatus(ctx context.Context, helmApplication *v1alpha1.HelmApplication, opts v1.UpdateOptions) (result *v1alpha1.HelmApplication, err error) {
|
||||
result = &v1alpha1.HelmApplication{}
|
||||
err = c.client.Put().
|
||||
Resource("helmapplications").
|
||||
Name(helmApplication.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplication).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the helmApplication and deletes it. Returns an error if one occurs.
|
||||
func (c *helmApplications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("helmapplications").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *helmApplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("helmapplications").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmApplication.
|
||||
func (c *helmApplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplication, err error) {
|
||||
result = &v1alpha1.HelmApplication{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("helmapplications").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// HelmApplicationVersionsGetter has a method to return a HelmApplicationVersionInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HelmApplicationVersionsGetter interface {
|
||||
HelmApplicationVersions() HelmApplicationVersionInterface
|
||||
}
|
||||
|
||||
// HelmApplicationVersionInterface has methods to work with HelmApplicationVersion resources.
|
||||
type HelmApplicationVersionInterface interface {
|
||||
Create(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.CreateOptions) (*v1alpha1.HelmApplicationVersion, error)
|
||||
Update(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.HelmApplicationVersion, error)
|
||||
UpdateStatus(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.HelmApplicationVersion, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmApplicationVersion, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmApplicationVersionList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplicationVersion, err error)
|
||||
HelmApplicationVersionExpansion
|
||||
}
|
||||
|
||||
// helmApplicationVersions implements HelmApplicationVersionInterface
|
||||
type helmApplicationVersions struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newHelmApplicationVersions returns a HelmApplicationVersions
|
||||
func newHelmApplicationVersions(c *ApplicationV1alpha1Client) *helmApplicationVersions {
|
||||
return &helmApplicationVersions{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the helmApplicationVersion, and returns the corresponding helmApplicationVersion object, and an error if there is any.
|
||||
func (c *helmApplicationVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
result = &v1alpha1.HelmApplicationVersion{}
|
||||
err = c.client.Get().
|
||||
Resource("helmapplicationversions").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmApplicationVersions that match those selectors.
|
||||
func (c *helmApplicationVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmApplicationVersionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.HelmApplicationVersionList{}
|
||||
err = c.client.Get().
|
||||
Resource("helmapplicationversions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmApplicationVersions.
|
||||
func (c *helmApplicationVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("helmapplicationversions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmApplicationVersion and creates it. Returns the server's representation of the helmApplicationVersion, and an error, if there is any.
|
||||
func (c *helmApplicationVersions) Create(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.CreateOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
result = &v1alpha1.HelmApplicationVersion{}
|
||||
err = c.client.Post().
|
||||
Resource("helmapplicationversions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplicationVersion).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmApplicationVersion and updates it. Returns the server's representation of the helmApplicationVersion, and an error, if there is any.
|
||||
func (c *helmApplicationVersions) Update(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
result = &v1alpha1.HelmApplicationVersion{}
|
||||
err = c.client.Put().
|
||||
Resource("helmapplicationversions").
|
||||
Name(helmApplicationVersion.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplicationVersion).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *helmApplicationVersions) UpdateStatus(ctx context.Context, helmApplicationVersion *v1alpha1.HelmApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
result = &v1alpha1.HelmApplicationVersion{}
|
||||
err = c.client.Put().
|
||||
Resource("helmapplicationversions").
|
||||
Name(helmApplicationVersion.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmApplicationVersion).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the helmApplicationVersion and deletes it. Returns an error if one occurs.
|
||||
func (c *helmApplicationVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("helmapplicationversions").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *helmApplicationVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("helmapplicationversions").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmApplicationVersion.
|
||||
func (c *helmApplicationVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApplicationVersion, err error) {
|
||||
result = &v1alpha1.HelmApplicationVersion{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("helmapplicationversions").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// HelmCategoriesGetter has a method to return a HelmCategoryInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HelmCategoriesGetter interface {
|
||||
HelmCategories() HelmCategoryInterface
|
||||
}
|
||||
|
||||
// HelmCategoryInterface has methods to work with HelmCategory resources.
|
||||
type HelmCategoryInterface interface {
|
||||
Create(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.CreateOptions) (*v1alpha1.HelmCategory, error)
|
||||
Update(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (*v1alpha1.HelmCategory, error)
|
||||
UpdateStatus(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (*v1alpha1.HelmCategory, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmCategory, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmCategoryList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmCategory, err error)
|
||||
HelmCategoryExpansion
|
||||
}
|
||||
|
||||
// helmCategories implements HelmCategoryInterface
|
||||
type helmCategories struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newHelmCategories returns a HelmCategories
|
||||
func newHelmCategories(c *ApplicationV1alpha1Client) *helmCategories {
|
||||
return &helmCategories{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the helmCategory, and returns the corresponding helmCategory object, and an error if there is any.
|
||||
func (c *helmCategories) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
result = &v1alpha1.HelmCategory{}
|
||||
err = c.client.Get().
|
||||
Resource("helmcategories").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmCategories that match those selectors.
|
||||
func (c *helmCategories) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmCategoryList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.HelmCategoryList{}
|
||||
err = c.client.Get().
|
||||
Resource("helmcategories").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmCategories.
|
||||
func (c *helmCategories) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("helmcategories").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmCategory and creates it. Returns the server's representation of the helmCategory, and an error, if there is any.
|
||||
func (c *helmCategories) Create(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.CreateOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
result = &v1alpha1.HelmCategory{}
|
||||
err = c.client.Post().
|
||||
Resource("helmcategories").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmCategory).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmCategory and updates it. Returns the server's representation of the helmCategory, and an error, if there is any.
|
||||
func (c *helmCategories) Update(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
result = &v1alpha1.HelmCategory{}
|
||||
err = c.client.Put().
|
||||
Resource("helmcategories").
|
||||
Name(helmCategory.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmCategory).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *helmCategories) UpdateStatus(ctx context.Context, helmCategory *v1alpha1.HelmCategory, opts v1.UpdateOptions) (result *v1alpha1.HelmCategory, err error) {
|
||||
result = &v1alpha1.HelmCategory{}
|
||||
err = c.client.Put().
|
||||
Resource("helmcategories").
|
||||
Name(helmCategory.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmCategory).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the helmCategory and deletes it. Returns an error if one occurs.
|
||||
func (c *helmCategories) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("helmcategories").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *helmCategories) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("helmcategories").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmCategory.
|
||||
func (c *helmCategories) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmCategory, err error) {
|
||||
result = &v1alpha1.HelmCategory{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("helmcategories").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// HelmReleasesGetter has a method to return a HelmReleaseInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HelmReleasesGetter interface {
|
||||
HelmReleases() HelmReleaseInterface
|
||||
}
|
||||
|
||||
// HelmReleaseInterface has methods to work with HelmRelease resources.
|
||||
type HelmReleaseInterface interface {
|
||||
Create(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.CreateOptions) (*v1alpha1.HelmRelease, error)
|
||||
Update(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (*v1alpha1.HelmRelease, error)
|
||||
UpdateStatus(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (*v1alpha1.HelmRelease, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmRelease, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmReleaseList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRelease, err error)
|
||||
HelmReleaseExpansion
|
||||
}
|
||||
|
||||
// helmReleases implements HelmReleaseInterface
|
||||
type helmReleases struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newHelmReleases returns a HelmReleases
|
||||
func newHelmReleases(c *ApplicationV1alpha1Client) *helmReleases {
|
||||
return &helmReleases{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the helmRelease, and returns the corresponding helmRelease object, and an error if there is any.
|
||||
func (c *helmReleases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
result = &v1alpha1.HelmRelease{}
|
||||
err = c.client.Get().
|
||||
Resource("helmreleases").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmReleases that match those selectors.
|
||||
func (c *helmReleases) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmReleaseList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.HelmReleaseList{}
|
||||
err = c.client.Get().
|
||||
Resource("helmreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmReleases.
|
||||
func (c *helmReleases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("helmreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmRelease and creates it. Returns the server's representation of the helmRelease, and an error, if there is any.
|
||||
func (c *helmReleases) Create(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.CreateOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
result = &v1alpha1.HelmRelease{}
|
||||
err = c.client.Post().
|
||||
Resource("helmreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmRelease and updates it. Returns the server's representation of the helmRelease, and an error, if there is any.
|
||||
func (c *helmReleases) Update(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
result = &v1alpha1.HelmRelease{}
|
||||
err = c.client.Put().
|
||||
Resource("helmreleases").
|
||||
Name(helmRelease.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *helmReleases) UpdateStatus(ctx context.Context, helmRelease *v1alpha1.HelmRelease, opts v1.UpdateOptions) (result *v1alpha1.HelmRelease, err error) {
|
||||
result = &v1alpha1.HelmRelease{}
|
||||
err = c.client.Put().
|
||||
Resource("helmreleases").
|
||||
Name(helmRelease.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the helmRelease and deletes it. Returns an error if one occurs.
|
||||
func (c *helmReleases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("helmreleases").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *helmReleases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("helmreleases").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmRelease.
|
||||
func (c *helmReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRelease, err error) {
|
||||
result = &v1alpha1.HelmRelease{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("helmreleases").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// HelmReposGetter has a method to return a HelmRepoInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HelmReposGetter interface {
|
||||
HelmRepos() HelmRepoInterface
|
||||
}
|
||||
|
||||
// HelmRepoInterface has methods to work with HelmRepo resources.
|
||||
type HelmRepoInterface interface {
|
||||
Create(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.CreateOptions) (*v1alpha1.HelmRepo, error)
|
||||
Update(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (*v1alpha1.HelmRepo, error)
|
||||
UpdateStatus(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (*v1alpha1.HelmRepo, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmRepo, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmRepoList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRepo, err error)
|
||||
HelmRepoExpansion
|
||||
}
|
||||
|
||||
// helmRepos implements HelmRepoInterface
|
||||
type helmRepos struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newHelmRepos returns a HelmRepos
|
||||
func newHelmRepos(c *ApplicationV1alpha1Client) *helmRepos {
|
||||
return &helmRepos{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the helmRepo, and returns the corresponding helmRepo object, and an error if there is any.
|
||||
func (c *helmRepos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
result = &v1alpha1.HelmRepo{}
|
||||
err = c.client.Get().
|
||||
Resource("helmrepos").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HelmRepos that match those selectors.
|
||||
func (c *helmRepos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmRepoList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.HelmRepoList{}
|
||||
err = c.client.Get().
|
||||
Resource("helmrepos").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested helmRepos.
|
||||
func (c *helmRepos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("helmrepos").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a helmRepo and creates it. Returns the server's representation of the helmRepo, and an error, if there is any.
|
||||
func (c *helmRepos) Create(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.CreateOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
result = &v1alpha1.HelmRepo{}
|
||||
err = c.client.Post().
|
||||
Resource("helmrepos").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRepo).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a helmRepo and updates it. Returns the server's representation of the helmRepo, and an error, if there is any.
|
||||
func (c *helmRepos) Update(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
result = &v1alpha1.HelmRepo{}
|
||||
err = c.client.Put().
|
||||
Resource("helmrepos").
|
||||
Name(helmRepo.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRepo).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *helmRepos) UpdateStatus(ctx context.Context, helmRepo *v1alpha1.HelmRepo, opts v1.UpdateOptions) (result *v1alpha1.HelmRepo, err error) {
|
||||
result = &v1alpha1.HelmRepo{}
|
||||
err = c.client.Put().
|
||||
Resource("helmrepos").
|
||||
Name(helmRepo.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(helmRepo).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the helmRepo and deletes it. Returns an error if one occurs.
|
||||
func (c *helmRepos) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("helmrepos").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *helmRepos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("helmrepos").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched helmRepo.
|
||||
func (c *helmRepos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmRepo, err error) {
|
||||
result = &v1alpha1.HelmRepo{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("helmrepos").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package application
|
||||
|
||||
import (
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/informers/externalversions/application/v1alpha1"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmApplicationInformer provides access to a shared informer and lister for
|
||||
// HelmApplications.
|
||||
type HelmApplicationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.HelmApplicationLister
|
||||
}
|
||||
|
||||
type helmApplicationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewHelmApplicationInformer constructs a new informer for HelmApplication type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHelmApplicationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmApplicationInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHelmApplicationInformer constructs a new informer for HelmApplication type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHelmApplicationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmApplications().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmApplications().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&applicationv1alpha1.HelmApplication{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *helmApplicationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmApplicationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *helmApplicationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&applicationv1alpha1.HelmApplication{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *helmApplicationInformer) Lister() v1alpha1.HelmApplicationLister {
|
||||
return v1alpha1.NewHelmApplicationLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmApplicationVersionInformer provides access to a shared informer and lister for
|
||||
// HelmApplicationVersions.
|
||||
type HelmApplicationVersionInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.HelmApplicationVersionLister
|
||||
}
|
||||
|
||||
type helmApplicationVersionInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewHelmApplicationVersionInformer constructs a new informer for HelmApplicationVersion type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHelmApplicationVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmApplicationVersionInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHelmApplicationVersionInformer constructs a new informer for HelmApplicationVersion type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHelmApplicationVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmApplicationVersions().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmApplicationVersions().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&applicationv1alpha1.HelmApplicationVersion{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *helmApplicationVersionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmApplicationVersionInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *helmApplicationVersionInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&applicationv1alpha1.HelmApplicationVersion{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *helmApplicationVersionInformer) Lister() v1alpha1.HelmApplicationVersionLister {
|
||||
return v1alpha1.NewHelmApplicationVersionLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmCategoryInformer provides access to a shared informer and lister for
|
||||
// HelmCategories.
|
||||
type HelmCategoryInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.HelmCategoryLister
|
||||
}
|
||||
|
||||
type helmCategoryInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewHelmCategoryInformer constructs a new informer for HelmCategory type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHelmCategoryInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmCategoryInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHelmCategoryInformer constructs a new informer for HelmCategory type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHelmCategoryInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmCategories().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmCategories().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&applicationv1alpha1.HelmCategory{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *helmCategoryInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmCategoryInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *helmCategoryInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&applicationv1alpha1.HelmCategory{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *helmCategoryInformer) Lister() v1alpha1.HelmCategoryLister {
|
||||
return v1alpha1.NewHelmCategoryLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmReleaseInformer provides access to a shared informer and lister for
|
||||
// HelmReleases.
|
||||
type HelmReleaseInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.HelmReleaseLister
|
||||
}
|
||||
|
||||
type helmReleaseInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewHelmReleaseInformer constructs a new informer for HelmRelease type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHelmReleaseInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmReleaseInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHelmReleaseInformer constructs a new informer for HelmRelease type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHelmReleaseInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmReleases().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmReleases().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&applicationv1alpha1.HelmRelease{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *helmReleaseInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmReleaseInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *helmReleaseInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&applicationv1alpha1.HelmRelease{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *helmReleaseInformer) Lister() v1alpha1.HelmReleaseLister {
|
||||
return v1alpha1.NewHelmReleaseLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
applicationv1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmRepoInformer provides access to a shared informer and lister for
|
||||
// HelmRepos.
|
||||
type HelmRepoInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.HelmRepoLister
|
||||
}
|
||||
|
||||
type helmRepoInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewHelmRepoInformer constructs a new informer for HelmRepo type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHelmRepoInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmRepoInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHelmRepoInformer constructs a new informer for HelmRepo type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHelmRepoInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmRepos().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApplicationV1alpha1().HelmRepos().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&applicationv1alpha1.HelmRepo{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *helmRepoInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHelmRepoInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *helmRepoInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&applicationv1alpha1.HelmRepo{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *helmRepoInformer) Lister() v1alpha1.HelmRepoLister {
|
||||
return v1alpha1.NewHelmRepoLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// HelmApplications returns a HelmApplicationInformer.
|
||||
HelmApplications() HelmApplicationInformer
|
||||
// HelmApplicationVersions returns a HelmApplicationVersionInformer.
|
||||
HelmApplicationVersions() HelmApplicationVersionInformer
|
||||
// HelmCategories returns a HelmCategoryInformer.
|
||||
HelmCategories() HelmCategoryInformer
|
||||
// HelmReleases returns a HelmReleaseInformer.
|
||||
HelmReleases() HelmReleaseInformer
|
||||
// HelmRepos returns a HelmRepoInformer.
|
||||
HelmRepos() HelmRepoInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// HelmApplications returns a HelmApplicationInformer.
|
||||
func (v *version) HelmApplications() HelmApplicationInformer {
|
||||
return &helmApplicationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// HelmApplicationVersions returns a HelmApplicationVersionInformer.
|
||||
func (v *version) HelmApplicationVersions() HelmApplicationVersionInformer {
|
||||
return &helmApplicationVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// HelmCategories returns a HelmCategoryInformer.
|
||||
func (v *version) HelmCategories() HelmCategoryInformer {
|
||||
return &helmCategoryInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// HelmReleases returns a HelmReleaseInformer.
|
||||
func (v *version) HelmReleases() HelmReleaseInformer {
|
||||
return &helmReleaseInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// HelmRepos returns a HelmRepoInformer.
|
||||
func (v *version) HelmRepos() HelmRepoInformer {
|
||||
return &helmRepoInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
application "kubesphere.io/kubesphere/pkg/client/informers/externalversions/application"
|
||||
auditing "kubesphere.io/kubesphere/pkg/client/informers/externalversions/auditing"
|
||||
cluster "kubesphere.io/kubesphere/pkg/client/informers/externalversions/cluster"
|
||||
devops "kubesphere.io/kubesphere/pkg/client/informers/externalversions/devops"
|
||||
@@ -181,6 +182,7 @@ type SharedInformerFactory interface {
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
Application() application.Interface
|
||||
Auditing() auditing.Interface
|
||||
Cluster() cluster.Interface
|
||||
Devops() devops.Interface
|
||||
@@ -193,6 +195,10 @@ type SharedInformerFactory interface {
|
||||
Types() types.Interface
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Application() application.Interface {
|
||||
return application.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Auditing() auditing.Interface {
|
||||
return auditing.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ import (
|
||||
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/auditing/v1alpha1"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
auditingv1alpha1 "kubesphere.io/kubesphere/pkg/apis/auditing/v1alpha1"
|
||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
||||
devopsv1alpha1 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
|
||||
v1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||
@@ -63,10 +64,22 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
||||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=auditing.kubesphere.io, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("rules"):
|
||||
// Group=application.kubesphere.io, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("helmapplications"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Application().V1alpha1().HelmApplications().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("helmapplicationversions"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Application().V1alpha1().HelmApplicationVersions().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("helmcategories"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Application().V1alpha1().HelmCategories().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("helmreleases"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Application().V1alpha1().HelmReleases().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("helmrepos"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Application().V1alpha1().HelmRepos().Informer()}, nil
|
||||
|
||||
// Group=auditing.kubesphere.io, Version=v1alpha1
|
||||
case auditingv1alpha1.SchemeGroupVersion.WithResource("rules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Auditing().V1alpha1().Rules().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("webhooks"):
|
||||
case auditingv1alpha1.SchemeGroupVersion.WithResource("webhooks"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Auditing().V1alpha1().Webhooks().Informer()}, nil
|
||||
|
||||
// Group=cluster.kubesphere.io, Version=v1alpha1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// HelmApplicationListerExpansion allows custom methods to be added to
|
||||
// HelmApplicationLister.
|
||||
type HelmApplicationListerExpansion interface{}
|
||||
|
||||
// HelmApplicationVersionListerExpansion allows custom methods to be added to
|
||||
// HelmApplicationVersionLister.
|
||||
type HelmApplicationVersionListerExpansion interface{}
|
||||
|
||||
// HelmCategoryListerExpansion allows custom methods to be added to
|
||||
// HelmCategoryLister.
|
||||
type HelmCategoryListerExpansion interface{}
|
||||
|
||||
// HelmReleaseListerExpansion allows custom methods to be added to
|
||||
// HelmReleaseLister.
|
||||
type HelmReleaseListerExpansion interface{}
|
||||
|
||||
// HelmRepoListerExpansion allows custom methods to be added to
|
||||
// HelmRepoLister.
|
||||
type HelmRepoListerExpansion interface{}
|
||||
65
pkg/client/listers/application/v1alpha1/helmapplication.go
Normal file
65
pkg/client/listers/application/v1alpha1/helmapplication.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmApplicationLister helps list HelmApplications.
|
||||
type HelmApplicationLister interface {
|
||||
// List lists all HelmApplications in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.HelmApplication, err error)
|
||||
// Get retrieves the HelmApplication from the index for a given name.
|
||||
Get(name string) (*v1alpha1.HelmApplication, error)
|
||||
HelmApplicationListerExpansion
|
||||
}
|
||||
|
||||
// helmApplicationLister implements the HelmApplicationLister interface.
|
||||
type helmApplicationLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHelmApplicationLister returns a new HelmApplicationLister.
|
||||
func NewHelmApplicationLister(indexer cache.Indexer) HelmApplicationLister {
|
||||
return &helmApplicationLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HelmApplications in the indexer.
|
||||
func (s *helmApplicationLister) List(selector labels.Selector) (ret []*v1alpha1.HelmApplication, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.HelmApplication))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HelmApplication from the index for a given name.
|
||||
func (s *helmApplicationLister) Get(name string) (*v1alpha1.HelmApplication, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("helmapplication"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplication), nil
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmApplicationVersionLister helps list HelmApplicationVersions.
|
||||
type HelmApplicationVersionLister interface {
|
||||
// List lists all HelmApplicationVersions in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.HelmApplicationVersion, err error)
|
||||
// Get retrieves the HelmApplicationVersion from the index for a given name.
|
||||
Get(name string) (*v1alpha1.HelmApplicationVersion, error)
|
||||
HelmApplicationVersionListerExpansion
|
||||
}
|
||||
|
||||
// helmApplicationVersionLister implements the HelmApplicationVersionLister interface.
|
||||
type helmApplicationVersionLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHelmApplicationVersionLister returns a new HelmApplicationVersionLister.
|
||||
func NewHelmApplicationVersionLister(indexer cache.Indexer) HelmApplicationVersionLister {
|
||||
return &helmApplicationVersionLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HelmApplicationVersions in the indexer.
|
||||
func (s *helmApplicationVersionLister) List(selector labels.Selector) (ret []*v1alpha1.HelmApplicationVersion, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.HelmApplicationVersion))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HelmApplicationVersion from the index for a given name.
|
||||
func (s *helmApplicationVersionLister) Get(name string) (*v1alpha1.HelmApplicationVersion, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("helmapplicationversion"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.HelmApplicationVersion), nil
|
||||
}
|
||||
65
pkg/client/listers/application/v1alpha1/helmcategory.go
Normal file
65
pkg/client/listers/application/v1alpha1/helmcategory.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmCategoryLister helps list HelmCategories.
|
||||
type HelmCategoryLister interface {
|
||||
// List lists all HelmCategories in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.HelmCategory, err error)
|
||||
// Get retrieves the HelmCategory from the index for a given name.
|
||||
Get(name string) (*v1alpha1.HelmCategory, error)
|
||||
HelmCategoryListerExpansion
|
||||
}
|
||||
|
||||
// helmCategoryLister implements the HelmCategoryLister interface.
|
||||
type helmCategoryLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHelmCategoryLister returns a new HelmCategoryLister.
|
||||
func NewHelmCategoryLister(indexer cache.Indexer) HelmCategoryLister {
|
||||
return &helmCategoryLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HelmCategories in the indexer.
|
||||
func (s *helmCategoryLister) List(selector labels.Selector) (ret []*v1alpha1.HelmCategory, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.HelmCategory))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HelmCategory from the index for a given name.
|
||||
func (s *helmCategoryLister) Get(name string) (*v1alpha1.HelmCategory, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("helmcategory"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.HelmCategory), nil
|
||||
}
|
||||
65
pkg/client/listers/application/v1alpha1/helmrelease.go
Normal file
65
pkg/client/listers/application/v1alpha1/helmrelease.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmReleaseLister helps list HelmReleases.
|
||||
type HelmReleaseLister interface {
|
||||
// List lists all HelmReleases in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.HelmRelease, err error)
|
||||
// Get retrieves the HelmRelease from the index for a given name.
|
||||
Get(name string) (*v1alpha1.HelmRelease, error)
|
||||
HelmReleaseListerExpansion
|
||||
}
|
||||
|
||||
// helmReleaseLister implements the HelmReleaseLister interface.
|
||||
type helmReleaseLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHelmReleaseLister returns a new HelmReleaseLister.
|
||||
func NewHelmReleaseLister(indexer cache.Indexer) HelmReleaseLister {
|
||||
return &helmReleaseLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HelmReleases in the indexer.
|
||||
func (s *helmReleaseLister) List(selector labels.Selector) (ret []*v1alpha1.HelmRelease, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.HelmRelease))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HelmRelease from the index for a given name.
|
||||
func (s *helmReleaseLister) Get(name string) (*v1alpha1.HelmRelease, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("helmrelease"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRelease), nil
|
||||
}
|
||||
65
pkg/client/listers/application/v1alpha1/helmrepo.go
Normal file
65
pkg/client/listers/application/v1alpha1/helmrepo.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v1alpha1 "kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
|
||||
)
|
||||
|
||||
// HelmRepoLister helps list HelmRepos.
|
||||
type HelmRepoLister interface {
|
||||
// List lists all HelmRepos in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.HelmRepo, err error)
|
||||
// Get retrieves the HelmRepo from the index for a given name.
|
||||
Get(name string) (*v1alpha1.HelmRepo, error)
|
||||
HelmRepoListerExpansion
|
||||
}
|
||||
|
||||
// helmRepoLister implements the HelmRepoLister interface.
|
||||
type helmRepoLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHelmRepoLister returns a new HelmRepoLister.
|
||||
func NewHelmRepoLister(indexer cache.Indexer) HelmRepoLister {
|
||||
return &helmRepoLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HelmRepos in the indexer.
|
||||
func (s *helmRepoLister) List(selector labels.Selector) (ret []*v1alpha1.HelmRepo, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.HelmRepo))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HelmRepo from the index for a given name.
|
||||
func (s *helmRepoLister) Get(name string) (*v1alpha1.HelmRepo, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("helmrepo"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.HelmRepo), nil
|
||||
}
|
||||
Reference in New Issue
Block a user