diff --git a/apis/project.cattle.io/v3/zz_generated_deepcopy.go b/apis/project.cattle.io/v3/zz_generated_deepcopy.go index 4c510be5..91793c45 100644 --- a/apis/project.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/project.cattle.io/v3/zz_generated_deepcopy.go @@ -69,6 +69,46 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*Link).DeepCopyInto(out.(*Link)) return nil }, InType: reflect.TypeOf(&Link{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedBasicAuth).DeepCopyInto(out.(*NamespacedBasicAuth)) + return nil + }, InType: reflect.TypeOf(&NamespacedBasicAuth{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedBasicAuthList).DeepCopyInto(out.(*NamespacedBasicAuthList)) + return nil + }, InType: reflect.TypeOf(&NamespacedBasicAuthList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedCertificate).DeepCopyInto(out.(*NamespacedCertificate)) + return nil + }, InType: reflect.TypeOf(&NamespacedCertificate{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedCertificateList).DeepCopyInto(out.(*NamespacedCertificateList)) + return nil + }, InType: reflect.TypeOf(&NamespacedCertificateList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedDockerCredential).DeepCopyInto(out.(*NamespacedDockerCredential)) + return nil + }, InType: reflect.TypeOf(&NamespacedDockerCredential{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedDockerCredentialList).DeepCopyInto(out.(*NamespacedDockerCredentialList)) + return nil + }, InType: reflect.TypeOf(&NamespacedDockerCredentialList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedSSHAuth).DeepCopyInto(out.(*NamespacedSSHAuth)) + return nil + }, InType: reflect.TypeOf(&NamespacedSSHAuth{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedSSHAuthList).DeepCopyInto(out.(*NamespacedSSHAuthList)) + return nil + }, InType: reflect.TypeOf(&NamespacedSSHAuthList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedServiceAccountToken).DeepCopyInto(out.(*NamespacedServiceAccountToken)) + return nil + }, InType: reflect.TypeOf(&NamespacedServiceAccountToken{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*NamespacedServiceAccountTokenList).DeepCopyInto(out.(*NamespacedServiceAccountTokenList)) + return nil + }, InType: reflect.TypeOf(&NamespacedServiceAccountTokenList{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*RegistryCredential).DeepCopyInto(out.(*RegistryCredential)) return nil @@ -111,6 +151,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BasicAuth) DeepCopyInto(out *BasicAuth) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return @@ -172,6 +213,7 @@ func (in *BasicAuthList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Certificate) DeepCopyInto(out *Certificate) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return @@ -374,6 +416,7 @@ func (in *DeploymentParallelConfig) DeepCopy() *DeploymentParallelConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DockerCredential) DeepCopyInto(out *DockerCredential) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Registries != nil { @@ -455,6 +498,323 @@ func (in *Link) DeepCopy() *Link { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedBasicAuth) DeepCopyInto(out *NamespacedBasicAuth) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedBasicAuth. +func (in *NamespacedBasicAuth) DeepCopy() *NamespacedBasicAuth { + if in == nil { + return nil + } + out := new(NamespacedBasicAuth) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedBasicAuth) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedBasicAuthList) DeepCopyInto(out *NamespacedBasicAuthList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NamespacedBasicAuth, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedBasicAuthList. +func (in *NamespacedBasicAuthList) DeepCopy() *NamespacedBasicAuthList { + if in == nil { + return nil + } + out := new(NamespacedBasicAuthList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedBasicAuthList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedCertificate) DeepCopyInto(out *NamespacedCertificate) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedCertificate. +func (in *NamespacedCertificate) DeepCopy() *NamespacedCertificate { + if in == nil { + return nil + } + out := new(NamespacedCertificate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedCertificate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedCertificateList) DeepCopyInto(out *NamespacedCertificateList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NamespacedCertificate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedCertificateList. +func (in *NamespacedCertificateList) DeepCopy() *NamespacedCertificateList { + if in == nil { + return nil + } + out := new(NamespacedCertificateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedCertificateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedDockerCredential) DeepCopyInto(out *NamespacedDockerCredential) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Registries != nil { + in, out := &in.Registries, &out.Registries + *out = make(map[string]RegistryCredential, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedDockerCredential. +func (in *NamespacedDockerCredential) DeepCopy() *NamespacedDockerCredential { + if in == nil { + return nil + } + out := new(NamespacedDockerCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedDockerCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedDockerCredentialList) DeepCopyInto(out *NamespacedDockerCredentialList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NamespacedDockerCredential, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedDockerCredentialList. +func (in *NamespacedDockerCredentialList) DeepCopy() *NamespacedDockerCredentialList { + if in == nil { + return nil + } + out := new(NamespacedDockerCredentialList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedDockerCredentialList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedSSHAuth) DeepCopyInto(out *NamespacedSSHAuth) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedSSHAuth. +func (in *NamespacedSSHAuth) DeepCopy() *NamespacedSSHAuth { + if in == nil { + return nil + } + out := new(NamespacedSSHAuth) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedSSHAuth) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedSSHAuthList) DeepCopyInto(out *NamespacedSSHAuthList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NamespacedSSHAuth, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedSSHAuthList. +func (in *NamespacedSSHAuthList) DeepCopy() *NamespacedSSHAuthList { + if in == nil { + return nil + } + out := new(NamespacedSSHAuthList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedSSHAuthList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedServiceAccountToken) DeepCopyInto(out *NamespacedServiceAccountToken) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedServiceAccountToken. +func (in *NamespacedServiceAccountToken) DeepCopy() *NamespacedServiceAccountToken { + if in == nil { + return nil + } + out := new(NamespacedServiceAccountToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedServiceAccountToken) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespacedServiceAccountTokenList) DeepCopyInto(out *NamespacedServiceAccountTokenList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NamespacedServiceAccountToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedServiceAccountTokenList. +func (in *NamespacedServiceAccountTokenList) DeepCopy() *NamespacedServiceAccountTokenList { + if in == nil { + return nil + } + out := new(NamespacedServiceAccountTokenList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespacedServiceAccountTokenList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RegistryCredential) DeepCopyInto(out *RegistryCredential) { *out = *in @@ -474,6 +834,7 @@ func (in *RegistryCredential) DeepCopy() *RegistryCredential { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SSHAuth) DeepCopyInto(out *SSHAuth) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return @@ -535,6 +896,7 @@ func (in *SSHAuthList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceAccountToken) DeepCopyInto(out *ServiceAccountToken) { *out = *in + out.Namespaced = in.Namespaced out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) return diff --git a/apis/project.cattle.io/v3/zz_generated_k8s_client.go b/apis/project.cattle.io/v3/zz_generated_k8s_client.go index b688f145..e6e37a36 100644 --- a/apis/project.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/project.cattle.io/v3/zz_generated_k8s_client.go @@ -19,6 +19,11 @@ type Interface interface { CertificatesGetter BasicAuthsGetter SSHAuthsGetter + NamespacedServiceAccountTokensGetter + NamespacedDockerCredentialsGetter + NamespacedCertificatesGetter + NamespacedBasicAuthsGetter + NamespacedSSHAuthsGetter WorkloadsGetter } @@ -27,12 +32,17 @@ type Client struct { restClient rest.Interface starters []controller.Starter - serviceAccountTokenControllers map[string]ServiceAccountTokenController - dockerCredentialControllers map[string]DockerCredentialController - certificateControllers map[string]CertificateController - basicAuthControllers map[string]BasicAuthController - sshAuthControllers map[string]SSHAuthController - workloadControllers map[string]WorkloadController + serviceAccountTokenControllers map[string]ServiceAccountTokenController + dockerCredentialControllers map[string]DockerCredentialController + certificateControllers map[string]CertificateController + basicAuthControllers map[string]BasicAuthController + sshAuthControllers map[string]SSHAuthController + namespacedServiceAccountTokenControllers map[string]NamespacedServiceAccountTokenController + namespacedDockerCredentialControllers map[string]NamespacedDockerCredentialController + namespacedCertificateControllers map[string]NamespacedCertificateController + namespacedBasicAuthControllers map[string]NamespacedBasicAuthController + namespacedSshAuthControllers map[string]NamespacedSSHAuthController + workloadControllers map[string]WorkloadController } func NewForConfig(config rest.Config) (Interface, error) { @@ -49,12 +59,17 @@ func NewForConfig(config rest.Config) (Interface, error) { return &Client{ restClient: restClient, - serviceAccountTokenControllers: map[string]ServiceAccountTokenController{}, - dockerCredentialControllers: map[string]DockerCredentialController{}, - certificateControllers: map[string]CertificateController{}, - basicAuthControllers: map[string]BasicAuthController{}, - sshAuthControllers: map[string]SSHAuthController{}, - workloadControllers: map[string]WorkloadController{}, + serviceAccountTokenControllers: map[string]ServiceAccountTokenController{}, + dockerCredentialControllers: map[string]DockerCredentialController{}, + certificateControllers: map[string]CertificateController{}, + basicAuthControllers: map[string]BasicAuthController{}, + sshAuthControllers: map[string]SSHAuthController{}, + namespacedServiceAccountTokenControllers: map[string]NamespacedServiceAccountTokenController{}, + namespacedDockerCredentialControllers: map[string]NamespacedDockerCredentialController{}, + namespacedCertificateControllers: map[string]NamespacedCertificateController{}, + namespacedBasicAuthControllers: map[string]NamespacedBasicAuthController{}, + namespacedSshAuthControllers: map[string]NamespacedSSHAuthController{}, + workloadControllers: map[string]WorkloadController{}, }, nil } @@ -135,6 +150,71 @@ func (c *Client) SSHAuths(namespace string) SSHAuthInterface { } } +type NamespacedServiceAccountTokensGetter interface { + NamespacedServiceAccountTokens(namespace string) NamespacedServiceAccountTokenInterface +} + +func (c *Client) NamespacedServiceAccountTokens(namespace string) NamespacedServiceAccountTokenInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &NamespacedServiceAccountTokenResource, NamespacedServiceAccountTokenGroupVersionKind, namespacedServiceAccountTokenFactory{}) + return &namespacedServiceAccountTokenClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type NamespacedDockerCredentialsGetter interface { + NamespacedDockerCredentials(namespace string) NamespacedDockerCredentialInterface +} + +func (c *Client) NamespacedDockerCredentials(namespace string) NamespacedDockerCredentialInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &NamespacedDockerCredentialResource, NamespacedDockerCredentialGroupVersionKind, namespacedDockerCredentialFactory{}) + return &namespacedDockerCredentialClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type NamespacedCertificatesGetter interface { + NamespacedCertificates(namespace string) NamespacedCertificateInterface +} + +func (c *Client) NamespacedCertificates(namespace string) NamespacedCertificateInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &NamespacedCertificateResource, NamespacedCertificateGroupVersionKind, namespacedCertificateFactory{}) + return &namespacedCertificateClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type NamespacedBasicAuthsGetter interface { + NamespacedBasicAuths(namespace string) NamespacedBasicAuthInterface +} + +func (c *Client) NamespacedBasicAuths(namespace string) NamespacedBasicAuthInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &NamespacedBasicAuthResource, NamespacedBasicAuthGroupVersionKind, namespacedBasicAuthFactory{}) + return &namespacedBasicAuthClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type NamespacedSSHAuthsGetter interface { + NamespacedSSHAuths(namespace string) NamespacedSSHAuthInterface +} + +func (c *Client) NamespacedSSHAuths(namespace string) NamespacedSSHAuthInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &NamespacedSSHAuthResource, NamespacedSSHAuthGroupVersionKind, namespacedSshAuthFactory{}) + return &namespacedSshAuthClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + type WorkloadsGetter interface { Workloads(namespace string) WorkloadInterface } diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go new file mode 100644 index 00000000..7c0968cc --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go @@ -0,0 +1,211 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + NamespacedBasicAuthGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "NamespacedBasicAuth", + } + NamespacedBasicAuthResource = metav1.APIResource{ + Name: "namespacedbasicauths", + SingularName: "namespacedbasicauth", + Namespaced: true, + + Kind: NamespacedBasicAuthGroupVersionKind.Kind, + } +) + +type NamespacedBasicAuthList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NamespacedBasicAuth +} + +type NamespacedBasicAuthHandlerFunc func(key string, obj *NamespacedBasicAuth) error + +type NamespacedBasicAuthLister interface { + List(namespace string, selector labels.Selector) (ret []*NamespacedBasicAuth, err error) + Get(namespace, name string) (*NamespacedBasicAuth, error) +} + +type NamespacedBasicAuthController interface { + Informer() cache.SharedIndexInformer + Lister() NamespacedBasicAuthLister + AddHandler(handler NamespacedBasicAuthHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type NamespacedBasicAuthInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*NamespacedBasicAuth) (*NamespacedBasicAuth, error) + Get(name string, opts metav1.GetOptions) (*NamespacedBasicAuth, error) + Update(*NamespacedBasicAuth) (*NamespacedBasicAuth, error) + Delete(name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*NamespacedBasicAuthList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() NamespacedBasicAuthController + AddSyncHandler(sync NamespacedBasicAuthHandlerFunc) + AddLifecycle(name string, lifecycle NamespacedBasicAuthLifecycle) +} + +type namespacedBasicAuthLister struct { + controller *namespacedBasicAuthController +} + +func (l *namespacedBasicAuthLister) List(namespace string, selector labels.Selector) (ret []*NamespacedBasicAuth, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*NamespacedBasicAuth)) + }) + return +} + +func (l *namespacedBasicAuthLister) Get(namespace, name string) (*NamespacedBasicAuth, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: NamespacedBasicAuthGroupVersionKind.Group, + Resource: "namespacedBasicAuth", + }, name) + } + return obj.(*NamespacedBasicAuth), nil +} + +type namespacedBasicAuthController struct { + controller.GenericController +} + +func (c *namespacedBasicAuthController) Lister() NamespacedBasicAuthLister { + return &namespacedBasicAuthLister{ + controller: c, + } +} + +func (c *namespacedBasicAuthController) AddHandler(handler NamespacedBasicAuthHandlerFunc) { + c.GenericController.AddHandler(func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*NamespacedBasicAuth)) + }) +} + +type namespacedBasicAuthFactory struct { +} + +func (c namespacedBasicAuthFactory) Object() runtime.Object { + return &NamespacedBasicAuth{} +} + +func (c namespacedBasicAuthFactory) List() runtime.Object { + return &NamespacedBasicAuthList{} +} + +func (s *namespacedBasicAuthClient) Controller() NamespacedBasicAuthController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.namespacedBasicAuthControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(NamespacedBasicAuthGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &namespacedBasicAuthController{ + GenericController: genericController, + } + + s.client.namespacedBasicAuthControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type namespacedBasicAuthClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller NamespacedBasicAuthController +} + +func (s *namespacedBasicAuthClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *namespacedBasicAuthClient) Create(o *NamespacedBasicAuth) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.Create(o) + return obj.(*NamespacedBasicAuth), err +} + +func (s *namespacedBasicAuthClient) Get(name string, opts metav1.GetOptions) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*NamespacedBasicAuth), err +} + +func (s *namespacedBasicAuthClient) Update(o *NamespacedBasicAuth) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*NamespacedBasicAuth), err +} + +func (s *namespacedBasicAuthClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *namespacedBasicAuthClient) List(opts metav1.ListOptions) (*NamespacedBasicAuthList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*NamespacedBasicAuthList), err +} + +func (s *namespacedBasicAuthClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *namespacedBasicAuthClient) Patch(o *NamespacedBasicAuth, data []byte, subresources ...string) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*NamespacedBasicAuth), err +} + +func (s *namespacedBasicAuthClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *namespacedBasicAuthClient) AddSyncHandler(sync NamespacedBasicAuthHandlerFunc) { + s.Controller().AddHandler(sync) +} + +func (s *namespacedBasicAuthClient) AddLifecycle(name string, lifecycle NamespacedBasicAuthLifecycle) { + sync := NewNamespacedBasicAuthLifecycleAdapter(name, s, lifecycle) + s.AddSyncHandler(sync) +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go new file mode 100644 index 00000000..f8503c3c --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type NamespacedBasicAuthLifecycle interface { + Create(obj *NamespacedBasicAuth) (*NamespacedBasicAuth, error) + Remove(obj *NamespacedBasicAuth) (*NamespacedBasicAuth, error) + Updated(obj *NamespacedBasicAuth) (*NamespacedBasicAuth, error) +} + +type namespacedBasicAuthLifecycleAdapter struct { + lifecycle NamespacedBasicAuthLifecycle +} + +func (w *namespacedBasicAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*NamespacedBasicAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedBasicAuthLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*NamespacedBasicAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedBasicAuthLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*NamespacedBasicAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func NewNamespacedBasicAuthLifecycleAdapter(name string, client NamespacedBasicAuthInterface, l NamespacedBasicAuthLifecycle) NamespacedBasicAuthHandlerFunc { + adapter := &namespacedBasicAuthLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient()) + return func(key string, obj *NamespacedBasicAuth) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go new file mode 100644 index 00000000..e40f0d8b --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go @@ -0,0 +1,211 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + NamespacedCertificateGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "NamespacedCertificate", + } + NamespacedCertificateResource = metav1.APIResource{ + Name: "namespacedcertificates", + SingularName: "namespacedcertificate", + Namespaced: true, + + Kind: NamespacedCertificateGroupVersionKind.Kind, + } +) + +type NamespacedCertificateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NamespacedCertificate +} + +type NamespacedCertificateHandlerFunc func(key string, obj *NamespacedCertificate) error + +type NamespacedCertificateLister interface { + List(namespace string, selector labels.Selector) (ret []*NamespacedCertificate, err error) + Get(namespace, name string) (*NamespacedCertificate, error) +} + +type NamespacedCertificateController interface { + Informer() cache.SharedIndexInformer + Lister() NamespacedCertificateLister + AddHandler(handler NamespacedCertificateHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type NamespacedCertificateInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*NamespacedCertificate) (*NamespacedCertificate, error) + Get(name string, opts metav1.GetOptions) (*NamespacedCertificate, error) + Update(*NamespacedCertificate) (*NamespacedCertificate, error) + Delete(name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*NamespacedCertificateList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() NamespacedCertificateController + AddSyncHandler(sync NamespacedCertificateHandlerFunc) + AddLifecycle(name string, lifecycle NamespacedCertificateLifecycle) +} + +type namespacedCertificateLister struct { + controller *namespacedCertificateController +} + +func (l *namespacedCertificateLister) List(namespace string, selector labels.Selector) (ret []*NamespacedCertificate, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*NamespacedCertificate)) + }) + return +} + +func (l *namespacedCertificateLister) Get(namespace, name string) (*NamespacedCertificate, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: NamespacedCertificateGroupVersionKind.Group, + Resource: "namespacedCertificate", + }, name) + } + return obj.(*NamespacedCertificate), nil +} + +type namespacedCertificateController struct { + controller.GenericController +} + +func (c *namespacedCertificateController) Lister() NamespacedCertificateLister { + return &namespacedCertificateLister{ + controller: c, + } +} + +func (c *namespacedCertificateController) AddHandler(handler NamespacedCertificateHandlerFunc) { + c.GenericController.AddHandler(func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*NamespacedCertificate)) + }) +} + +type namespacedCertificateFactory struct { +} + +func (c namespacedCertificateFactory) Object() runtime.Object { + return &NamespacedCertificate{} +} + +func (c namespacedCertificateFactory) List() runtime.Object { + return &NamespacedCertificateList{} +} + +func (s *namespacedCertificateClient) Controller() NamespacedCertificateController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.namespacedCertificateControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(NamespacedCertificateGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &namespacedCertificateController{ + GenericController: genericController, + } + + s.client.namespacedCertificateControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type namespacedCertificateClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller NamespacedCertificateController +} + +func (s *namespacedCertificateClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *namespacedCertificateClient) Create(o *NamespacedCertificate) (*NamespacedCertificate, error) { + obj, err := s.objectClient.Create(o) + return obj.(*NamespacedCertificate), err +} + +func (s *namespacedCertificateClient) Get(name string, opts metav1.GetOptions) (*NamespacedCertificate, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*NamespacedCertificate), err +} + +func (s *namespacedCertificateClient) Update(o *NamespacedCertificate) (*NamespacedCertificate, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*NamespacedCertificate), err +} + +func (s *namespacedCertificateClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *namespacedCertificateClient) List(opts metav1.ListOptions) (*NamespacedCertificateList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*NamespacedCertificateList), err +} + +func (s *namespacedCertificateClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *namespacedCertificateClient) Patch(o *NamespacedCertificate, data []byte, subresources ...string) (*NamespacedCertificate, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*NamespacedCertificate), err +} + +func (s *namespacedCertificateClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *namespacedCertificateClient) AddSyncHandler(sync NamespacedCertificateHandlerFunc) { + s.Controller().AddHandler(sync) +} + +func (s *namespacedCertificateClient) AddLifecycle(name string, lifecycle NamespacedCertificateLifecycle) { + sync := NewNamespacedCertificateLifecycleAdapter(name, s, lifecycle) + s.AddSyncHandler(sync) +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go new file mode 100644 index 00000000..accaa5bc --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type NamespacedCertificateLifecycle interface { + Create(obj *NamespacedCertificate) (*NamespacedCertificate, error) + Remove(obj *NamespacedCertificate) (*NamespacedCertificate, error) + Updated(obj *NamespacedCertificate) (*NamespacedCertificate, error) +} + +type namespacedCertificateLifecycleAdapter struct { + lifecycle NamespacedCertificateLifecycle +} + +func (w *namespacedCertificateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*NamespacedCertificate)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedCertificateLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*NamespacedCertificate)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedCertificateLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*NamespacedCertificate)) + if o == nil { + return nil, err + } + return o, err +} + +func NewNamespacedCertificateLifecycleAdapter(name string, client NamespacedCertificateInterface, l NamespacedCertificateLifecycle) NamespacedCertificateHandlerFunc { + adapter := &namespacedCertificateLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient()) + return func(key string, obj *NamespacedCertificate) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go new file mode 100644 index 00000000..2a44dce0 --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go @@ -0,0 +1,211 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + NamespacedDockerCredentialGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "NamespacedDockerCredential", + } + NamespacedDockerCredentialResource = metav1.APIResource{ + Name: "namespaceddockercredentials", + SingularName: "namespaceddockercredential", + Namespaced: true, + + Kind: NamespacedDockerCredentialGroupVersionKind.Kind, + } +) + +type NamespacedDockerCredentialList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NamespacedDockerCredential +} + +type NamespacedDockerCredentialHandlerFunc func(key string, obj *NamespacedDockerCredential) error + +type NamespacedDockerCredentialLister interface { + List(namespace string, selector labels.Selector) (ret []*NamespacedDockerCredential, err error) + Get(namespace, name string) (*NamespacedDockerCredential, error) +} + +type NamespacedDockerCredentialController interface { + Informer() cache.SharedIndexInformer + Lister() NamespacedDockerCredentialLister + AddHandler(handler NamespacedDockerCredentialHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type NamespacedDockerCredentialInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*NamespacedDockerCredential) (*NamespacedDockerCredential, error) + Get(name string, opts metav1.GetOptions) (*NamespacedDockerCredential, error) + Update(*NamespacedDockerCredential) (*NamespacedDockerCredential, error) + Delete(name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*NamespacedDockerCredentialList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() NamespacedDockerCredentialController + AddSyncHandler(sync NamespacedDockerCredentialHandlerFunc) + AddLifecycle(name string, lifecycle NamespacedDockerCredentialLifecycle) +} + +type namespacedDockerCredentialLister struct { + controller *namespacedDockerCredentialController +} + +func (l *namespacedDockerCredentialLister) List(namespace string, selector labels.Selector) (ret []*NamespacedDockerCredential, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*NamespacedDockerCredential)) + }) + return +} + +func (l *namespacedDockerCredentialLister) Get(namespace, name string) (*NamespacedDockerCredential, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: NamespacedDockerCredentialGroupVersionKind.Group, + Resource: "namespacedDockerCredential", + }, name) + } + return obj.(*NamespacedDockerCredential), nil +} + +type namespacedDockerCredentialController struct { + controller.GenericController +} + +func (c *namespacedDockerCredentialController) Lister() NamespacedDockerCredentialLister { + return &namespacedDockerCredentialLister{ + controller: c, + } +} + +func (c *namespacedDockerCredentialController) AddHandler(handler NamespacedDockerCredentialHandlerFunc) { + c.GenericController.AddHandler(func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*NamespacedDockerCredential)) + }) +} + +type namespacedDockerCredentialFactory struct { +} + +func (c namespacedDockerCredentialFactory) Object() runtime.Object { + return &NamespacedDockerCredential{} +} + +func (c namespacedDockerCredentialFactory) List() runtime.Object { + return &NamespacedDockerCredentialList{} +} + +func (s *namespacedDockerCredentialClient) Controller() NamespacedDockerCredentialController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.namespacedDockerCredentialControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(NamespacedDockerCredentialGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &namespacedDockerCredentialController{ + GenericController: genericController, + } + + s.client.namespacedDockerCredentialControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type namespacedDockerCredentialClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller NamespacedDockerCredentialController +} + +func (s *namespacedDockerCredentialClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *namespacedDockerCredentialClient) Create(o *NamespacedDockerCredential) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.Create(o) + return obj.(*NamespacedDockerCredential), err +} + +func (s *namespacedDockerCredentialClient) Get(name string, opts metav1.GetOptions) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*NamespacedDockerCredential), err +} + +func (s *namespacedDockerCredentialClient) Update(o *NamespacedDockerCredential) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*NamespacedDockerCredential), err +} + +func (s *namespacedDockerCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *namespacedDockerCredentialClient) List(opts metav1.ListOptions) (*NamespacedDockerCredentialList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*NamespacedDockerCredentialList), err +} + +func (s *namespacedDockerCredentialClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *namespacedDockerCredentialClient) Patch(o *NamespacedDockerCredential, data []byte, subresources ...string) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*NamespacedDockerCredential), err +} + +func (s *namespacedDockerCredentialClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *namespacedDockerCredentialClient) AddSyncHandler(sync NamespacedDockerCredentialHandlerFunc) { + s.Controller().AddHandler(sync) +} + +func (s *namespacedDockerCredentialClient) AddLifecycle(name string, lifecycle NamespacedDockerCredentialLifecycle) { + sync := NewNamespacedDockerCredentialLifecycleAdapter(name, s, lifecycle) + s.AddSyncHandler(sync) +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go new file mode 100644 index 00000000..5f13e7b5 --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type NamespacedDockerCredentialLifecycle interface { + Create(obj *NamespacedDockerCredential) (*NamespacedDockerCredential, error) + Remove(obj *NamespacedDockerCredential) (*NamespacedDockerCredential, error) + Updated(obj *NamespacedDockerCredential) (*NamespacedDockerCredential, error) +} + +type namespacedDockerCredentialLifecycleAdapter struct { + lifecycle NamespacedDockerCredentialLifecycle +} + +func (w *namespacedDockerCredentialLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*NamespacedDockerCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedDockerCredentialLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*NamespacedDockerCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedDockerCredentialLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*NamespacedDockerCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func NewNamespacedDockerCredentialLifecycleAdapter(name string, client NamespacedDockerCredentialInterface, l NamespacedDockerCredentialLifecycle) NamespacedDockerCredentialHandlerFunc { + adapter := &namespacedDockerCredentialLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient()) + return func(key string, obj *NamespacedDockerCredential) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go new file mode 100644 index 00000000..9ba389db --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go @@ -0,0 +1,211 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + NamespacedServiceAccountTokenGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "NamespacedServiceAccountToken", + } + NamespacedServiceAccountTokenResource = metav1.APIResource{ + Name: "namespacedserviceaccounttokens", + SingularName: "namespacedserviceaccounttoken", + Namespaced: true, + + Kind: NamespacedServiceAccountTokenGroupVersionKind.Kind, + } +) + +type NamespacedServiceAccountTokenList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NamespacedServiceAccountToken +} + +type NamespacedServiceAccountTokenHandlerFunc func(key string, obj *NamespacedServiceAccountToken) error + +type NamespacedServiceAccountTokenLister interface { + List(namespace string, selector labels.Selector) (ret []*NamespacedServiceAccountToken, err error) + Get(namespace, name string) (*NamespacedServiceAccountToken, error) +} + +type NamespacedServiceAccountTokenController interface { + Informer() cache.SharedIndexInformer + Lister() NamespacedServiceAccountTokenLister + AddHandler(handler NamespacedServiceAccountTokenHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type NamespacedServiceAccountTokenInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) + Get(name string, opts metav1.GetOptions) (*NamespacedServiceAccountToken, error) + Update(*NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) + Delete(name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*NamespacedServiceAccountTokenList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() NamespacedServiceAccountTokenController + AddSyncHandler(sync NamespacedServiceAccountTokenHandlerFunc) + AddLifecycle(name string, lifecycle NamespacedServiceAccountTokenLifecycle) +} + +type namespacedServiceAccountTokenLister struct { + controller *namespacedServiceAccountTokenController +} + +func (l *namespacedServiceAccountTokenLister) List(namespace string, selector labels.Selector) (ret []*NamespacedServiceAccountToken, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*NamespacedServiceAccountToken)) + }) + return +} + +func (l *namespacedServiceAccountTokenLister) Get(namespace, name string) (*NamespacedServiceAccountToken, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: NamespacedServiceAccountTokenGroupVersionKind.Group, + Resource: "namespacedServiceAccountToken", + }, name) + } + return obj.(*NamespacedServiceAccountToken), nil +} + +type namespacedServiceAccountTokenController struct { + controller.GenericController +} + +func (c *namespacedServiceAccountTokenController) Lister() NamespacedServiceAccountTokenLister { + return &namespacedServiceAccountTokenLister{ + controller: c, + } +} + +func (c *namespacedServiceAccountTokenController) AddHandler(handler NamespacedServiceAccountTokenHandlerFunc) { + c.GenericController.AddHandler(func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*NamespacedServiceAccountToken)) + }) +} + +type namespacedServiceAccountTokenFactory struct { +} + +func (c namespacedServiceAccountTokenFactory) Object() runtime.Object { + return &NamespacedServiceAccountToken{} +} + +func (c namespacedServiceAccountTokenFactory) List() runtime.Object { + return &NamespacedServiceAccountTokenList{} +} + +func (s *namespacedServiceAccountTokenClient) Controller() NamespacedServiceAccountTokenController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.namespacedServiceAccountTokenControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(NamespacedServiceAccountTokenGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &namespacedServiceAccountTokenController{ + GenericController: genericController, + } + + s.client.namespacedServiceAccountTokenControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type namespacedServiceAccountTokenClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller NamespacedServiceAccountTokenController +} + +func (s *namespacedServiceAccountTokenClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *namespacedServiceAccountTokenClient) Create(o *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.Create(o) + return obj.(*NamespacedServiceAccountToken), err +} + +func (s *namespacedServiceAccountTokenClient) Get(name string, opts metav1.GetOptions) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*NamespacedServiceAccountToken), err +} + +func (s *namespacedServiceAccountTokenClient) Update(o *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*NamespacedServiceAccountToken), err +} + +func (s *namespacedServiceAccountTokenClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *namespacedServiceAccountTokenClient) List(opts metav1.ListOptions) (*NamespacedServiceAccountTokenList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*NamespacedServiceAccountTokenList), err +} + +func (s *namespacedServiceAccountTokenClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *namespacedServiceAccountTokenClient) Patch(o *NamespacedServiceAccountToken, data []byte, subresources ...string) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*NamespacedServiceAccountToken), err +} + +func (s *namespacedServiceAccountTokenClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *namespacedServiceAccountTokenClient) AddSyncHandler(sync NamespacedServiceAccountTokenHandlerFunc) { + s.Controller().AddHandler(sync) +} + +func (s *namespacedServiceAccountTokenClient) AddLifecycle(name string, lifecycle NamespacedServiceAccountTokenLifecycle) { + sync := NewNamespacedServiceAccountTokenLifecycleAdapter(name, s, lifecycle) + s.AddSyncHandler(sync) +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go new file mode 100644 index 00000000..7119b387 --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type NamespacedServiceAccountTokenLifecycle interface { + Create(obj *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) + Remove(obj *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) + Updated(obj *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) +} + +type namespacedServiceAccountTokenLifecycleAdapter struct { + lifecycle NamespacedServiceAccountTokenLifecycle +} + +func (w *namespacedServiceAccountTokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*NamespacedServiceAccountToken)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedServiceAccountTokenLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*NamespacedServiceAccountToken)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedServiceAccountTokenLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*NamespacedServiceAccountToken)) + if o == nil { + return nil, err + } + return o, err +} + +func NewNamespacedServiceAccountTokenLifecycleAdapter(name string, client NamespacedServiceAccountTokenInterface, l NamespacedServiceAccountTokenLifecycle) NamespacedServiceAccountTokenHandlerFunc { + adapter := &namespacedServiceAccountTokenLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient()) + return func(key string, obj *NamespacedServiceAccountToken) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go new file mode 100644 index 00000000..4352ff90 --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go @@ -0,0 +1,211 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + NamespacedSSHAuthGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "NamespacedSSHAuth", + } + NamespacedSSHAuthResource = metav1.APIResource{ + Name: "namespacedsshauths", + SingularName: "namespacedsshauth", + Namespaced: true, + + Kind: NamespacedSSHAuthGroupVersionKind.Kind, + } +) + +type NamespacedSSHAuthList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NamespacedSSHAuth +} + +type NamespacedSSHAuthHandlerFunc func(key string, obj *NamespacedSSHAuth) error + +type NamespacedSSHAuthLister interface { + List(namespace string, selector labels.Selector) (ret []*NamespacedSSHAuth, err error) + Get(namespace, name string) (*NamespacedSSHAuth, error) +} + +type NamespacedSSHAuthController interface { + Informer() cache.SharedIndexInformer + Lister() NamespacedSSHAuthLister + AddHandler(handler NamespacedSSHAuthHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type NamespacedSSHAuthInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*NamespacedSSHAuth) (*NamespacedSSHAuth, error) + Get(name string, opts metav1.GetOptions) (*NamespacedSSHAuth, error) + Update(*NamespacedSSHAuth) (*NamespacedSSHAuth, error) + Delete(name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*NamespacedSSHAuthList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() NamespacedSSHAuthController + AddSyncHandler(sync NamespacedSSHAuthHandlerFunc) + AddLifecycle(name string, lifecycle NamespacedSSHAuthLifecycle) +} + +type namespacedSshAuthLister struct { + controller *namespacedSshAuthController +} + +func (l *namespacedSshAuthLister) List(namespace string, selector labels.Selector) (ret []*NamespacedSSHAuth, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*NamespacedSSHAuth)) + }) + return +} + +func (l *namespacedSshAuthLister) Get(namespace, name string) (*NamespacedSSHAuth, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: NamespacedSSHAuthGroupVersionKind.Group, + Resource: "namespacedSshAuth", + }, name) + } + return obj.(*NamespacedSSHAuth), nil +} + +type namespacedSshAuthController struct { + controller.GenericController +} + +func (c *namespacedSshAuthController) Lister() NamespacedSSHAuthLister { + return &namespacedSshAuthLister{ + controller: c, + } +} + +func (c *namespacedSshAuthController) AddHandler(handler NamespacedSSHAuthHandlerFunc) { + c.GenericController.AddHandler(func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*NamespacedSSHAuth)) + }) +} + +type namespacedSshAuthFactory struct { +} + +func (c namespacedSshAuthFactory) Object() runtime.Object { + return &NamespacedSSHAuth{} +} + +func (c namespacedSshAuthFactory) List() runtime.Object { + return &NamespacedSSHAuthList{} +} + +func (s *namespacedSshAuthClient) Controller() NamespacedSSHAuthController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.namespacedSshAuthControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(NamespacedSSHAuthGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &namespacedSshAuthController{ + GenericController: genericController, + } + + s.client.namespacedSshAuthControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type namespacedSshAuthClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller NamespacedSSHAuthController +} + +func (s *namespacedSshAuthClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *namespacedSshAuthClient) Create(o *NamespacedSSHAuth) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.Create(o) + return obj.(*NamespacedSSHAuth), err +} + +func (s *namespacedSshAuthClient) Get(name string, opts metav1.GetOptions) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*NamespacedSSHAuth), err +} + +func (s *namespacedSshAuthClient) Update(o *NamespacedSSHAuth) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*NamespacedSSHAuth), err +} + +func (s *namespacedSshAuthClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *namespacedSshAuthClient) List(opts metav1.ListOptions) (*NamespacedSSHAuthList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*NamespacedSSHAuthList), err +} + +func (s *namespacedSshAuthClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *namespacedSshAuthClient) Patch(o *NamespacedSSHAuth, data []byte, subresources ...string) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*NamespacedSSHAuth), err +} + +func (s *namespacedSshAuthClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *namespacedSshAuthClient) AddSyncHandler(sync NamespacedSSHAuthHandlerFunc) { + s.Controller().AddHandler(sync) +} + +func (s *namespacedSshAuthClient) AddLifecycle(name string, lifecycle NamespacedSSHAuthLifecycle) { + sync := NewNamespacedSSHAuthLifecycleAdapter(name, s, lifecycle) + s.AddSyncHandler(sync) +} diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go new file mode 100644 index 00000000..c0c2d42b --- /dev/null +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type NamespacedSSHAuthLifecycle interface { + Create(obj *NamespacedSSHAuth) (*NamespacedSSHAuth, error) + Remove(obj *NamespacedSSHAuth) (*NamespacedSSHAuth, error) + Updated(obj *NamespacedSSHAuth) (*NamespacedSSHAuth, error) +} + +type namespacedSshAuthLifecycleAdapter struct { + lifecycle NamespacedSSHAuthLifecycle +} + +func (w *namespacedSshAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*NamespacedSSHAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedSshAuthLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*NamespacedSSHAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *namespacedSshAuthLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*NamespacedSSHAuth)) + if o == nil { + return nil, err + } + return o, err +} + +func NewNamespacedSSHAuthLifecycleAdapter(name string, client NamespacedSSHAuthInterface, l NamespacedSSHAuthLifecycle) NamespacedSSHAuthHandlerFunc { + adapter := &namespacedSshAuthLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient()) + return func(key string, obj *NamespacedSSHAuth) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/project.cattle.io/v3/zz_generated_scheme.go b/apis/project.cattle.io/v3/zz_generated_scheme.go index 0adf44b8..9e6b7003 100644 --- a/apis/project.cattle.io/v3/zz_generated_scheme.go +++ b/apis/project.cattle.io/v3/zz_generated_scheme.go @@ -43,6 +43,16 @@ func addKnownTypes(scheme *runtime.Scheme) error { &BasicAuthList{}, &SSHAuth{}, &SSHAuthList{}, + &NamespacedServiceAccountToken{}, + &NamespacedServiceAccountTokenList{}, + &NamespacedDockerCredential{}, + &NamespacedDockerCredentialList{}, + &NamespacedCertificate{}, + &NamespacedCertificateList{}, + &NamespacedBasicAuth{}, + &NamespacedBasicAuthList{}, + &NamespacedSSHAuth{}, + &NamespacedSSHAuthList{}, &Workload{}, &WorkloadList{}, ) diff --git a/client/cluster/v3/zz_generated_aws_elastic_block_store_volume_source.go b/client/cluster/v3/zz_generated_aws_elastic_block_store_volume_source.go new file mode 100644 index 00000000..9a8158f6 --- /dev/null +++ b/client/cluster/v3/zz_generated_aws_elastic_block_store_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + AWSElasticBlockStoreVolumeSourceType = "awsElasticBlockStoreVolumeSource" + AWSElasticBlockStoreVolumeSourceFieldFSType = "fsType" + AWSElasticBlockStoreVolumeSourceFieldPartition = "partition" + AWSElasticBlockStoreVolumeSourceFieldReadOnly = "readOnly" + AWSElasticBlockStoreVolumeSourceFieldVolumeID = "volumeID" +) + +type AWSElasticBlockStoreVolumeSource struct { + FSType string `json:"fsType,omitempty"` + Partition *int64 `json:"partition,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + VolumeID string `json:"volumeID,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_azure_disk_volume_source.go b/client/cluster/v3/zz_generated_azure_disk_volume_source.go new file mode 100644 index 00000000..f729fbc2 --- /dev/null +++ b/client/cluster/v3/zz_generated_azure_disk_volume_source.go @@ -0,0 +1,20 @@ +package client + +const ( + AzureDiskVolumeSourceType = "azureDiskVolumeSource" + AzureDiskVolumeSourceFieldCachingMode = "cachingMode" + AzureDiskVolumeSourceFieldDataDiskURI = "diskURI" + AzureDiskVolumeSourceFieldDiskName = "diskName" + AzureDiskVolumeSourceFieldFSType = "fsType" + AzureDiskVolumeSourceFieldKind = "kind" + AzureDiskVolumeSourceFieldReadOnly = "readOnly" +) + +type AzureDiskVolumeSource struct { + CachingMode string `json:"cachingMode,omitempty"` + DataDiskURI string `json:"diskURI,omitempty"` + DiskName string `json:"diskName,omitempty"` + FSType string `json:"fsType,omitempty"` + Kind string `json:"kind,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_azure_file_persistent_volume_source.go b/client/cluster/v3/zz_generated_azure_file_persistent_volume_source.go new file mode 100644 index 00000000..4b3dab62 --- /dev/null +++ b/client/cluster/v3/zz_generated_azure_file_persistent_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + AzureFilePersistentVolumeSourceType = "azureFilePersistentVolumeSource" + AzureFilePersistentVolumeSourceFieldReadOnly = "readOnly" + AzureFilePersistentVolumeSourceFieldSecretName = "secretName" + AzureFilePersistentVolumeSourceFieldSecretNamespace = "secretNamespace" + AzureFilePersistentVolumeSourceFieldShareName = "shareName" +) + +type AzureFilePersistentVolumeSource struct { + ReadOnly *bool `json:"readOnly,omitempty"` + SecretName string `json:"secretName,omitempty"` + SecretNamespace string `json:"secretNamespace,omitempty"` + ShareName string `json:"shareName,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_ceph_fspersistent_volume_source.go b/client/cluster/v3/zz_generated_ceph_fspersistent_volume_source.go new file mode 100644 index 00000000..cfd565fd --- /dev/null +++ b/client/cluster/v3/zz_generated_ceph_fspersistent_volume_source.go @@ -0,0 +1,20 @@ +package client + +const ( + CephFSPersistentVolumeSourceType = "cephFSPersistentVolumeSource" + CephFSPersistentVolumeSourceFieldMonitors = "monitors" + CephFSPersistentVolumeSourceFieldPath = "path" + CephFSPersistentVolumeSourceFieldReadOnly = "readOnly" + CephFSPersistentVolumeSourceFieldSecretFile = "secretFile" + CephFSPersistentVolumeSourceFieldSecretRef = "secretRef" + CephFSPersistentVolumeSourceFieldUser = "user" +) + +type CephFSPersistentVolumeSource struct { + Monitors []string `json:"monitors,omitempty"` + Path string `json:"path,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SecretFile string `json:"secretFile,omitempty"` + SecretRef *SecretReference `json:"secretRef,omitempty"` + User string `json:"user,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_cinder_volume_source.go b/client/cluster/v3/zz_generated_cinder_volume_source.go new file mode 100644 index 00000000..8073d973 --- /dev/null +++ b/client/cluster/v3/zz_generated_cinder_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + CinderVolumeSourceType = "cinderVolumeSource" + CinderVolumeSourceFieldFSType = "fsType" + CinderVolumeSourceFieldReadOnly = "readOnly" + CinderVolumeSourceFieldVolumeID = "volumeID" +) + +type CinderVolumeSource struct { + FSType string `json:"fsType,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + VolumeID string `json:"volumeID,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_client.go b/client/cluster/v3/zz_generated_client.go index 4b3556ff..e0f3a85b 100644 --- a/client/cluster/v3/zz_generated_client.go +++ b/client/cluster/v3/zz_generated_client.go @@ -7,8 +7,9 @@ import ( type Client struct { clientbase.APIBaseClient - Namespace NamespaceOperations - Node NodeOperations + Namespace NamespaceOperations + Node NodeOperations + PersistentVolume PersistentVolumeOperations } func NewClient(opts *clientbase.ClientOpts) (*Client, error) { @@ -23,6 +24,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.Namespace = newNamespaceClient(client) client.Node = newNodeClient(client) + client.PersistentVolume = newPersistentVolumeClient(client) return client, nil } diff --git a/client/cluster/v3/zz_generated_fc_volume_source.go b/client/cluster/v3/zz_generated_fc_volume_source.go new file mode 100644 index 00000000..850a1e80 --- /dev/null +++ b/client/cluster/v3/zz_generated_fc_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + FCVolumeSourceType = "fcVolumeSource" + FCVolumeSourceFieldFSType = "fsType" + FCVolumeSourceFieldLun = "lun" + FCVolumeSourceFieldReadOnly = "readOnly" + FCVolumeSourceFieldTargetWWNs = "targetWWNs" + FCVolumeSourceFieldWWIDs = "wwids" +) + +type FCVolumeSource struct { + FSType string `json:"fsType,omitempty"` + Lun *int64 `json:"lun,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + TargetWWNs []string `json:"targetWWNs,omitempty"` + WWIDs []string `json:"wwids,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_flex_volume_source.go b/client/cluster/v3/zz_generated_flex_volume_source.go new file mode 100644 index 00000000..33751207 --- /dev/null +++ b/client/cluster/v3/zz_generated_flex_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + FlexVolumeSourceType = "flexVolumeSource" + FlexVolumeSourceFieldDriver = "driver" + FlexVolumeSourceFieldFSType = "fsType" + FlexVolumeSourceFieldOptions = "options" + FlexVolumeSourceFieldReadOnly = "readOnly" + FlexVolumeSourceFieldSecretRef = "secretRef" +) + +type FlexVolumeSource struct { + Driver string `json:"driver,omitempty"` + FSType string `json:"fsType,omitempty"` + Options map[string]string `json:"options,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_flocker_volume_source.go b/client/cluster/v3/zz_generated_flocker_volume_source.go new file mode 100644 index 00000000..bd7fbd71 --- /dev/null +++ b/client/cluster/v3/zz_generated_flocker_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + FlockerVolumeSourceType = "flockerVolumeSource" + FlockerVolumeSourceFieldDatasetName = "datasetName" + FlockerVolumeSourceFieldDatasetUUID = "datasetUUID" +) + +type FlockerVolumeSource struct { + DatasetName string `json:"datasetName,omitempty"` + DatasetUUID string `json:"datasetUUID,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_gce_persistent_disk_volume_source.go b/client/cluster/v3/zz_generated_gce_persistent_disk_volume_source.go new file mode 100644 index 00000000..0288de2e --- /dev/null +++ b/client/cluster/v3/zz_generated_gce_persistent_disk_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + GCEPersistentDiskVolumeSourceType = "gcePersistentDiskVolumeSource" + GCEPersistentDiskVolumeSourceFieldFSType = "fsType" + GCEPersistentDiskVolumeSourceFieldPDName = "pdName" + GCEPersistentDiskVolumeSourceFieldPartition = "partition" + GCEPersistentDiskVolumeSourceFieldReadOnly = "readOnly" +) + +type GCEPersistentDiskVolumeSource struct { + FSType string `json:"fsType,omitempty"` + PDName string `json:"pdName,omitempty"` + Partition *int64 `json:"partition,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_glusterfs_volume_source.go b/client/cluster/v3/zz_generated_glusterfs_volume_source.go new file mode 100644 index 00000000..649c6e6f --- /dev/null +++ b/client/cluster/v3/zz_generated_glusterfs_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + GlusterfsVolumeSourceType = "glusterfsVolumeSource" + GlusterfsVolumeSourceFieldEndpointsName = "endpoints" + GlusterfsVolumeSourceFieldPath = "path" + GlusterfsVolumeSourceFieldReadOnly = "readOnly" +) + +type GlusterfsVolumeSource struct { + EndpointsName string `json:"endpoints,omitempty"` + Path string `json:"path,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_host_path_volume_source.go b/client/cluster/v3/zz_generated_host_path_volume_source.go new file mode 100644 index 00000000..ef4ba731 --- /dev/null +++ b/client/cluster/v3/zz_generated_host_path_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + HostPathVolumeSourceType = "hostPathVolumeSource" + HostPathVolumeSourceFieldPath = "path" + HostPathVolumeSourceFieldType = "type" +) + +type HostPathVolumeSource struct { + Path string `json:"path,omitempty"` + Type string `json:"type,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_iscsi_volume_source.go b/client/cluster/v3/zz_generated_iscsi_volume_source.go new file mode 100644 index 00000000..c517f972 --- /dev/null +++ b/client/cluster/v3/zz_generated_iscsi_volume_source.go @@ -0,0 +1,30 @@ +package client + +const ( + ISCSIVolumeSourceType = "iscsiVolumeSource" + ISCSIVolumeSourceFieldDiscoveryCHAPAuth = "chapAuthDiscovery" + ISCSIVolumeSourceFieldFSType = "fsType" + ISCSIVolumeSourceFieldIQN = "iqn" + ISCSIVolumeSourceFieldISCSIInterface = "iscsiInterface" + ISCSIVolumeSourceFieldInitiatorName = "initiatorName" + ISCSIVolumeSourceFieldLun = "lun" + ISCSIVolumeSourceFieldPortals = "portals" + ISCSIVolumeSourceFieldReadOnly = "readOnly" + ISCSIVolumeSourceFieldSecretRef = "secretRef" + ISCSIVolumeSourceFieldSessionCHAPAuth = "chapAuthSession" + ISCSIVolumeSourceFieldTargetPortal = "targetPortal" +) + +type ISCSIVolumeSource struct { + DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` + FSType string `json:"fsType,omitempty"` + IQN string `json:"iqn,omitempty"` + ISCSIInterface string `json:"iscsiInterface,omitempty"` + InitiatorName string `json:"initiatorName,omitempty"` + Lun *int64 `json:"lun,omitempty"` + Portals []string `json:"portals,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty"` + SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` + TargetPortal string `json:"targetPortal,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_local_object_reference.go b/client/cluster/v3/zz_generated_local_object_reference.go new file mode 100644 index 00000000..1116f438 --- /dev/null +++ b/client/cluster/v3/zz_generated_local_object_reference.go @@ -0,0 +1,10 @@ +package client + +const ( + LocalObjectReferenceType = "localObjectReference" + LocalObjectReferenceFieldName = "name" +) + +type LocalObjectReference struct { + Name string `json:"name,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_local_volume_source.go b/client/cluster/v3/zz_generated_local_volume_source.go new file mode 100644 index 00000000..f249d85c --- /dev/null +++ b/client/cluster/v3/zz_generated_local_volume_source.go @@ -0,0 +1,10 @@ +package client + +const ( + LocalVolumeSourceType = "localVolumeSource" + LocalVolumeSourceFieldPath = "path" +) + +type LocalVolumeSource struct { + Path string `json:"path,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_namespace.go b/client/cluster/v3/zz_generated_namespace.go index 774cf98b..db71d260 100644 --- a/client/cluster/v3/zz_generated_namespace.go +++ b/client/cluster/v3/zz_generated_namespace.go @@ -6,6 +6,7 @@ import ( const ( NamespaceType = "namespace" + NamespaceField = "creatorId" NamespaceFieldAnnotations = "annotations" NamespaceFieldAnswers = "answers" NamespaceFieldCreated = "created" @@ -28,6 +29,7 @@ const ( type Namespace struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Answers map[string]interface{} `json:"answers,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/cluster/v3/zz_generated_nfs_volume_source.go b/client/cluster/v3/zz_generated_nfs_volume_source.go new file mode 100644 index 00000000..5b1ccf9c --- /dev/null +++ b/client/cluster/v3/zz_generated_nfs_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + NFSVolumeSourceType = "nfsVolumeSource" + NFSVolumeSourceFieldPath = "path" + NFSVolumeSourceFieldReadOnly = "readOnly" + NFSVolumeSourceFieldServer = "server" +) + +type NFSVolumeSource struct { + Path string `json:"path,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + Server string `json:"server,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_node.go b/client/cluster/v3/zz_generated_node.go index 0473c2d4..aefddfe7 100644 --- a/client/cluster/v3/zz_generated_node.go +++ b/client/cluster/v3/zz_generated_node.go @@ -6,6 +6,7 @@ import ( const ( NodeType = "node" + NodeField = "creatorId" NodeFieldAllocatable = "allocatable" NodeFieldAnnotations = "annotations" NodeFieldCapacity = "capacity" @@ -35,6 +36,7 @@ const ( type Node struct { types.Resource + string `json:"creatorId,omitempty"` Allocatable map[string]string `json:"allocatable,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Capacity map[string]string `json:"capacity,omitempty"` diff --git a/client/cluster/v3/zz_generated_persistent_volume.go b/client/cluster/v3/zz_generated_persistent_volume.go new file mode 100644 index 00000000..98f71726 --- /dev/null +++ b/client/cluster/v3/zz_generated_persistent_volume.go @@ -0,0 +1,155 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PersistentVolumeType = "persistentVolume" + PersistentVolumeField = "creatorId" + PersistentVolumeFieldAWSElasticBlockStore = "awsElasticBlockStore" + PersistentVolumeFieldAccessModes = "accessModes" + PersistentVolumeFieldAnnotations = "annotations" + PersistentVolumeFieldAzureDisk = "azureDisk" + PersistentVolumeFieldAzureFile = "azureFile" + PersistentVolumeFieldCapacity = "capacity" + PersistentVolumeFieldCephFS = "cephfs" + PersistentVolumeFieldCinder = "cinder" + PersistentVolumeFieldClaimRef = "claimRef" + PersistentVolumeFieldCreated = "created" + PersistentVolumeFieldFC = "fc" + PersistentVolumeFieldFinalizers = "finalizers" + PersistentVolumeFieldFlexVolume = "flexVolume" + PersistentVolumeFieldFlocker = "flocker" + PersistentVolumeFieldGCEPersistentDisk = "gcePersistentDisk" + PersistentVolumeFieldGlusterfs = "glusterfs" + PersistentVolumeFieldHostPath = "hostPath" + PersistentVolumeFieldISCSI = "iscsi" + PersistentVolumeFieldLabels = "labels" + PersistentVolumeFieldLocal = "local" + PersistentVolumeFieldMountOptions = "mountOptions" + PersistentVolumeFieldNFS = "nfs" + PersistentVolumeFieldName = "name" + PersistentVolumeFieldOwnerReferences = "ownerReferences" + PersistentVolumeFieldPersistentVolumeReclaimPolicy = "persistentVolumeReclaimPolicy" + PersistentVolumeFieldPhotonPersistentDisk = "photonPersistentDisk" + PersistentVolumeFieldPortworxVolume = "portworxVolume" + PersistentVolumeFieldQuobyte = "quobyte" + PersistentVolumeFieldRBD = "rbd" + PersistentVolumeFieldRemoved = "removed" + PersistentVolumeFieldScaleIO = "scaleIO" + PersistentVolumeFieldState = "state" + PersistentVolumeFieldStatus = "status" + PersistentVolumeFieldStorageClassName = "storageClassName" + PersistentVolumeFieldStorageOS = "storageos" + PersistentVolumeFieldTransitioning = "transitioning" + PersistentVolumeFieldTransitioningMessage = "transitioningMessage" + PersistentVolumeFieldUuid = "uuid" + PersistentVolumeFieldVsphereVolume = "vsphereVolume" +) + +type PersistentVolume struct { + types.Resource + string `json:"creatorId,omitempty"` + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"` + AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty"` + Capacity map[string]string `json:"capacity,omitempty"` + CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty"` + Cinder *CinderVolumeSource `json:"cinder,omitempty"` + ClaimRef *ObjectReference `json:"claimRef,omitempty"` + Created string `json:"created,omitempty"` + FC *FCVolumeSource `json:"fc,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"` + Flocker *FlockerVolumeSource `json:"flocker,omitempty"` + GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"` + Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"` + HostPath *HostPathVolumeSource `json:"hostPath,omitempty"` + ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Local *LocalVolumeSource `json:"local,omitempty"` + MountOptions []string `json:"mountOptions,omitempty"` + NFS *NFSVolumeSource `json:"nfs,omitempty"` + Name string `json:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + PersistentVolumeReclaimPolicy string `json:"persistentVolumeReclaimPolicy,omitempty"` + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty"` + PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty"` + Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"` + RBD *RBDVolumeSource `json:"rbd,omitempty"` + Removed string `json:"removed,omitempty"` + ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty"` + State string `json:"state,omitempty"` + Status *PersistentVolumeStatus `json:"status,omitempty"` + StorageClassName string `json:"storageClassName,omitempty"` + StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + Uuid string `json:"uuid,omitempty"` + VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` +} +type PersistentVolumeCollection struct { + types.Collection + Data []PersistentVolume `json:"data,omitempty"` + client *PersistentVolumeClient +} + +type PersistentVolumeClient struct { + apiClient *Client +} + +type PersistentVolumeOperations interface { + List(opts *types.ListOpts) (*PersistentVolumeCollection, error) + Create(opts *PersistentVolume) (*PersistentVolume, error) + Update(existing *PersistentVolume, updates interface{}) (*PersistentVolume, error) + ByID(id string) (*PersistentVolume, error) + Delete(container *PersistentVolume) error +} + +func newPersistentVolumeClient(apiClient *Client) *PersistentVolumeClient { + return &PersistentVolumeClient{ + apiClient: apiClient, + } +} + +func (c *PersistentVolumeClient) Create(container *PersistentVolume) (*PersistentVolume, error) { + resp := &PersistentVolume{} + err := c.apiClient.Ops.DoCreate(PersistentVolumeType, container, resp) + return resp, err +} + +func (c *PersistentVolumeClient) Update(existing *PersistentVolume, updates interface{}) (*PersistentVolume, error) { + resp := &PersistentVolume{} + err := c.apiClient.Ops.DoUpdate(PersistentVolumeType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PersistentVolumeClient) List(opts *types.ListOpts) (*PersistentVolumeCollection, error) { + resp := &PersistentVolumeCollection{} + err := c.apiClient.Ops.DoList(PersistentVolumeType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *PersistentVolumeCollection) Next() (*PersistentVolumeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PersistentVolumeCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PersistentVolumeClient) ByID(id string) (*PersistentVolume, error) { + resp := &PersistentVolume{} + err := c.apiClient.Ops.DoByID(PersistentVolumeType, id, resp) + return resp, err +} + +func (c *PersistentVolumeClient) Delete(container *PersistentVolume) error { + return c.apiClient.Ops.DoResourceDelete(PersistentVolumeType, &container.Resource) +} diff --git a/client/cluster/v3/zz_generated_persistent_volume_spec.go b/client/cluster/v3/zz_generated_persistent_volume_spec.go new file mode 100644 index 00000000..def7f3ae --- /dev/null +++ b/client/cluster/v3/zz_generated_persistent_volume_spec.go @@ -0,0 +1,62 @@ +package client + +const ( + PersistentVolumeSpecType = "persistentVolumeSpec" + PersistentVolumeSpecFieldAWSElasticBlockStore = "awsElasticBlockStore" + PersistentVolumeSpecFieldAccessModes = "accessModes" + PersistentVolumeSpecFieldAzureDisk = "azureDisk" + PersistentVolumeSpecFieldAzureFile = "azureFile" + PersistentVolumeSpecFieldCapacity = "capacity" + PersistentVolumeSpecFieldCephFS = "cephfs" + PersistentVolumeSpecFieldCinder = "cinder" + PersistentVolumeSpecFieldClaimRef = "claimRef" + PersistentVolumeSpecFieldFC = "fc" + PersistentVolumeSpecFieldFlexVolume = "flexVolume" + PersistentVolumeSpecFieldFlocker = "flocker" + PersistentVolumeSpecFieldGCEPersistentDisk = "gcePersistentDisk" + PersistentVolumeSpecFieldGlusterfs = "glusterfs" + PersistentVolumeSpecFieldHostPath = "hostPath" + PersistentVolumeSpecFieldISCSI = "iscsi" + PersistentVolumeSpecFieldLocal = "local" + PersistentVolumeSpecFieldMountOptions = "mountOptions" + PersistentVolumeSpecFieldNFS = "nfs" + PersistentVolumeSpecFieldPersistentVolumeReclaimPolicy = "persistentVolumeReclaimPolicy" + PersistentVolumeSpecFieldPhotonPersistentDisk = "photonPersistentDisk" + PersistentVolumeSpecFieldPortworxVolume = "portworxVolume" + PersistentVolumeSpecFieldQuobyte = "quobyte" + PersistentVolumeSpecFieldRBD = "rbd" + PersistentVolumeSpecFieldScaleIO = "scaleIO" + PersistentVolumeSpecFieldStorageClassName = "storageClassName" + PersistentVolumeSpecFieldStorageOS = "storageos" + PersistentVolumeSpecFieldVsphereVolume = "vsphereVolume" +) + +type PersistentVolumeSpec struct { + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"` + AccessModes []string `json:"accessModes,omitempty"` + AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"` + AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty"` + Capacity map[string]string `json:"capacity,omitempty"` + CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty"` + Cinder *CinderVolumeSource `json:"cinder,omitempty"` + ClaimRef *ObjectReference `json:"claimRef,omitempty"` + FC *FCVolumeSource `json:"fc,omitempty"` + FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"` + Flocker *FlockerVolumeSource `json:"flocker,omitempty"` + GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"` + Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"` + HostPath *HostPathVolumeSource `json:"hostPath,omitempty"` + ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"` + Local *LocalVolumeSource `json:"local,omitempty"` + MountOptions []string `json:"mountOptions,omitempty"` + NFS *NFSVolumeSource `json:"nfs,omitempty"` + PersistentVolumeReclaimPolicy string `json:"persistentVolumeReclaimPolicy,omitempty"` + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty"` + PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty"` + Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"` + RBD *RBDVolumeSource `json:"rbd,omitempty"` + ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty"` + StorageClassName string `json:"storageClassName,omitempty"` + StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty"` + VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_persistent_volume_status.go b/client/cluster/v3/zz_generated_persistent_volume_status.go new file mode 100644 index 00000000..9c5e2eb2 --- /dev/null +++ b/client/cluster/v3/zz_generated_persistent_volume_status.go @@ -0,0 +1,14 @@ +package client + +const ( + PersistentVolumeStatusType = "persistentVolumeStatus" + PersistentVolumeStatusFieldMessage = "message" + PersistentVolumeStatusFieldPhase = "phase" + PersistentVolumeStatusFieldReason = "reason" +) + +type PersistentVolumeStatus struct { + Message string `json:"message,omitempty"` + Phase string `json:"phase,omitempty"` + Reason string `json:"reason,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_photon_persistent_disk_volume_source.go b/client/cluster/v3/zz_generated_photon_persistent_disk_volume_source.go new file mode 100644 index 00000000..c7ff7072 --- /dev/null +++ b/client/cluster/v3/zz_generated_photon_persistent_disk_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + PhotonPersistentDiskVolumeSourceType = "photonPersistentDiskVolumeSource" + PhotonPersistentDiskVolumeSourceFieldFSType = "fsType" + PhotonPersistentDiskVolumeSourceFieldPdID = "pdID" +) + +type PhotonPersistentDiskVolumeSource struct { + FSType string `json:"fsType,omitempty"` + PdID string `json:"pdID,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_portworx_volume_source.go b/client/cluster/v3/zz_generated_portworx_volume_source.go new file mode 100644 index 00000000..50372f00 --- /dev/null +++ b/client/cluster/v3/zz_generated_portworx_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + PortworxVolumeSourceType = "portworxVolumeSource" + PortworxVolumeSourceFieldFSType = "fsType" + PortworxVolumeSourceFieldReadOnly = "readOnly" + PortworxVolumeSourceFieldVolumeID = "volumeID" +) + +type PortworxVolumeSource struct { + FSType string `json:"fsType,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + VolumeID string `json:"volumeID,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_quobyte_volume_source.go b/client/cluster/v3/zz_generated_quobyte_volume_source.go new file mode 100644 index 00000000..c1df085a --- /dev/null +++ b/client/cluster/v3/zz_generated_quobyte_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + QuobyteVolumeSourceType = "quobyteVolumeSource" + QuobyteVolumeSourceFieldGroup = "group" + QuobyteVolumeSourceFieldReadOnly = "readOnly" + QuobyteVolumeSourceFieldRegistry = "registry" + QuobyteVolumeSourceFieldUser = "user" + QuobyteVolumeSourceFieldVolume = "volume" +) + +type QuobyteVolumeSource struct { + Group string `json:"group,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + Registry string `json:"registry,omitempty"` + User string `json:"user,omitempty"` + Volume string `json:"volume,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_rbd_volume_source.go b/client/cluster/v3/zz_generated_rbd_volume_source.go new file mode 100644 index 00000000..390a40b5 --- /dev/null +++ b/client/cluster/v3/zz_generated_rbd_volume_source.go @@ -0,0 +1,24 @@ +package client + +const ( + RBDVolumeSourceType = "rbdVolumeSource" + RBDVolumeSourceFieldCephMonitors = "monitors" + RBDVolumeSourceFieldFSType = "fsType" + RBDVolumeSourceFieldKeyring = "keyring" + RBDVolumeSourceFieldRBDImage = "image" + RBDVolumeSourceFieldRBDPool = "pool" + RBDVolumeSourceFieldRadosUser = "user" + RBDVolumeSourceFieldReadOnly = "readOnly" + RBDVolumeSourceFieldSecretRef = "secretRef" +) + +type RBDVolumeSource struct { + CephMonitors []string `json:"monitors,omitempty"` + FSType string `json:"fsType,omitempty"` + Keyring string `json:"keyring,omitempty"` + RBDImage string `json:"image,omitempty"` + RBDPool string `json:"pool,omitempty"` + RadosUser string `json:"user,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_scale_iovolume_source.go b/client/cluster/v3/zz_generated_scale_iovolume_source.go new file mode 100644 index 00000000..01a21a86 --- /dev/null +++ b/client/cluster/v3/zz_generated_scale_iovolume_source.go @@ -0,0 +1,28 @@ +package client + +const ( + ScaleIOVolumeSourceType = "scaleIOVolumeSource" + ScaleIOVolumeSourceFieldFSType = "fsType" + ScaleIOVolumeSourceFieldGateway = "gateway" + ScaleIOVolumeSourceFieldProtectionDomain = "protectionDomain" + ScaleIOVolumeSourceFieldReadOnly = "readOnly" + ScaleIOVolumeSourceFieldSSLEnabled = "sslEnabled" + ScaleIOVolumeSourceFieldSecretRef = "secretRef" + ScaleIOVolumeSourceFieldStorageMode = "storageMode" + ScaleIOVolumeSourceFieldStoragePool = "storagePool" + ScaleIOVolumeSourceFieldSystem = "system" + ScaleIOVolumeSourceFieldVolumeName = "volumeName" +) + +type ScaleIOVolumeSource struct { + FSType string `json:"fsType,omitempty"` + Gateway string `json:"gateway,omitempty"` + ProtectionDomain string `json:"protectionDomain,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SSLEnabled *bool `json:"sslEnabled,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty"` + StorageMode string `json:"storageMode,omitempty"` + StoragePool string `json:"storagePool,omitempty"` + System string `json:"system,omitempty"` + VolumeName string `json:"volumeName,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_secret_reference.go b/client/cluster/v3/zz_generated_secret_reference.go new file mode 100644 index 00000000..e81e9fce --- /dev/null +++ b/client/cluster/v3/zz_generated_secret_reference.go @@ -0,0 +1,12 @@ +package client + +const ( + SecretReferenceType = "secretReference" + SecretReferenceFieldName = "name" + SecretReferenceFieldNamespace = "namespace" +) + +type SecretReference struct { + Name string `json:"name,omitempty"` + Namespace string `json:"namespace,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_storage_ospersistent_volume_source.go b/client/cluster/v3/zz_generated_storage_ospersistent_volume_source.go new file mode 100644 index 00000000..1022db1c --- /dev/null +++ b/client/cluster/v3/zz_generated_storage_ospersistent_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + StorageOSPersistentVolumeSourceType = "storageOSPersistentVolumeSource" + StorageOSPersistentVolumeSourceFieldFSType = "fsType" + StorageOSPersistentVolumeSourceFieldReadOnly = "readOnly" + StorageOSPersistentVolumeSourceFieldSecretRef = "secretRef" + StorageOSPersistentVolumeSourceFieldVolumeName = "volumeName" + StorageOSPersistentVolumeSourceFieldVolumeNamespace = "volumeNamespace" +) + +type StorageOSPersistentVolumeSource struct { + FSType string `json:"fsType,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + SecretRef *ObjectReference `json:"secretRef,omitempty"` + VolumeName string `json:"volumeName,omitempty"` + VolumeNamespace string `json:"volumeNamespace,omitempty"` +} diff --git a/client/cluster/v3/zz_generated_vsphere_virtual_disk_volume_source.go b/client/cluster/v3/zz_generated_vsphere_virtual_disk_volume_source.go new file mode 100644 index 00000000..a27e56b8 --- /dev/null +++ b/client/cluster/v3/zz_generated_vsphere_virtual_disk_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + VsphereVirtualDiskVolumeSourceType = "vsphereVirtualDiskVolumeSource" + VsphereVirtualDiskVolumeSourceFieldFSType = "fsType" + VsphereVirtualDiskVolumeSourceFieldStoragePolicyID = "storagePolicyID" + VsphereVirtualDiskVolumeSourceFieldStoragePolicyName = "storagePolicyName" + VsphereVirtualDiskVolumeSourceFieldVolumePath = "volumePath" +) + +type VsphereVirtualDiskVolumeSource struct { + FSType string `json:"fsType,omitempty"` + StoragePolicyID string `json:"storagePolicyID,omitempty"` + StoragePolicyName string `json:"storagePolicyName,omitempty"` + VolumePath string `json:"volumePath,omitempty"` +} diff --git a/client/management/v3/zz_generated_catalog.go b/client/management/v3/zz_generated_catalog.go index fff37260..1293796d 100644 --- a/client/management/v3/zz_generated_catalog.go +++ b/client/management/v3/zz_generated_catalog.go @@ -6,6 +6,7 @@ import ( const ( CatalogType = "catalog" + CatalogField = "creatorId" CatalogFieldAnnotations = "annotations" CatalogFieldBranch = "branch" CatalogFieldCatalogKind = "catalogKind" @@ -25,6 +26,7 @@ const ( type Catalog struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Branch string `json:"branch,omitempty"` CatalogKind string `json:"catalogKind,omitempty"` diff --git a/client/management/v3/zz_generated_cluster.go b/client/management/v3/zz_generated_cluster.go index 5e249a88..66c03938 100644 --- a/client/management/v3/zz_generated_cluster.go +++ b/client/management/v3/zz_generated_cluster.go @@ -6,6 +6,7 @@ import ( const ( ClusterType = "cluster" + ClusterField = "creatorId" ClusterFieldAPIEndpoint = "apiEndpoint" ClusterFieldAllocatable = "allocatable" ClusterFieldAnnotations = "annotations" @@ -37,6 +38,7 @@ const ( type Cluster struct { types.Resource + string `json:"creatorId,omitempty"` APIEndpoint string `json:"apiEndpoint,omitempty"` Allocatable map[string]string `json:"allocatable,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` diff --git a/client/management/v3/zz_generated_cluster_event.go b/client/management/v3/zz_generated_cluster_event.go index b6856af7..55551187 100644 --- a/client/management/v3/zz_generated_cluster_event.go +++ b/client/management/v3/zz_generated_cluster_event.go @@ -6,6 +6,7 @@ import ( const ( ClusterEventType = "clusterEvent" + ClusterEventField = "creatorId" ClusterEventFieldAnnotations = "annotations" ClusterEventFieldClusterId = "clusterId" ClusterEventFieldCount = "count" @@ -27,6 +28,7 @@ const ( type ClusterEvent struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` ClusterId string `json:"clusterId,omitempty"` Count *int64 `json:"count,omitempty"` diff --git a/client/management/v3/zz_generated_cluster_registration_token.go b/client/management/v3/zz_generated_cluster_registration_token.go index ebde2685..847ae500 100644 --- a/client/management/v3/zz_generated_cluster_registration_token.go +++ b/client/management/v3/zz_generated_cluster_registration_token.go @@ -6,6 +6,7 @@ import ( const ( ClusterRegistrationTokenType = "clusterRegistrationToken" + ClusterRegistrationTokenField = "creatorId" ClusterRegistrationTokenFieldAnnotations = "annotations" ClusterRegistrationTokenFieldCreated = "created" ClusterRegistrationTokenFieldFinalizers = "finalizers" @@ -22,6 +23,7 @@ const ( type ClusterRegistrationToken struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/management/v3/zz_generated_cluster_role_template_binding.go b/client/management/v3/zz_generated_cluster_role_template_binding.go index 00999d2c..371327a4 100644 --- a/client/management/v3/zz_generated_cluster_role_template_binding.go +++ b/client/management/v3/zz_generated_cluster_role_template_binding.go @@ -6,6 +6,7 @@ import ( const ( ClusterRoleTemplateBindingType = "clusterRoleTemplateBinding" + ClusterRoleTemplateBindingField = "creatorId" ClusterRoleTemplateBindingFieldAnnotations = "annotations" ClusterRoleTemplateBindingFieldClusterId = "clusterId" ClusterRoleTemplateBindingFieldCreated = "created" @@ -24,6 +25,7 @@ const ( type ClusterRoleTemplateBinding struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` ClusterId string `json:"clusterId,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/management/v3/zz_generated_dynamic_schema.go b/client/management/v3/zz_generated_dynamic_schema.go index 85fb0821..fad392c1 100644 --- a/client/management/v3/zz_generated_dynamic_schema.go +++ b/client/management/v3/zz_generated_dynamic_schema.go @@ -6,6 +6,7 @@ import ( const ( DynamicSchemaType = "dynamicSchema" + DynamicSchemaField = "creatorId" DynamicSchemaFieldAnnotations = "annotations" DynamicSchemaFieldCollectionActions = "collectionActions" DynamicSchemaFieldCollectionFields = "collectionFields" @@ -33,6 +34,7 @@ const ( type DynamicSchema struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` CollectionActions map[string]Action `json:"collectionActions,omitempty"` CollectionFields map[string]Field `json:"collectionFields,omitempty"` diff --git a/client/management/v3/zz_generated_global_role.go b/client/management/v3/zz_generated_global_role.go index 4f474fce..9a1cb480 100644 --- a/client/management/v3/zz_generated_global_role.go +++ b/client/management/v3/zz_generated_global_role.go @@ -6,6 +6,7 @@ import ( const ( GlobalRoleType = "globalRole" + GlobalRoleField = "creatorId" GlobalRoleFieldAnnotations = "annotations" GlobalRoleFieldBuiltin = "builtin" GlobalRoleFieldCreated = "created" @@ -21,6 +22,7 @@ const ( type GlobalRole struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Builtin *bool `json:"builtin,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/management/v3/zz_generated_global_role_binding.go b/client/management/v3/zz_generated_global_role_binding.go index 528e125f..b023ff4d 100644 --- a/client/management/v3/zz_generated_global_role_binding.go +++ b/client/management/v3/zz_generated_global_role_binding.go @@ -6,6 +6,7 @@ import ( const ( GlobalRoleBindingType = "globalRoleBinding" + GlobalRoleBindingField = "creatorId" GlobalRoleBindingFieldAnnotations = "annotations" GlobalRoleBindingFieldCreated = "created" GlobalRoleBindingFieldFinalizers = "finalizers" @@ -21,6 +22,7 @@ const ( type GlobalRoleBinding struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/management/v3/zz_generated_group.go b/client/management/v3/zz_generated_group.go index 24d1c32a..20653551 100644 --- a/client/management/v3/zz_generated_group.go +++ b/client/management/v3/zz_generated_group.go @@ -6,6 +6,7 @@ import ( const ( GroupType = "group" + GroupField = "creatorId" GroupFieldAnnotations = "annotations" GroupFieldCreated = "created" GroupFieldFinalizers = "finalizers" @@ -19,6 +20,7 @@ const ( type Group struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/management/v3/zz_generated_group_member.go b/client/management/v3/zz_generated_group_member.go index 8bccf0b0..5f52b98d 100644 --- a/client/management/v3/zz_generated_group_member.go +++ b/client/management/v3/zz_generated_group_member.go @@ -6,6 +6,7 @@ import ( const ( GroupMemberType = "groupMember" + GroupMemberField = "creatorId" GroupMemberFieldAnnotations = "annotations" GroupMemberFieldCreated = "created" GroupMemberFieldFinalizers = "finalizers" @@ -20,6 +21,7 @@ const ( type GroupMember struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/management/v3/zz_generated_machine.go b/client/management/v3/zz_generated_machine.go index a5b2d98f..239ffcab 100644 --- a/client/management/v3/zz_generated_machine.go +++ b/client/management/v3/zz_generated_machine.go @@ -6,6 +6,7 @@ import ( const ( MachineType = "machine" + MachineField = "creatorId" MachineFieldAllocatable = "allocatable" MachineFieldAnnotations = "annotations" MachineFieldCapacity = "capacity" @@ -14,7 +15,6 @@ const ( MachineFieldConfigSource = "configSource" MachineFieldCreated = "created" MachineFieldDescription = "description" - MachineFieldDisplayName = "displayName" MachineFieldExternalId = "externalId" MachineFieldFinalizers = "finalizers" MachineFieldHostname = "hostname" @@ -48,6 +48,7 @@ const ( type Machine struct { types.Resource + string `json:"creatorId,omitempty"` Allocatable map[string]string `json:"allocatable,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Capacity map[string]string `json:"capacity,omitempty"` @@ -56,7 +57,6 @@ type Machine struct { ConfigSource *NodeConfigSource `json:"configSource,omitempty"` Created string `json:"created,omitempty"` Description string `json:"description,omitempty"` - DisplayName string `json:"displayName,omitempty"` ExternalId string `json:"externalId,omitempty"` Finalizers []string `json:"finalizers,omitempty"` Hostname string `json:"hostname,omitempty"` diff --git a/client/management/v3/zz_generated_machine_driver.go b/client/management/v3/zz_generated_machine_driver.go index f2e38ede..3e090642 100644 --- a/client/management/v3/zz_generated_machine_driver.go +++ b/client/management/v3/zz_generated_machine_driver.go @@ -6,6 +6,7 @@ import ( const ( MachineDriverType = "machineDriver" + MachineDriverField = "creatorId" MachineDriverFieldActive = "active" MachineDriverFieldAnnotations = "annotations" MachineDriverFieldBuiltin = "builtin" @@ -29,6 +30,7 @@ const ( type MachineDriver struct { types.Resource + string `json:"creatorId,omitempty"` Active *bool `json:"active,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Builtin *bool `json:"builtin,omitempty"` diff --git a/client/management/v3/zz_generated_machine_spec.go b/client/management/v3/zz_generated_machine_spec.go index 121211c1..6f445f31 100644 --- a/client/management/v3/zz_generated_machine_spec.go +++ b/client/management/v3/zz_generated_machine_spec.go @@ -5,7 +5,6 @@ const ( MachineSpecFieldClusterId = "clusterId" MachineSpecFieldConfigSource = "configSource" MachineSpecFieldDescription = "description" - MachineSpecFieldDisplayName = "displayName" MachineSpecFieldExternalId = "externalId" MachineSpecFieldMachineTemplateId = "machineTemplateId" MachineSpecFieldPodCIDR = "podCIDR" @@ -19,7 +18,6 @@ type MachineSpec struct { ClusterId string `json:"clusterId,omitempty"` ConfigSource *NodeConfigSource `json:"configSource,omitempty"` Description string `json:"description,omitempty"` - DisplayName string `json:"displayName,omitempty"` ExternalId string `json:"externalId,omitempty"` MachineTemplateId string `json:"machineTemplateId,omitempty"` PodCIDR string `json:"podCIDR,omitempty"` diff --git a/client/management/v3/zz_generated_machine_template.go b/client/management/v3/zz_generated_machine_template.go index aa2e0c84..02433c64 100644 --- a/client/management/v3/zz_generated_machine_template.go +++ b/client/management/v3/zz_generated_machine_template.go @@ -6,6 +6,7 @@ import ( const ( MachineTemplateType = "machineTemplate" + MachineTemplateField = "creatorId" MachineTemplateFieldAnnotations = "annotations" MachineTemplateFieldAuthCertificateAuthority = "authCertificateAuthority" MachineTemplateFieldAuthKey = "authKey" @@ -35,6 +36,7 @@ const ( type MachineTemplate struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty"` AuthKey string `json:"authKey,omitempty"` diff --git a/client/management/v3/zz_generated_node.go b/client/management/v3/zz_generated_node.go index 0473c2d4..aefddfe7 100644 --- a/client/management/v3/zz_generated_node.go +++ b/client/management/v3/zz_generated_node.go @@ -6,6 +6,7 @@ import ( const ( NodeType = "node" + NodeField = "creatorId" NodeFieldAllocatable = "allocatable" NodeFieldAnnotations = "annotations" NodeFieldCapacity = "capacity" @@ -35,6 +36,7 @@ const ( type Node struct { types.Resource + string `json:"creatorId,omitempty"` Allocatable map[string]string `json:"allocatable,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Capacity map[string]string `json:"capacity,omitempty"` diff --git a/client/management/v3/zz_generated_pod_security_policy_template.go b/client/management/v3/zz_generated_pod_security_policy_template.go index 01d57dc3..deefc777 100644 --- a/client/management/v3/zz_generated_pod_security_policy_template.go +++ b/client/management/v3/zz_generated_pod_security_policy_template.go @@ -6,6 +6,7 @@ import ( const ( PodSecurityPolicyTemplateType = "podSecurityPolicyTemplate" + PodSecurityPolicyTemplateField = "creatorId" PodSecurityPolicyTemplateFieldAllowPrivilegeEscalation = "allowPrivilegeEscalation" PodSecurityPolicyTemplateFieldAllowedCapabilities = "allowedCapabilities" PodSecurityPolicyTemplateFieldAllowedHostPaths = "allowedHostPaths" @@ -35,6 +36,7 @@ const ( type PodSecurityPolicyTemplate struct { types.Resource + string `json:"creatorId,omitempty"` AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` AllowedCapabilities []string `json:"allowedCapabilities,omitempty"` AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty"` diff --git a/client/management/v3/zz_generated_principal.go b/client/management/v3/zz_generated_principal.go index ee364e50..34e7735f 100644 --- a/client/management/v3/zz_generated_principal.go +++ b/client/management/v3/zz_generated_principal.go @@ -6,6 +6,7 @@ import ( const ( PrincipalType = "principal" + PrincipalField = "creatorId" PrincipalFieldAnnotations = "annotations" PrincipalFieldCreated = "created" PrincipalFieldDisplayName = "displayName" @@ -25,6 +26,7 @@ const ( type Principal struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` DisplayName string `json:"displayName,omitempty"` diff --git a/client/management/v3/zz_generated_project.go b/client/management/v3/zz_generated_project.go index 6295213f..dbd3692a 100644 --- a/client/management/v3/zz_generated_project.go +++ b/client/management/v3/zz_generated_project.go @@ -6,6 +6,7 @@ import ( const ( ProjectType = "project" + ProjectField = "creatorId" ProjectFieldAnnotations = "annotations" ProjectFieldClusterId = "clusterId" ProjectFieldConditions = "conditions" @@ -25,6 +26,7 @@ const ( type Project struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` ClusterId string `json:"clusterId,omitempty"` Conditions []ProjectCondition `json:"conditions,omitempty"` diff --git a/client/management/v3/zz_generated_project_role_template_binding.go b/client/management/v3/zz_generated_project_role_template_binding.go index 9b89f881..3a5ad9a5 100644 --- a/client/management/v3/zz_generated_project_role_template_binding.go +++ b/client/management/v3/zz_generated_project_role_template_binding.go @@ -6,6 +6,7 @@ import ( const ( ProjectRoleTemplateBindingType = "projectRoleTemplateBinding" + ProjectRoleTemplateBindingField = "creatorId" ProjectRoleTemplateBindingFieldAnnotations = "annotations" ProjectRoleTemplateBindingFieldCreated = "created" ProjectRoleTemplateBindingFieldFinalizers = "finalizers" @@ -24,6 +25,7 @@ const ( type ProjectRoleTemplateBinding struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/management/v3/zz_generated_rke_config_node.go b/client/management/v3/zz_generated_rke_config_node.go index d1bff7c2..b5cb2638 100644 --- a/client/management/v3/zz_generated_rke_config_node.go +++ b/client/management/v3/zz_generated_rke_config_node.go @@ -6,7 +6,7 @@ const ( RKEConfigNodeFieldDockerSocket = "dockerSocket" RKEConfigNodeFieldHostnameOverride = "hostnameOverride" RKEConfigNodeFieldInternalAddress = "internalAddress" - RKEConfigNodeFieldMachineName = "machineName" + RKEConfigNodeFieldMachineId = "machineId" RKEConfigNodeFieldRole = "role" RKEConfigNodeFieldSSHKey = "sshKey" RKEConfigNodeFieldSSHKeyPath = "sshKeyPath" @@ -18,7 +18,7 @@ type RKEConfigNode struct { DockerSocket string `json:"dockerSocket,omitempty"` HostnameOverride string `json:"hostnameOverride,omitempty"` InternalAddress string `json:"internalAddress,omitempty"` - MachineName string `json:"machineName,omitempty"` + MachineId string `json:"machineId,omitempty"` Role []string `json:"role,omitempty"` SSHKey string `json:"sshKey,omitempty"` SSHKeyPath string `json:"sshKeyPath,omitempty"` diff --git a/client/management/v3/zz_generated_role_template.go b/client/management/v3/zz_generated_role_template.go index 4e3c0534..44eb5cfb 100644 --- a/client/management/v3/zz_generated_role_template.go +++ b/client/management/v3/zz_generated_role_template.go @@ -6,6 +6,7 @@ import ( const ( RoleTemplateType = "roleTemplate" + RoleTemplateField = "creatorId" RoleTemplateFieldAnnotations = "annotations" RoleTemplateFieldBuiltin = "builtin" RoleTemplateFieldCreated = "created" @@ -24,6 +25,7 @@ const ( type RoleTemplate struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Builtin *bool `json:"builtin,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/management/v3/zz_generated_template.go b/client/management/v3/zz_generated_template.go index aad09519..bfd75aa7 100644 --- a/client/management/v3/zz_generated_template.go +++ b/client/management/v3/zz_generated_template.go @@ -6,6 +6,7 @@ import ( const ( TemplateType = "template" + TemplateField = "creatorId" TemplateFieldAnnotations = "annotations" TemplateFieldBase = "templateBase" TemplateFieldCatalogID = "catalogId" @@ -40,6 +41,7 @@ const ( type Template struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Base string `json:"templateBase,omitempty"` CatalogID string `json:"catalogId,omitempty"` diff --git a/client/management/v3/zz_generated_template_version.go b/client/management/v3/zz_generated_template_version.go index 009f9df0..8e4d007d 100644 --- a/client/management/v3/zz_generated_template_version.go +++ b/client/management/v3/zz_generated_template_version.go @@ -6,6 +6,7 @@ import ( const ( TemplateVersionType = "templateVersion" + TemplateVersionField = "creatorId" TemplateVersionFieldAnnotations = "annotations" TemplateVersionFieldCreated = "created" TemplateVersionFieldExternalID = "externalId" @@ -32,6 +33,7 @@ const ( type TemplateVersion struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` ExternalID string `json:"externalId,omitempty"` diff --git a/client/management/v3/zz_generated_token.go b/client/management/v3/zz_generated_token.go index 34620b39..f72ad3c0 100644 --- a/client/management/v3/zz_generated_token.go +++ b/client/management/v3/zz_generated_token.go @@ -6,6 +6,7 @@ import ( const ( TokenType = "token" + TokenField = "creatorId" TokenFieldAnnotations = "annotations" TokenFieldAuthProvider = "authProvider" TokenFieldCreated = "created" @@ -27,6 +28,7 @@ const ( type Token struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AuthProvider string `json:"authProvider,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/management/v3/zz_generated_user.go b/client/management/v3/zz_generated_user.go index 69e68ebf..9c3b453c 100644 --- a/client/management/v3/zz_generated_user.go +++ b/client/management/v3/zz_generated_user.go @@ -6,6 +6,7 @@ import ( const ( UserType = "user" + UserField = "creatorId" UserFieldAnnotations = "annotations" UserFieldCreated = "created" UserFieldFinalizers = "finalizers" @@ -24,6 +25,7 @@ const ( type User struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/project/v3/zz_generated_basic_auth.go b/client/project/v3/zz_generated_basic_auth.go index f23a1ec4..dc4f60d6 100644 --- a/client/project/v3/zz_generated_basic_auth.go +++ b/client/project/v3/zz_generated_basic_auth.go @@ -6,12 +6,13 @@ import ( const ( BasicAuthType = "basicAuth" + BasicAuthField = "creatorId" BasicAuthFieldAnnotations = "annotations" BasicAuthFieldCreated = "created" BasicAuthFieldFinalizers = "finalizers" BasicAuthFieldLabels = "labels" BasicAuthFieldName = "name" - BasicAuthFieldNamespace = "namespace" + BasicAuthFieldNamespaceId = "namespaceId" BasicAuthFieldOwnerReferences = "ownerReferences" BasicAuthFieldPassword = "password" BasicAuthFieldProjectID = "projectId" @@ -22,12 +23,13 @@ const ( type BasicAuth struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` - Namespace string `json:"namespace,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` Password string `json:"password,omitempty"` ProjectID string `json:"projectId,omitempty"` diff --git a/client/project/v3/zz_generated_certificate.go b/client/project/v3/zz_generated_certificate.go index d8008d65..5bfde285 100644 --- a/client/project/v3/zz_generated_certificate.go +++ b/client/project/v3/zz_generated_certificate.go @@ -6,7 +6,8 @@ import ( const ( CertificateType = "certificate" - CertificateFieldAlgorithm = "Algorithm" + CertificateField = "creatorId" + CertificateFieldAlgorithm = "algorithm" CertificateFieldAnnotations = "annotations" CertificateFieldCN = "cn" CertificateFieldCertFingerprint = "certFingerprint" @@ -19,7 +20,7 @@ const ( CertificateFieldKeySize = "keySize" CertificateFieldLabels = "labels" CertificateFieldName = "name" - CertificateFieldNamespace = "namespace" + CertificateFieldNamespaceId = "namespaceId" CertificateFieldOwnerReferences = "ownerReferences" CertificateFieldProjectID = "projectId" CertificateFieldRemoved = "removed" @@ -31,7 +32,8 @@ const ( type Certificate struct { types.Resource - Algorithm string `json:"Algorithm,omitempty"` + string `json:"creatorId,omitempty"` + Algorithm string `json:"algorithm,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` CN string `json:"cn,omitempty"` CertFingerprint string `json:"certFingerprint,omitempty"` @@ -44,7 +46,7 @@ type Certificate struct { KeySize string `json:"keySize,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` - Namespace string `json:"namespace,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` ProjectID string `json:"projectId,omitempty"` Removed string `json:"removed,omitempty"` diff --git a/client/project/v3/zz_generated_client.go b/client/project/v3/zz_generated_client.go index 8c1fc4d4..5b9aff86 100644 --- a/client/project/v3/zz_generated_client.go +++ b/client/project/v3/zz_generated_client.go @@ -7,24 +7,30 @@ import ( type Client struct { clientbase.APIBaseClient - Namespace NamespaceOperations - Ingress IngressOperations - Secret SecretOperations - ServiceAccountToken ServiceAccountTokenOperations - DockerCredential DockerCredentialOperations - Certificate CertificateOperations - BasicAuth BasicAuthOperations - SSHAuth SSHAuthOperations - Service ServiceOperations - Endpoint EndpointOperations - Pod PodOperations - Deployment DeploymentOperations - PersistentVolumeClaim PersistentVolumeClaimOperations - StatefulSet StatefulSetOperations - ReplicaSet ReplicaSetOperations - ReplicationController ReplicationControllerOperations - DaemonSet DaemonSetOperations - Workload WorkloadOperations + Namespace NamespaceOperations + PersistentVolumeClaim PersistentVolumeClaimOperations + Ingress IngressOperations + Secret SecretOperations + ServiceAccountToken ServiceAccountTokenOperations + DockerCredential DockerCredentialOperations + Certificate CertificateOperations + BasicAuth BasicAuthOperations + SSHAuth SSHAuthOperations + NamespacedSecret NamespacedSecretOperations + NamespacedServiceAccountToken NamespacedServiceAccountTokenOperations + NamespacedDockerCredential NamespacedDockerCredentialOperations + NamespacedCertificate NamespacedCertificateOperations + NamespacedBasicAuth NamespacedBasicAuthOperations + NamespacedSSHAuth NamespacedSSHAuthOperations + Service ServiceOperations + Endpoint EndpointOperations + Pod PodOperations + Deployment DeploymentOperations + StatefulSet StatefulSetOperations + ReplicaSet ReplicaSetOperations + ReplicationController ReplicationControllerOperations + DaemonSet DaemonSetOperations + Workload WorkloadOperations } func NewClient(opts *clientbase.ClientOpts) (*Client, error) { @@ -38,6 +44,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { } client.Namespace = newNamespaceClient(client) + client.PersistentVolumeClaim = newPersistentVolumeClaimClient(client) client.Ingress = newIngressClient(client) client.Secret = newSecretClient(client) client.ServiceAccountToken = newServiceAccountTokenClient(client) @@ -45,11 +52,16 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.Certificate = newCertificateClient(client) client.BasicAuth = newBasicAuthClient(client) client.SSHAuth = newSSHAuthClient(client) + client.NamespacedSecret = newNamespacedSecretClient(client) + client.NamespacedServiceAccountToken = newNamespacedServiceAccountTokenClient(client) + client.NamespacedDockerCredential = newNamespacedDockerCredentialClient(client) + client.NamespacedCertificate = newNamespacedCertificateClient(client) + client.NamespacedBasicAuth = newNamespacedBasicAuthClient(client) + client.NamespacedSSHAuth = newNamespacedSSHAuthClient(client) client.Service = newServiceClient(client) client.Endpoint = newEndpointClient(client) client.Pod = newPodClient(client) client.Deployment = newDeploymentClient(client) - client.PersistentVolumeClaim = newPersistentVolumeClaimClient(client) client.StatefulSet = newStatefulSetClient(client) client.ReplicaSet = newReplicaSetClient(client) client.ReplicationController = newReplicationControllerClient(client) diff --git a/client/project/v3/zz_generated_daemon_set.go b/client/project/v3/zz_generated_daemon_set.go index 0941470d..3a7dd34d 100644 --- a/client/project/v3/zz_generated_daemon_set.go +++ b/client/project/v3/zz_generated_daemon_set.go @@ -6,6 +6,7 @@ import ( const ( DaemonSetType = "daemonSet" + DaemonSetField = "creatorId" DaemonSetFieldActiveDeadlineSeconds = "activeDeadlineSeconds" DaemonSetFieldAnnotations = "annotations" DaemonSetFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -55,6 +56,7 @@ const ( type DaemonSet struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_deployment.go b/client/project/v3/zz_generated_deployment.go index 8d89e3ed..496372b7 100644 --- a/client/project/v3/zz_generated_deployment.go +++ b/client/project/v3/zz_generated_deployment.go @@ -6,6 +6,7 @@ import ( const ( DeploymentType = "deployment" + DeploymentField = "creatorId" DeploymentFieldActiveDeadlineSeconds = "activeDeadlineSeconds" DeploymentFieldAnnotations = "annotations" DeploymentFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -55,6 +56,7 @@ const ( type Deployment struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_docker_credential.go b/client/project/v3/zz_generated_docker_credential.go index b7cef9d2..b78fe7aa 100644 --- a/client/project/v3/zz_generated_docker_credential.go +++ b/client/project/v3/zz_generated_docker_credential.go @@ -6,12 +6,13 @@ import ( const ( DockerCredentialType = "dockerCredential" + DockerCredentialField = "creatorId" DockerCredentialFieldAnnotations = "annotations" DockerCredentialFieldCreated = "created" DockerCredentialFieldFinalizers = "finalizers" DockerCredentialFieldLabels = "labels" DockerCredentialFieldName = "name" - DockerCredentialFieldNamespace = "namespace" + DockerCredentialFieldNamespaceId = "namespaceId" DockerCredentialFieldOwnerReferences = "ownerReferences" DockerCredentialFieldProjectID = "projectId" DockerCredentialFieldRegistries = "registries" @@ -21,12 +22,13 @@ const ( type DockerCredential struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` - Namespace string `json:"namespace,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` ProjectID string `json:"projectId,omitempty"` Registries map[string]RegistryCredential `json:"registries,omitempty"` diff --git a/client/project/v3/zz_generated_endpoint.go b/client/project/v3/zz_generated_endpoint.go index 58ca308f..5fb88cfd 100644 --- a/client/project/v3/zz_generated_endpoint.go +++ b/client/project/v3/zz_generated_endpoint.go @@ -6,6 +6,7 @@ import ( const ( EndpointType = "endpoint" + EndpointField = "creatorId" EndpointFieldAnnotations = "annotations" EndpointFieldCreated = "created" EndpointFieldFinalizers = "finalizers" @@ -22,6 +23,7 @@ const ( type Endpoint struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` diff --git a/client/project/v3/zz_generated_http_ingress_path.go b/client/project/v3/zz_generated_http_ingress_path.go index b46d6c41..32d9ea00 100644 --- a/client/project/v3/zz_generated_http_ingress_path.go +++ b/client/project/v3/zz_generated_http_ingress_path.go @@ -2,15 +2,13 @@ package client const ( HTTPIngressPathType = "httpIngressPath" - HTTPIngressPathFieldPath = "path" HTTPIngressPathFieldServiceId = "serviceId" - HTTPIngressPathFieldServicePort = "servicePort" + HTTPIngressPathFieldTargetPort = "targetPort" HTTPIngressPathFieldWorkloadIDs = "workloadIds" ) type HTTPIngressPath struct { - Path string `json:"path,omitempty"` ServiceId string `json:"serviceId,omitempty"` - ServicePort string `json:"servicePort,omitempty"` + TargetPort string `json:"targetPort,omitempty"` WorkloadIDs []string `json:"workloadIds,omitempty"` } diff --git a/client/project/v3/zz_generated_http_ingress_rule_value.go b/client/project/v3/zz_generated_http_ingress_rule_value.go index 13e14576..4d148288 100644 --- a/client/project/v3/zz_generated_http_ingress_rule_value.go +++ b/client/project/v3/zz_generated_http_ingress_rule_value.go @@ -6,5 +6,5 @@ const ( ) type HTTPIngressRuleValue struct { - Paths []HTTPIngressPath `json:"paths,omitempty"` + Paths map[string]HTTPIngressPath `json:"paths,omitempty"` } diff --git a/client/project/v3/zz_generated_ingress.go b/client/project/v3/zz_generated_ingress.go index ce0ef2fc..1da2f782 100644 --- a/client/project/v3/zz_generated_ingress.go +++ b/client/project/v3/zz_generated_ingress.go @@ -6,6 +6,7 @@ import ( const ( IngressType = "ingress" + IngressField = "creatorId" IngressFieldAnnotations = "annotations" IngressFieldCreated = "created" IngressFieldDefaultBackend = "defaultBackend" @@ -27,6 +28,7 @@ const ( type Ingress struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` DefaultBackend *IngressBackend `json:"defaultBackend,omitempty"` diff --git a/client/project/v3/zz_generated_ingress_backend.go b/client/project/v3/zz_generated_ingress_backend.go index 6382c0e4..769a37ef 100644 --- a/client/project/v3/zz_generated_ingress_backend.go +++ b/client/project/v3/zz_generated_ingress_backend.go @@ -3,12 +3,12 @@ package client const ( IngressBackendType = "ingressBackend" IngressBackendFieldServiceId = "serviceId" - IngressBackendFieldServicePort = "servicePort" + IngressBackendFieldTargetPort = "targetPort" IngressBackendFieldWorkloadIDs = "workloadIds" ) type IngressBackend struct { ServiceId string `json:"serviceId,omitempty"` - ServicePort string `json:"servicePort,omitempty"` + TargetPort string `json:"targetPort,omitempty"` WorkloadIDs []string `json:"workloadIds,omitempty"` } diff --git a/client/project/v3/zz_generated_ingress_rule.go b/client/project/v3/zz_generated_ingress_rule.go index 574bd17c..2833e49e 100644 --- a/client/project/v3/zz_generated_ingress_rule.go +++ b/client/project/v3/zz_generated_ingress_rule.go @@ -1,12 +1,12 @@ package client const ( - IngressRuleType = "ingressRule" - IngressRuleFieldHTTP = "http" - IngressRuleFieldHost = "host" + IngressRuleType = "ingressRule" + IngressRuleFieldHost = "host" + IngressRuleFieldPaths = "paths" ) type IngressRule struct { - HTTP *HTTPIngressRuleValue `json:"http,omitempty"` - Host string `json:"host,omitempty"` + Host string `json:"host,omitempty"` + Paths map[string]HTTPIngressPath `json:"paths,omitempty"` } diff --git a/client/project/v3/zz_generated_namespace.go b/client/project/v3/zz_generated_namespace.go index 774cf98b..db71d260 100644 --- a/client/project/v3/zz_generated_namespace.go +++ b/client/project/v3/zz_generated_namespace.go @@ -6,6 +6,7 @@ import ( const ( NamespaceType = "namespace" + NamespaceField = "creatorId" NamespaceFieldAnnotations = "annotations" NamespaceFieldAnswers = "answers" NamespaceFieldCreated = "created" @@ -28,6 +29,7 @@ const ( type Namespace struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Answers map[string]interface{} `json:"answers,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/project/v3/zz_generated_namespaced_basic_auth.go b/client/project/v3/zz_generated_namespaced_basic_auth.go new file mode 100644 index 00000000..2218b9b1 --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_basic_auth.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedBasicAuthType = "namespacedBasicAuth" + NamespacedBasicAuthField = "creatorId" + NamespacedBasicAuthFieldAnnotations = "annotations" + NamespacedBasicAuthFieldCreated = "created" + NamespacedBasicAuthFieldFinalizers = "finalizers" + NamespacedBasicAuthFieldLabels = "labels" + NamespacedBasicAuthFieldName = "name" + NamespacedBasicAuthFieldNamespaceId = "namespaceId" + NamespacedBasicAuthFieldOwnerReferences = "ownerReferences" + NamespacedBasicAuthFieldPassword = "password" + NamespacedBasicAuthFieldProjectID = "projectId" + NamespacedBasicAuthFieldRemoved = "removed" + NamespacedBasicAuthFieldUsername = "username" + NamespacedBasicAuthFieldUuid = "uuid" +) + +type NamespacedBasicAuth struct { + types.Resource + string `json:"creatorId,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + Password string `json:"password,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Username string `json:"username,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type NamespacedBasicAuthCollection struct { + types.Collection + Data []NamespacedBasicAuth `json:"data,omitempty"` + client *NamespacedBasicAuthClient +} + +type NamespacedBasicAuthClient struct { + apiClient *Client +} + +type NamespacedBasicAuthOperations interface { + List(opts *types.ListOpts) (*NamespacedBasicAuthCollection, error) + Create(opts *NamespacedBasicAuth) (*NamespacedBasicAuth, error) + Update(existing *NamespacedBasicAuth, updates interface{}) (*NamespacedBasicAuth, error) + ByID(id string) (*NamespacedBasicAuth, error) + Delete(container *NamespacedBasicAuth) error +} + +func newNamespacedBasicAuthClient(apiClient *Client) *NamespacedBasicAuthClient { + return &NamespacedBasicAuthClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedBasicAuthClient) Create(container *NamespacedBasicAuth) (*NamespacedBasicAuth, error) { + resp := &NamespacedBasicAuth{} + err := c.apiClient.Ops.DoCreate(NamespacedBasicAuthType, container, resp) + return resp, err +} + +func (c *NamespacedBasicAuthClient) Update(existing *NamespacedBasicAuth, updates interface{}) (*NamespacedBasicAuth, error) { + resp := &NamespacedBasicAuth{} + err := c.apiClient.Ops.DoUpdate(NamespacedBasicAuthType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedBasicAuthClient) List(opts *types.ListOpts) (*NamespacedBasicAuthCollection, error) { + resp := &NamespacedBasicAuthCollection{} + err := c.apiClient.Ops.DoList(NamespacedBasicAuthType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedBasicAuthCollection) Next() (*NamespacedBasicAuthCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedBasicAuthCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedBasicAuthClient) ByID(id string) (*NamespacedBasicAuth, error) { + resp := &NamespacedBasicAuth{} + err := c.apiClient.Ops.DoByID(NamespacedBasicAuthType, id, resp) + return resp, err +} + +func (c *NamespacedBasicAuthClient) Delete(container *NamespacedBasicAuth) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedBasicAuthType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_namespaced_certificate.go b/client/project/v3/zz_generated_namespaced_certificate.go new file mode 100644 index 00000000..9bbdf0f0 --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_certificate.go @@ -0,0 +1,119 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedCertificateType = "namespacedCertificate" + NamespacedCertificateField = "creatorId" + NamespacedCertificateFieldAlgorithm = "algorithm" + NamespacedCertificateFieldAnnotations = "annotations" + NamespacedCertificateFieldCN = "cn" + NamespacedCertificateFieldCertFingerprint = "certFingerprint" + NamespacedCertificateFieldCerts = "certs" + NamespacedCertificateFieldCreated = "created" + NamespacedCertificateFieldFinalizers = "finalizers" + NamespacedCertificateFieldIssuedAt = "issuedAt" + NamespacedCertificateFieldIssuer = "issuer" + NamespacedCertificateFieldKey = "key" + NamespacedCertificateFieldKeySize = "keySize" + NamespacedCertificateFieldLabels = "labels" + NamespacedCertificateFieldName = "name" + NamespacedCertificateFieldNamespaceId = "namespaceId" + NamespacedCertificateFieldOwnerReferences = "ownerReferences" + NamespacedCertificateFieldProjectID = "projectId" + NamespacedCertificateFieldRemoved = "removed" + NamespacedCertificateFieldSerialNumber = "serialNumber" + NamespacedCertificateFieldSubjectAlternativeNames = "subjectAlternativeNames" + NamespacedCertificateFieldUuid = "uuid" + NamespacedCertificateFieldVersion = "version" +) + +type NamespacedCertificate struct { + types.Resource + string `json:"creatorId,omitempty"` + Algorithm string `json:"algorithm,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + CN string `json:"cn,omitempty"` + CertFingerprint string `json:"certFingerprint,omitempty"` + Certs string `json:"certs,omitempty"` + Created string `json:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + IssuedAt string `json:"issuedAt,omitempty"` + Issuer string `json:"issuer,omitempty"` + Key string `json:"key,omitempty"` + KeySize string `json:"keySize,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + SerialNumber string `json:"serialNumber,omitempty"` + SubjectAlternativeNames string `json:"subjectAlternativeNames,omitempty"` + Uuid string `json:"uuid,omitempty"` + Version string `json:"version,omitempty"` +} +type NamespacedCertificateCollection struct { + types.Collection + Data []NamespacedCertificate `json:"data,omitempty"` + client *NamespacedCertificateClient +} + +type NamespacedCertificateClient struct { + apiClient *Client +} + +type NamespacedCertificateOperations interface { + List(opts *types.ListOpts) (*NamespacedCertificateCollection, error) + Create(opts *NamespacedCertificate) (*NamespacedCertificate, error) + Update(existing *NamespacedCertificate, updates interface{}) (*NamespacedCertificate, error) + ByID(id string) (*NamespacedCertificate, error) + Delete(container *NamespacedCertificate) error +} + +func newNamespacedCertificateClient(apiClient *Client) *NamespacedCertificateClient { + return &NamespacedCertificateClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedCertificateClient) Create(container *NamespacedCertificate) (*NamespacedCertificate, error) { + resp := &NamespacedCertificate{} + err := c.apiClient.Ops.DoCreate(NamespacedCertificateType, container, resp) + return resp, err +} + +func (c *NamespacedCertificateClient) Update(existing *NamespacedCertificate, updates interface{}) (*NamespacedCertificate, error) { + resp := &NamespacedCertificate{} + err := c.apiClient.Ops.DoUpdate(NamespacedCertificateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedCertificateClient) List(opts *types.ListOpts) (*NamespacedCertificateCollection, error) { + resp := &NamespacedCertificateCollection{} + err := c.apiClient.Ops.DoList(NamespacedCertificateType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedCertificateCollection) Next() (*NamespacedCertificateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedCertificateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedCertificateClient) ByID(id string) (*NamespacedCertificate, error) { + resp := &NamespacedCertificate{} + err := c.apiClient.Ops.DoByID(NamespacedCertificateType, id, resp) + return resp, err +} + +func (c *NamespacedCertificateClient) Delete(container *NamespacedCertificate) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedCertificateType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_namespaced_docker_credential.go b/client/project/v3/zz_generated_namespaced_docker_credential.go new file mode 100644 index 00000000..ec0c6bf6 --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_docker_credential.go @@ -0,0 +1,99 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedDockerCredentialType = "namespacedDockerCredential" + NamespacedDockerCredentialField = "creatorId" + NamespacedDockerCredentialFieldAnnotations = "annotations" + NamespacedDockerCredentialFieldCreated = "created" + NamespacedDockerCredentialFieldFinalizers = "finalizers" + NamespacedDockerCredentialFieldLabels = "labels" + NamespacedDockerCredentialFieldName = "name" + NamespacedDockerCredentialFieldNamespaceId = "namespaceId" + NamespacedDockerCredentialFieldOwnerReferences = "ownerReferences" + NamespacedDockerCredentialFieldProjectID = "projectId" + NamespacedDockerCredentialFieldRegistries = "registries" + NamespacedDockerCredentialFieldRemoved = "removed" + NamespacedDockerCredentialFieldUuid = "uuid" +) + +type NamespacedDockerCredential struct { + types.Resource + string `json:"creatorId,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Registries map[string]RegistryCredential `json:"registries,omitempty"` + Removed string `json:"removed,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type NamespacedDockerCredentialCollection struct { + types.Collection + Data []NamespacedDockerCredential `json:"data,omitempty"` + client *NamespacedDockerCredentialClient +} + +type NamespacedDockerCredentialClient struct { + apiClient *Client +} + +type NamespacedDockerCredentialOperations interface { + List(opts *types.ListOpts) (*NamespacedDockerCredentialCollection, error) + Create(opts *NamespacedDockerCredential) (*NamespacedDockerCredential, error) + Update(existing *NamespacedDockerCredential, updates interface{}) (*NamespacedDockerCredential, error) + ByID(id string) (*NamespacedDockerCredential, error) + Delete(container *NamespacedDockerCredential) error +} + +func newNamespacedDockerCredentialClient(apiClient *Client) *NamespacedDockerCredentialClient { + return &NamespacedDockerCredentialClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedDockerCredentialClient) Create(container *NamespacedDockerCredential) (*NamespacedDockerCredential, error) { + resp := &NamespacedDockerCredential{} + err := c.apiClient.Ops.DoCreate(NamespacedDockerCredentialType, container, resp) + return resp, err +} + +func (c *NamespacedDockerCredentialClient) Update(existing *NamespacedDockerCredential, updates interface{}) (*NamespacedDockerCredential, error) { + resp := &NamespacedDockerCredential{} + err := c.apiClient.Ops.DoUpdate(NamespacedDockerCredentialType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedDockerCredentialClient) List(opts *types.ListOpts) (*NamespacedDockerCredentialCollection, error) { + resp := &NamespacedDockerCredentialCollection{} + err := c.apiClient.Ops.DoList(NamespacedDockerCredentialType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedDockerCredentialCollection) Next() (*NamespacedDockerCredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedDockerCredentialCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedDockerCredentialClient) ByID(id string) (*NamespacedDockerCredential, error) { + resp := &NamespacedDockerCredential{} + err := c.apiClient.Ops.DoByID(NamespacedDockerCredentialType, id, resp) + return resp, err +} + +func (c *NamespacedDockerCredentialClient) Delete(container *NamespacedDockerCredential) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedDockerCredentialType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_namespaced_secret.go b/client/project/v3/zz_generated_namespaced_secret.go new file mode 100644 index 00000000..3758ff7b --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_secret.go @@ -0,0 +1,103 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedSecretType = "namespacedSecret" + NamespacedSecretField = "creatorId" + NamespacedSecretFieldAnnotations = "annotations" + NamespacedSecretFieldCreated = "created" + NamespacedSecretFieldData = "data" + NamespacedSecretFieldFinalizers = "finalizers" + NamespacedSecretFieldKind = "kind" + NamespacedSecretFieldLabels = "labels" + NamespacedSecretFieldName = "name" + NamespacedSecretFieldNamespaceId = "namespaceId" + NamespacedSecretFieldOwnerReferences = "ownerReferences" + NamespacedSecretFieldProjectID = "projectId" + NamespacedSecretFieldRemoved = "removed" + NamespacedSecretFieldStringData = "stringData" + NamespacedSecretFieldUuid = "uuid" +) + +type NamespacedSecret struct { + types.Resource + string `json:"creatorId,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + Data map[string]string `json:"data,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + Kind string `json:"kind,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + StringData map[string]string `json:"stringData,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type NamespacedSecretCollection struct { + types.Collection + Data []NamespacedSecret `json:"data,omitempty"` + client *NamespacedSecretClient +} + +type NamespacedSecretClient struct { + apiClient *Client +} + +type NamespacedSecretOperations interface { + List(opts *types.ListOpts) (*NamespacedSecretCollection, error) + Create(opts *NamespacedSecret) (*NamespacedSecret, error) + Update(existing *NamespacedSecret, updates interface{}) (*NamespacedSecret, error) + ByID(id string) (*NamespacedSecret, error) + Delete(container *NamespacedSecret) error +} + +func newNamespacedSecretClient(apiClient *Client) *NamespacedSecretClient { + return &NamespacedSecretClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedSecretClient) Create(container *NamespacedSecret) (*NamespacedSecret, error) { + resp := &NamespacedSecret{} + err := c.apiClient.Ops.DoCreate(NamespacedSecretType, container, resp) + return resp, err +} + +func (c *NamespacedSecretClient) Update(existing *NamespacedSecret, updates interface{}) (*NamespacedSecret, error) { + resp := &NamespacedSecret{} + err := c.apiClient.Ops.DoUpdate(NamespacedSecretType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedSecretClient) List(opts *types.ListOpts) (*NamespacedSecretCollection, error) { + resp := &NamespacedSecretCollection{} + err := c.apiClient.Ops.DoList(NamespacedSecretType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedSecretCollection) Next() (*NamespacedSecretCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedSecretCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedSecretClient) ByID(id string) (*NamespacedSecret, error) { + resp := &NamespacedSecret{} + err := c.apiClient.Ops.DoByID(NamespacedSecretType, id, resp) + return resp, err +} + +func (c *NamespacedSecretClient) Delete(container *NamespacedSecret) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedSecretType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_namespaced_service_account_token.go b/client/project/v3/zz_generated_namespaced_service_account_token.go new file mode 100644 index 00000000..2c4fef3a --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_service_account_token.go @@ -0,0 +1,105 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedServiceAccountTokenType = "namespacedServiceAccountToken" + NamespacedServiceAccountTokenField = "creatorId" + NamespacedServiceAccountTokenFieldAccountName = "accountName" + NamespacedServiceAccountTokenFieldAccountUID = "accountUid" + NamespacedServiceAccountTokenFieldAnnotations = "annotations" + NamespacedServiceAccountTokenFieldCACRT = "caCrt" + NamespacedServiceAccountTokenFieldCreated = "created" + NamespacedServiceAccountTokenFieldFinalizers = "finalizers" + NamespacedServiceAccountTokenFieldLabels = "labels" + NamespacedServiceAccountTokenFieldName = "name" + NamespacedServiceAccountTokenFieldNamespaceId = "namespaceId" + NamespacedServiceAccountTokenFieldOwnerReferences = "ownerReferences" + NamespacedServiceAccountTokenFieldProjectID = "projectId" + NamespacedServiceAccountTokenFieldRemoved = "removed" + NamespacedServiceAccountTokenFieldToken = "token" + NamespacedServiceAccountTokenFieldUuid = "uuid" +) + +type NamespacedServiceAccountToken struct { + types.Resource + string `json:"creatorId,omitempty"` + AccountName string `json:"accountName,omitempty"` + AccountUID string `json:"accountUid,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + CACRT string `json:"caCrt,omitempty"` + Created string `json:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Token string `json:"token,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type NamespacedServiceAccountTokenCollection struct { + types.Collection + Data []NamespacedServiceAccountToken `json:"data,omitempty"` + client *NamespacedServiceAccountTokenClient +} + +type NamespacedServiceAccountTokenClient struct { + apiClient *Client +} + +type NamespacedServiceAccountTokenOperations interface { + List(opts *types.ListOpts) (*NamespacedServiceAccountTokenCollection, error) + Create(opts *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) + Update(existing *NamespacedServiceAccountToken, updates interface{}) (*NamespacedServiceAccountToken, error) + ByID(id string) (*NamespacedServiceAccountToken, error) + Delete(container *NamespacedServiceAccountToken) error +} + +func newNamespacedServiceAccountTokenClient(apiClient *Client) *NamespacedServiceAccountTokenClient { + return &NamespacedServiceAccountTokenClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedServiceAccountTokenClient) Create(container *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) { + resp := &NamespacedServiceAccountToken{} + err := c.apiClient.Ops.DoCreate(NamespacedServiceAccountTokenType, container, resp) + return resp, err +} + +func (c *NamespacedServiceAccountTokenClient) Update(existing *NamespacedServiceAccountToken, updates interface{}) (*NamespacedServiceAccountToken, error) { + resp := &NamespacedServiceAccountToken{} + err := c.apiClient.Ops.DoUpdate(NamespacedServiceAccountTokenType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedServiceAccountTokenClient) List(opts *types.ListOpts) (*NamespacedServiceAccountTokenCollection, error) { + resp := &NamespacedServiceAccountTokenCollection{} + err := c.apiClient.Ops.DoList(NamespacedServiceAccountTokenType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedServiceAccountTokenCollection) Next() (*NamespacedServiceAccountTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedServiceAccountTokenCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedServiceAccountTokenClient) ByID(id string) (*NamespacedServiceAccountToken, error) { + resp := &NamespacedServiceAccountToken{} + err := c.apiClient.Ops.DoByID(NamespacedServiceAccountTokenType, id, resp) + return resp, err +} + +func (c *NamespacedServiceAccountTokenClient) Delete(container *NamespacedServiceAccountToken) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedServiceAccountTokenType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_namespaced_ssh_auth.go b/client/project/v3/zz_generated_namespaced_ssh_auth.go new file mode 100644 index 00000000..cbf42dee --- /dev/null +++ b/client/project/v3/zz_generated_namespaced_ssh_auth.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NamespacedSSHAuthType = "namespacedSshAuth" + NamespacedSSHAuthField = "creatorId" + NamespacedSSHAuthFieldAnnotations = "annotations" + NamespacedSSHAuthFieldCreated = "created" + NamespacedSSHAuthFieldFinalizers = "finalizers" + NamespacedSSHAuthFieldFingerprint = "certFingerprint" + NamespacedSSHAuthFieldLabels = "labels" + NamespacedSSHAuthFieldName = "name" + NamespacedSSHAuthFieldNamespaceId = "namespaceId" + NamespacedSSHAuthFieldOwnerReferences = "ownerReferences" + NamespacedSSHAuthFieldPrivateKey = "privateKey" + NamespacedSSHAuthFieldProjectID = "projectId" + NamespacedSSHAuthFieldRemoved = "removed" + NamespacedSSHAuthFieldUuid = "uuid" +) + +type NamespacedSSHAuth struct { + types.Resource + string `json:"creatorId,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty"` + Fingerprint string `json:"certFingerprint,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + PrivateKey string `json:"privateKey,omitempty"` + ProjectID string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type NamespacedSSHAuthCollection struct { + types.Collection + Data []NamespacedSSHAuth `json:"data,omitempty"` + client *NamespacedSSHAuthClient +} + +type NamespacedSSHAuthClient struct { + apiClient *Client +} + +type NamespacedSSHAuthOperations interface { + List(opts *types.ListOpts) (*NamespacedSSHAuthCollection, error) + Create(opts *NamespacedSSHAuth) (*NamespacedSSHAuth, error) + Update(existing *NamespacedSSHAuth, updates interface{}) (*NamespacedSSHAuth, error) + ByID(id string) (*NamespacedSSHAuth, error) + Delete(container *NamespacedSSHAuth) error +} + +func newNamespacedSSHAuthClient(apiClient *Client) *NamespacedSSHAuthClient { + return &NamespacedSSHAuthClient{ + apiClient: apiClient, + } +} + +func (c *NamespacedSSHAuthClient) Create(container *NamespacedSSHAuth) (*NamespacedSSHAuth, error) { + resp := &NamespacedSSHAuth{} + err := c.apiClient.Ops.DoCreate(NamespacedSSHAuthType, container, resp) + return resp, err +} + +func (c *NamespacedSSHAuthClient) Update(existing *NamespacedSSHAuth, updates interface{}) (*NamespacedSSHAuth, error) { + resp := &NamespacedSSHAuth{} + err := c.apiClient.Ops.DoUpdate(NamespacedSSHAuthType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NamespacedSSHAuthClient) List(opts *types.ListOpts) (*NamespacedSSHAuthCollection, error) { + resp := &NamespacedSSHAuthCollection{} + err := c.apiClient.Ops.DoList(NamespacedSSHAuthType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NamespacedSSHAuthCollection) Next() (*NamespacedSSHAuthCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NamespacedSSHAuthCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NamespacedSSHAuthClient) ByID(id string) (*NamespacedSSHAuth, error) { + resp := &NamespacedSSHAuth{} + err := c.apiClient.Ops.DoByID(NamespacedSSHAuthType, id, resp) + return resp, err +} + +func (c *NamespacedSSHAuthClient) Delete(container *NamespacedSSHAuth) error { + return c.apiClient.Ops.DoResourceDelete(NamespacedSSHAuthType, &container.Resource) +} diff --git a/client/project/v3/zz_generated_persistent_volume_claim.go b/client/project/v3/zz_generated_persistent_volume_claim.go index 92372079..f19ad587 100644 --- a/client/project/v3/zz_generated_persistent_volume_claim.go +++ b/client/project/v3/zz_generated_persistent_volume_claim.go @@ -6,13 +6,16 @@ import ( const ( PersistentVolumeClaimType = "persistentVolumeClaim" + PersistentVolumeClaimField = "creatorId" PersistentVolumeClaimFieldAccessModes = "accessModes" PersistentVolumeClaimFieldAnnotations = "annotations" PersistentVolumeClaimFieldCreated = "created" PersistentVolumeClaimFieldFinalizers = "finalizers" PersistentVolumeClaimFieldLabels = "labels" PersistentVolumeClaimFieldName = "name" + PersistentVolumeClaimFieldNamespaceId = "namespaceId" PersistentVolumeClaimFieldOwnerReferences = "ownerReferences" + PersistentVolumeClaimFieldProjectID = "projectId" PersistentVolumeClaimFieldRemoved = "removed" PersistentVolumeClaimFieldResources = "resources" PersistentVolumeClaimFieldSelector = "selector" @@ -27,13 +30,16 @@ const ( type PersistentVolumeClaim struct { types.Resource + string `json:"creatorId,omitempty"` AccessModes []string `json:"accessModes,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty"` Removed string `json:"removed,omitempty"` Resources *ResourceRequirements `json:"resources,omitempty"` Selector *LabelSelector `json:"selector,omitempty"` diff --git a/client/project/v3/zz_generated_pod.go b/client/project/v3/zz_generated_pod.go index 1b612484..35f7f8bb 100644 --- a/client/project/v3/zz_generated_pod.go +++ b/client/project/v3/zz_generated_pod.go @@ -6,6 +6,7 @@ import ( const ( PodType = "pod" + PodField = "creatorId" PodFieldActiveDeadlineSeconds = "activeDeadlineSeconds" PodFieldAnnotations = "annotations" PodFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -49,6 +50,7 @@ const ( type Pod struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_replica_set.go b/client/project/v3/zz_generated_replica_set.go index af0f37ce..1dd64933 100644 --- a/client/project/v3/zz_generated_replica_set.go +++ b/client/project/v3/zz_generated_replica_set.go @@ -6,6 +6,7 @@ import ( const ( ReplicaSetType = "replicaSet" + ReplicaSetField = "creatorId" ReplicaSetFieldActiveDeadlineSeconds = "activeDeadlineSeconds" ReplicaSetFieldAnnotations = "annotations" ReplicaSetFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -53,6 +54,7 @@ const ( type ReplicaSet struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_replication_controller.go b/client/project/v3/zz_generated_replication_controller.go index 25a3854e..dd7c4571 100644 --- a/client/project/v3/zz_generated_replication_controller.go +++ b/client/project/v3/zz_generated_replication_controller.go @@ -6,6 +6,7 @@ import ( const ( ReplicationControllerType = "replicationController" + ReplicationControllerField = "creatorId" ReplicationControllerFieldActiveDeadlineSeconds = "activeDeadlineSeconds" ReplicationControllerFieldAnnotations = "annotations" ReplicationControllerFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -53,6 +54,7 @@ const ( type ReplicationController struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_secret.go b/client/project/v3/zz_generated_secret.go index d10cfbed..b9b4e0ee 100644 --- a/client/project/v3/zz_generated_secret.go +++ b/client/project/v3/zz_generated_secret.go @@ -6,6 +6,7 @@ import ( const ( SecretType = "secret" + SecretField = "creatorId" SecretFieldAnnotations = "annotations" SecretFieldCreated = "created" SecretFieldData = "data" @@ -23,6 +24,7 @@ const ( type Secret struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Data map[string]string `json:"data,omitempty"` diff --git a/client/project/v3/zz_generated_service.go b/client/project/v3/zz_generated_service.go index 9a2561d7..61809c81 100644 --- a/client/project/v3/zz_generated_service.go +++ b/client/project/v3/zz_generated_service.go @@ -6,6 +6,7 @@ import ( const ( ServiceType = "service" + ServiceField = "creatorId" ServiceFieldAnnotations = "annotations" ServiceFieldClusterIp = "clusterIp" ServiceFieldCreated = "created" @@ -39,6 +40,7 @@ const ( type Service struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` ClusterIp string `json:"clusterIp,omitempty"` Created string `json:"created,omitempty"` diff --git a/client/project/v3/zz_generated_service_account_token.go b/client/project/v3/zz_generated_service_account_token.go index 79086fd6..274a9eef 100644 --- a/client/project/v3/zz_generated_service_account_token.go +++ b/client/project/v3/zz_generated_service_account_token.go @@ -6,6 +6,7 @@ import ( const ( ServiceAccountTokenType = "serviceAccountToken" + ServiceAccountTokenField = "creatorId" ServiceAccountTokenFieldAccountName = "accountName" ServiceAccountTokenFieldAccountUID = "accountUid" ServiceAccountTokenFieldAnnotations = "annotations" @@ -14,8 +15,7 @@ const ( ServiceAccountTokenFieldFinalizers = "finalizers" ServiceAccountTokenFieldLabels = "labels" ServiceAccountTokenFieldName = "name" - ServiceAccountTokenFieldNamespace = "namespace" - ServiceAccountTokenFieldNamespaceID = "namespaceId" + ServiceAccountTokenFieldNamespaceId = "namespaceId" ServiceAccountTokenFieldOwnerReferences = "ownerReferences" ServiceAccountTokenFieldProjectID = "projectId" ServiceAccountTokenFieldRemoved = "removed" @@ -25,6 +25,7 @@ const ( type ServiceAccountToken struct { types.Resource + string `json:"creatorId,omitempty"` AccountName string `json:"accountName,omitempty"` AccountUID string `json:"accountUid,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` @@ -33,8 +34,7 @@ type ServiceAccountToken struct { Finalizers []string `json:"finalizers,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` - Namespace string `json:"namespace,omitempty"` - NamespaceID string `json:"namespaceId,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` ProjectID string `json:"projectId,omitempty"` Removed string `json:"removed,omitempty"` diff --git a/client/project/v3/zz_generated_ssh_auth.go b/client/project/v3/zz_generated_ssh_auth.go index 6ee6c13d..ff0e03f9 100644 --- a/client/project/v3/zz_generated_ssh_auth.go +++ b/client/project/v3/zz_generated_ssh_auth.go @@ -6,12 +6,14 @@ import ( const ( SSHAuthType = "sshAuth" + SSHAuthField = "creatorId" SSHAuthFieldAnnotations = "annotations" SSHAuthFieldCreated = "created" SSHAuthFieldFinalizers = "finalizers" + SSHAuthFieldFingerprint = "certFingerprint" SSHAuthFieldLabels = "labels" SSHAuthFieldName = "name" - SSHAuthFieldNamespace = "namespace" + SSHAuthFieldNamespaceId = "namespaceId" SSHAuthFieldOwnerReferences = "ownerReferences" SSHAuthFieldPrivateKey = "privateKey" SSHAuthFieldProjectID = "projectId" @@ -21,12 +23,14 @@ const ( type SSHAuth struct { types.Resource + string `json:"creatorId,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Created string `json:"created,omitempty"` Finalizers []string `json:"finalizers,omitempty"` + Fingerprint string `json:"certFingerprint,omitempty"` Labels map[string]string `json:"labels,omitempty"` Name string `json:"name,omitempty"` - Namespace string `json:"namespace,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` PrivateKey string `json:"privateKey,omitempty"` ProjectID string `json:"projectId,omitempty"` diff --git a/client/project/v3/zz_generated_stateful_set.go b/client/project/v3/zz_generated_stateful_set.go index 67bc7ce8..6076827d 100644 --- a/client/project/v3/zz_generated_stateful_set.go +++ b/client/project/v3/zz_generated_stateful_set.go @@ -6,6 +6,7 @@ import ( const ( StatefulSetType = "statefulSet" + StatefulSetField = "creatorId" StatefulSetFieldActiveDeadlineSeconds = "activeDeadlineSeconds" StatefulSetFieldAnnotations = "annotations" StatefulSetFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -58,6 +59,7 @@ const ( type StatefulSet struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` diff --git a/client/project/v3/zz_generated_workload.go b/client/project/v3/zz_generated_workload.go index 91dbe2b5..5ca031e8 100644 --- a/client/project/v3/zz_generated_workload.go +++ b/client/project/v3/zz_generated_workload.go @@ -6,6 +6,7 @@ import ( const ( WorkloadType = "workload" + WorkloadField = "creatorId" WorkloadFieldActiveDeadlineSeconds = "activeDeadlineSeconds" WorkloadFieldAnnotations = "annotations" WorkloadFieldAutomountServiceAccountToken = "automountServiceAccountToken" @@ -54,6 +55,7 @@ const ( type Workload struct { types.Resource + string `json:"creatorId,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`