mirror of
https://github.com/rancher/types.git
synced 2025-09-19 17:15:36 +00:00
Updated generated code
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/api/apps/v1beta2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type DeploymentLifecycle interface {
|
||||
Initialize(obj *v1beta2.Deployment) error
|
||||
Remove(obj *v1beta2.Deployment) error
|
||||
Updated(obj *v1beta2.Deployment) error
|
||||
}
|
||||
|
||||
type deploymentLifecycleAdapter struct {
|
||||
lifecycle DeploymentLifecycle
|
||||
}
|
||||
|
||||
func (w *deploymentLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*v1beta2.Deployment))
|
||||
}
|
||||
|
||||
func (w *deploymentLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*v1beta2.Deployment))
|
||||
}
|
||||
|
||||
func (w *deploymentLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*v1beta2.Deployment))
|
||||
}
|
||||
|
||||
func NewDeploymentLifecycleAdapter(name string, client DeploymentInterface, l DeploymentLifecycle) DeploymentHandlerFunc {
|
||||
adapter := &deploymentLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *v1beta2.Deployment) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,416 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterRoleTemplate) DeepCopyInto(out *ClusterRoleTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac_v1.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ClusterRoleTemplateNames != nil {
|
||||
in, out := &in.ClusterRoleTemplateNames, &out.ClusterRoleTemplateNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplate.
|
||||
func (in *ClusterRoleTemplate) DeepCopy() *ClusterRoleTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterRoleTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplate) 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 *ClusterRoleTemplateBinding) DeepCopyInto(out *ClusterRoleTemplateBinding) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Subject = in.Subject
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBinding.
|
||||
func (in *ClusterRoleTemplateBinding) DeepCopy() *ClusterRoleTemplateBinding {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterRoleTemplateBinding)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplateBinding) 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 *ClusterRoleTemplateBindingList) DeepCopyInto(out *ClusterRoleTemplateBindingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleTemplateBinding, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBindingList.
|
||||
func (in *ClusterRoleTemplateBindingList) DeepCopy() *ClusterRoleTemplateBindingList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterRoleTemplateBindingList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplateBindingList) 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 *ClusterRoleTemplateList) DeepCopyInto(out *ClusterRoleTemplateList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateList.
|
||||
func (in *ClusterRoleTemplateList) DeepCopy() *ClusterRoleTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterRoleTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplateList) 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 *PodSecurityPolicyTemplate) DeepCopyInto(out *PodSecurityPolicyTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplate.
|
||||
func (in *PodSecurityPolicyTemplate) DeepCopy() *PodSecurityPolicyTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSecurityPolicyTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSecurityPolicyTemplate) 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 *PodSecurityPolicyTemplateList) DeepCopyInto(out *PodSecurityPolicyTemplateList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PodSecurityPolicyTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplateList.
|
||||
func (in *PodSecurityPolicyTemplateList) DeepCopy() *PodSecurityPolicyTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSecurityPolicyTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSecurityPolicyTemplateList) 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 *Project) DeepCopyInto(out *Project) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
|
||||
func (in *Project) DeepCopy() *Project {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Project)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Project) 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 *ProjectList) DeepCopyInto(out *ProjectList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Project, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
|
||||
func (in *ProjectList) DeepCopy() *ProjectList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectList) 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 *ProjectRoleTemplate) DeepCopyInto(out *ProjectRoleTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac_v1.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ProjectRoleTemplateNames != nil {
|
||||
in, out := &in.ProjectRoleTemplateNames, &out.ProjectRoleTemplateNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplate.
|
||||
func (in *ProjectRoleTemplate) DeepCopy() *ProjectRoleTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplate) 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 *ProjectRoleTemplateBinding) DeepCopyInto(out *ProjectRoleTemplateBinding) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Subject = in.Subject
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBinding.
|
||||
func (in *ProjectRoleTemplateBinding) DeepCopy() *ProjectRoleTemplateBinding {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateBinding)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateBinding) 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 *ProjectRoleTemplateBindingList) DeepCopyInto(out *ProjectRoleTemplateBindingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ProjectRoleTemplateBinding, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBindingList.
|
||||
func (in *ProjectRoleTemplateBindingList) DeepCopy() *ProjectRoleTemplateBindingList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateBindingList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateBindingList) 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 *ProjectRoleTemplateList) DeepCopyInto(out *ProjectRoleTemplateList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ProjectRoleTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateList.
|
||||
func (in *ProjectRoleTemplateList) DeepCopy() *ProjectRoleTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateList) 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 *ProjectSpec) DeepCopyInto(out *ProjectSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
|
||||
func (in *ProjectSpec) DeepCopy() *ProjectSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
@@ -1,187 +0,0 @@
|
||||
package v1
|
||||
|
||||
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 (
|
||||
ClusterNodeGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "cluster.cattle.io",
|
||||
Kind: "ClusterNode",
|
||||
}
|
||||
ClusterNodeResource = metav1.APIResource{
|
||||
Name: "clusternodes",
|
||||
SingularName: "clusternode",
|
||||
Namespaced: false,
|
||||
Kind: ClusterNodeGroupVersionKind.Kind,
|
||||
}
|
||||
)
|
||||
|
||||
type ClusterNodeList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ClusterNode
|
||||
}
|
||||
|
||||
type ClusterNodeHandlerFunc func(key string, obj *ClusterNode) error
|
||||
|
||||
type ClusterNodeLister interface {
|
||||
List(namespace string, selector labels.Selector) (ret []*ClusterNode, err error)
|
||||
Get(namespace, name string) (*ClusterNode, error)
|
||||
}
|
||||
|
||||
type ClusterNodeController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() ClusterNodeLister
|
||||
AddHandler(handler ClusterNodeHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
}
|
||||
|
||||
type ClusterNodeInterface interface {
|
||||
ObjectClient() *clientbase.ObjectClient
|
||||
Create(*ClusterNode) (*ClusterNode, error)
|
||||
Get(name string, opts metav1.GetOptions) (*ClusterNode, error)
|
||||
Update(*ClusterNode) (*ClusterNode, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
List(opts metav1.ListOptions) (*ClusterNodeList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() ClusterNodeController
|
||||
}
|
||||
|
||||
type clusterNodeLister struct {
|
||||
controller *clusterNodeController
|
||||
}
|
||||
|
||||
func (l *clusterNodeLister) List(namespace string, selector labels.Selector) (ret []*ClusterNode, err error) {
|
||||
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
|
||||
ret = append(ret, obj.(*ClusterNode))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (l *clusterNodeLister) Get(namespace, name string) (*ClusterNode, error) {
|
||||
obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(schema.GroupResource{
|
||||
Group: ClusterNodeGroupVersionKind.Group,
|
||||
Resource: "clusterNode",
|
||||
}, name)
|
||||
}
|
||||
return obj.(*ClusterNode), nil
|
||||
}
|
||||
|
||||
type clusterNodeController struct {
|
||||
controller.GenericController
|
||||
}
|
||||
|
||||
func (c *clusterNodeController) Lister() ClusterNodeLister {
|
||||
return &clusterNodeLister{
|
||||
controller: c,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *clusterNodeController) AddHandler(handler ClusterNodeHandlerFunc) {
|
||||
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.(*ClusterNode))
|
||||
})
|
||||
}
|
||||
|
||||
type clusterNodeFactory struct {
|
||||
}
|
||||
|
||||
func (c clusterNodeFactory) Object() runtime.Object {
|
||||
return &ClusterNode{}
|
||||
}
|
||||
|
||||
func (c clusterNodeFactory) List() runtime.Object {
|
||||
return &ClusterNodeList{}
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Controller() ClusterNodeController {
|
||||
s.client.Lock()
|
||||
defer s.client.Unlock()
|
||||
|
||||
c, ok := s.client.clusterNodeControllers[s.ns]
|
||||
if ok {
|
||||
return c
|
||||
}
|
||||
|
||||
genericController := controller.NewGenericController(ClusterNodeGroupVersionKind.Kind+"Controller",
|
||||
s.objectClient)
|
||||
|
||||
c = &clusterNodeController{
|
||||
GenericController: genericController,
|
||||
}
|
||||
|
||||
s.client.clusterNodeControllers[s.ns] = c
|
||||
s.client.starters = append(s.client.starters, c)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
type clusterNodeClient struct {
|
||||
client *Client
|
||||
ns string
|
||||
objectClient *clientbase.ObjectClient
|
||||
controller ClusterNodeController
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) ObjectClient() *clientbase.ObjectClient {
|
||||
return s.objectClient
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Create(o *ClusterNode) (*ClusterNode, error) {
|
||||
obj, err := s.objectClient.Create(o)
|
||||
return obj.(*ClusterNode), err
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Get(name string, opts metav1.GetOptions) (*ClusterNode, error) {
|
||||
obj, err := s.objectClient.Get(name, opts)
|
||||
return obj.(*ClusterNode), err
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Update(o *ClusterNode) (*ClusterNode, error) {
|
||||
obj, err := s.objectClient.Update(o.Name, o)
|
||||
return obj.(*ClusterNode), err
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.Delete(name, options)
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) List(opts metav1.ListOptions) (*ClusterNodeList, error) {
|
||||
obj, err := s.objectClient.List(opts)
|
||||
return obj.(*ClusterNodeList), err
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return s.objectClient.Watch(opts)
|
||||
}
|
||||
|
||||
func (s *clusterNodeClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
|
||||
}
|
@@ -1,133 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/rancher/norman/clientbase"
|
||||
"github.com/rancher/norman/controller"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
controller.Starter
|
||||
|
||||
ClustersGetter
|
||||
ClusterNodesGetter
|
||||
MachinesGetter
|
||||
MachineDriversGetter
|
||||
MachineTemplatesGetter
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
sync.Mutex
|
||||
restClient rest.Interface
|
||||
starters []controller.Starter
|
||||
|
||||
clusterControllers map[string]ClusterController
|
||||
clusterNodeControllers map[string]ClusterNodeController
|
||||
machineControllers map[string]MachineController
|
||||
machineDriverControllers map[string]MachineDriverController
|
||||
machineTemplateControllers map[string]MachineTemplateController
|
||||
}
|
||||
|
||||
func NewForConfig(config rest.Config) (Interface, error) {
|
||||
if config.NegotiatedSerializer == nil {
|
||||
configConfig := dynamic.ContentConfig()
|
||||
config.NegotiatedSerializer = configConfig.NegotiatedSerializer
|
||||
}
|
||||
|
||||
restClient, err := rest.UnversionedRESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Client{
|
||||
restClient: restClient,
|
||||
|
||||
clusterControllers: map[string]ClusterController{},
|
||||
clusterNodeControllers: map[string]ClusterNodeController{},
|
||||
machineControllers: map[string]MachineController{},
|
||||
machineDriverControllers: map[string]MachineDriverController{},
|
||||
machineTemplateControllers: map[string]MachineTemplateController{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Client) RESTClient() rest.Interface {
|
||||
return c.restClient
|
||||
}
|
||||
|
||||
func (c *Client) Sync(ctx context.Context) error {
|
||||
return controller.Sync(ctx, c.starters...)
|
||||
}
|
||||
|
||||
func (c *Client) Start(ctx context.Context, threadiness int) error {
|
||||
return controller.Start(ctx, threadiness, c.starters...)
|
||||
}
|
||||
|
||||
type ClustersGetter interface {
|
||||
Clusters(namespace string) ClusterInterface
|
||||
}
|
||||
|
||||
func (c *Client) Clusters(namespace string) ClusterInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{})
|
||||
return &clusterClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type ClusterNodesGetter interface {
|
||||
ClusterNodes(namespace string) ClusterNodeInterface
|
||||
}
|
||||
|
||||
func (c *Client) ClusterNodes(namespace string) ClusterNodeInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &ClusterNodeResource, ClusterNodeGroupVersionKind, clusterNodeFactory{})
|
||||
return &clusterNodeClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type MachinesGetter interface {
|
||||
Machines(namespace string) MachineInterface
|
||||
}
|
||||
|
||||
func (c *Client) Machines(namespace string) MachineInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineResource, MachineGroupVersionKind, machineFactory{})
|
||||
return &machineClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type MachineDriversGetter interface {
|
||||
MachineDrivers(namespace string) MachineDriverInterface
|
||||
}
|
||||
|
||||
func (c *Client) MachineDrivers(namespace string) MachineDriverInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineDriverResource, MachineDriverGroupVersionKind, machineDriverFactory{})
|
||||
return &machineDriverClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type MachineTemplatesGetter interface {
|
||||
MachineTemplates(namespace string) MachineTemplateInterface
|
||||
}
|
||||
|
||||
func (c *Client) MachineTemplates(namespace string) MachineTemplateInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineTemplateResource, MachineTemplateGroupVersionKind, machineTemplateFactory{})
|
||||
return &machineTemplateClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ComponentStatusLifecycle interface {
|
||||
Initialize(obj *v1.ComponentStatus) error
|
||||
Remove(obj *v1.ComponentStatus) error
|
||||
Updated(obj *v1.ComponentStatus) error
|
||||
}
|
||||
|
||||
type componentStatusLifecycleAdapter struct {
|
||||
lifecycle ComponentStatusLifecycle
|
||||
}
|
||||
|
||||
func (w *componentStatusLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*v1.ComponentStatus))
|
||||
}
|
||||
|
||||
func (w *componentStatusLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*v1.ComponentStatus))
|
||||
}
|
||||
|
||||
func (w *componentStatusLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*v1.ComponentStatus))
|
||||
}
|
||||
|
||||
func NewComponentStatusLifecycleAdapter(name string, client ComponentStatusInterface, l ComponentStatusLifecycle) ComponentStatusHandlerFunc {
|
||||
adapter := &componentStatusLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *v1.ComponentStatus) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
40
apis/core/v1/zz_generated_node_lifecycle_adapter.go
Normal file
40
apis/core/v1/zz_generated_node_lifecycle_adapter.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type NodeLifecycle interface {
|
||||
Initialize(obj *v1.Node) error
|
||||
Remove(obj *v1.Node) error
|
||||
Updated(obj *v1.Node) error
|
||||
}
|
||||
|
||||
type nodeLifecycleAdapter struct {
|
||||
lifecycle NodeLifecycle
|
||||
}
|
||||
|
||||
func (w *nodeLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*v1.Node))
|
||||
}
|
||||
|
||||
func (w *nodeLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*v1.Node))
|
||||
}
|
||||
|
||||
func (w *nodeLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*v1.Node))
|
||||
}
|
||||
|
||||
func NewNodeLifecycleAdapter(name string, client NodeInterface, l NodeLifecycle) NodeHandlerFunc {
|
||||
adapter := &nodeLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *v1.Node) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
40
apis/core/v1/zz_generated_pod_lifecycle_adapter.go
Normal file
40
apis/core/v1/zz_generated_pod_lifecycle_adapter.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type PodLifecycle interface {
|
||||
Initialize(obj *v1.Pod) error
|
||||
Remove(obj *v1.Pod) error
|
||||
Updated(obj *v1.Pod) error
|
||||
}
|
||||
|
||||
type podLifecycleAdapter struct {
|
||||
lifecycle PodLifecycle
|
||||
}
|
||||
|
||||
func (w *podLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*v1.Pod))
|
||||
}
|
||||
|
||||
func (w *podLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*v1.Pod))
|
||||
}
|
||||
|
||||
func (w *podLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*v1.Pod))
|
||||
}
|
||||
|
||||
func NewPodLifecycleAdapter(name string, client PodInterface, l PodLifecycle) PodHandlerFunc {
|
||||
adapter := &podLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *v1.Pod) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ClusterGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "cluster.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "Cluster",
|
||||
}
|
||||
ClusterResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ClusterLifecycle interface {
|
||||
Initialize(obj *Cluster) error
|
||||
Remove(obj *Cluster) error
|
||||
Updated(obj *Cluster) error
|
||||
}
|
||||
|
||||
type clusterLifecycleAdapter struct {
|
||||
lifecycle ClusterLifecycle
|
||||
}
|
||||
|
||||
func (w *clusterLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*Cluster))
|
||||
}
|
||||
|
||||
func (w *clusterLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*Cluster))
|
||||
}
|
||||
|
||||
func (w *clusterLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*Cluster))
|
||||
}
|
||||
|
||||
func NewClusterLifecycleAdapter(name string, client ClusterInterface, l ClusterLifecycle) ClusterHandlerFunc {
|
||||
adapter := &clusterLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *Cluster) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ClusterRoleTemplateBindingGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "ClusterRoleTemplateBinding",
|
||||
}
|
||||
ClusterRoleTemplateBindingResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ClusterRoleTemplateBindingLifecycle interface {
|
||||
Initialize(obj *ClusterRoleTemplateBinding) error
|
||||
Remove(obj *ClusterRoleTemplateBinding) error
|
||||
Updated(obj *ClusterRoleTemplateBinding) error
|
||||
}
|
||||
|
||||
type clusterRoleTemplateBindingLifecycleAdapter struct {
|
||||
lifecycle ClusterRoleTemplateBindingLifecycle
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateBindingLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*ClusterRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*ClusterRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*ClusterRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func NewClusterRoleTemplateBindingLifecycleAdapter(name string, client ClusterRoleTemplateBindingInterface, l ClusterRoleTemplateBindingLifecycle) ClusterRoleTemplateBindingHandlerFunc {
|
||||
adapter := &clusterRoleTemplateBindingLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *ClusterRoleTemplateBinding) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ClusterRoleTemplateGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "ClusterRoleTemplate",
|
||||
}
|
||||
ClusterRoleTemplateResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ClusterRoleTemplateLifecycle interface {
|
||||
Initialize(obj *ClusterRoleTemplate) error
|
||||
Remove(obj *ClusterRoleTemplate) error
|
||||
Updated(obj *ClusterRoleTemplate) error
|
||||
}
|
||||
|
||||
type clusterRoleTemplateLifecycleAdapter struct {
|
||||
lifecycle ClusterRoleTemplateLifecycle
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*ClusterRoleTemplate))
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*ClusterRoleTemplate))
|
||||
}
|
||||
|
||||
func (w *clusterRoleTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*ClusterRoleTemplate))
|
||||
}
|
||||
|
||||
func NewClusterRoleTemplateLifecycleAdapter(name string, client ClusterRoleTemplateInterface, l ClusterRoleTemplateLifecycle) ClusterRoleTemplateHandlerFunc {
|
||||
adapter := &clusterRoleTemplateLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *ClusterRoleTemplate) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,7 +1,8 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
core_v1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
@@ -133,7 +134,7 @@ func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]core_v1.ComponentCondition, len(*in))
|
||||
*out = make([]v1.ComponentCondition, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
@@ -200,27 +201,37 @@ func (in *ClusterList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterNode) DeepCopyInto(out *ClusterNode) {
|
||||
func (in *ClusterRoleTemplate) DeepCopyInto(out *ClusterRoleTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.NodeSpec.DeepCopyInto(&out.NodeSpec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac_v1.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ClusterRoleTemplateNames != nil {
|
||||
in, out := &in.ClusterRoleTemplateNames, &out.ClusterRoleTemplateNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNode.
|
||||
func (in *ClusterNode) DeepCopy() *ClusterNode {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplate.
|
||||
func (in *ClusterRoleTemplate) DeepCopy() *ClusterRoleTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterNode)
|
||||
out := new(ClusterRoleTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterNode) DeepCopyObject() runtime.Object {
|
||||
func (in *ClusterRoleTemplate) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
@@ -229,13 +240,41 @@ func (in *ClusterNode) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterNodeList) DeepCopyInto(out *ClusterNodeList) {
|
||||
func (in *ClusterRoleTemplateBinding) DeepCopyInto(out *ClusterRoleTemplateBinding) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Subject = in.Subject
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBinding.
|
||||
func (in *ClusterRoleTemplateBinding) DeepCopy() *ClusterRoleTemplateBinding {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterRoleTemplateBinding)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplateBinding) 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 *ClusterRoleTemplateBindingList) DeepCopyInto(out *ClusterRoleTemplateBindingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterNode, len(*in))
|
||||
*out = make([]ClusterRoleTemplateBinding, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
@@ -243,18 +282,18 @@ func (in *ClusterNodeList) DeepCopyInto(out *ClusterNodeList) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeList.
|
||||
func (in *ClusterNodeList) DeepCopy() *ClusterNodeList {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateBindingList.
|
||||
func (in *ClusterRoleTemplateBindingList) DeepCopy() *ClusterRoleTemplateBindingList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterNodeList)
|
||||
out := new(ClusterRoleTemplateBindingList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterNodeList) DeepCopyObject() runtime.Object {
|
||||
func (in *ClusterRoleTemplateBindingList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
@@ -263,36 +302,39 @@ func (in *ClusterNodeList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterNodeStatus) DeepCopyInto(out *ClusterNodeStatus) {
|
||||
func (in *ClusterRoleTemplateList) DeepCopyInto(out *ClusterRoleTemplateList) {
|
||||
*out = *in
|
||||
in.NodeStatus.DeepCopyInto(&out.NodeStatus)
|
||||
if in.Requested != nil {
|
||||
in, out := &in.Requested, &out.Requested
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterRoleTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeStatus.
|
||||
func (in *ClusterNodeStatus) DeepCopy() *ClusterNodeStatus {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleTemplateList.
|
||||
func (in *ClusterRoleTemplateList) DeepCopy() *ClusterRoleTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterNodeStatus)
|
||||
out := new(ClusterRoleTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterRoleTemplateList) 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 *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
*out = *in
|
||||
@@ -353,14 +395,14 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
}
|
||||
if in.Capacity != nil {
|
||||
in, out := &in.Capacity, &out.Capacity
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Allocatable != nil {
|
||||
in, out := &in.Allocatable, &out.Allocatable
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
@@ -368,14 +410,14 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
in.AppliedSpec.DeepCopyInto(&out.AppliedSpec)
|
||||
if in.Requested != nil {
|
||||
in, out := &in.Requested, &out.Requested
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(core_v1.ResourceList, len(*in))
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
@@ -546,6 +588,53 @@ func (in *Machine) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MachineCommonParams) DeepCopyInto(out *MachineCommonParams) {
|
||||
*out = *in
|
||||
if in.EngineOpt != nil {
|
||||
in, out := &in.EngineOpt, &out.EngineOpt
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.EngineInsecureRegistry != nil {
|
||||
in, out := &in.EngineInsecureRegistry, &out.EngineInsecureRegistry
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.EngineRegistryMirror != nil {
|
||||
in, out := &in.EngineRegistryMirror, &out.EngineRegistryMirror
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.EngineLabel != nil {
|
||||
in, out := &in.EngineLabel, &out.EngineLabel
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.EngineEnv != nil {
|
||||
in, out := &in.EngineEnv, &out.EngineEnv
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineCommonParams.
|
||||
func (in *MachineCommonParams) DeepCopy() *MachineCommonParams {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MachineCommonParams)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MachineCondition) DeepCopyInto(out *MachineCondition) {
|
||||
*out = *in
|
||||
@@ -678,53 +767,6 @@ func (in *MachineDriverStatus) DeepCopy() *MachineDriverStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MachineGeneralParams) DeepCopyInto(out *MachineGeneralParams) {
|
||||
*out = *in
|
||||
if in.EngineOpt != nil {
|
||||
in, out := &in.EngineOpt, &out.EngineOpt
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.EngineInsecureRegistry != nil {
|
||||
in, out := &in.EngineInsecureRegistry, &out.EngineInsecureRegistry
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.EngineRegistryMirror != nil {
|
||||
in, out := &in.EngineRegistryMirror, &out.EngineRegistryMirror
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.EngineLabel != nil {
|
||||
in, out := &in.EngineLabel, &out.EngineLabel
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.EngineEnv != nil {
|
||||
in, out := &in.EngineEnv, &out.EngineEnv
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineGeneralParams.
|
||||
func (in *MachineGeneralParams) DeepCopy() *MachineGeneralParams {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MachineGeneralParams)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MachineList) DeepCopyInto(out *MachineList) {
|
||||
*out = *in
|
||||
@@ -762,7 +804,8 @@ func (in *MachineList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MachineSpec) DeepCopyInto(out *MachineSpec) {
|
||||
*out = *in
|
||||
in.MachineGeneralParams.DeepCopyInto(&out.MachineGeneralParams)
|
||||
in.NodeSpec.DeepCopyInto(&out.NodeSpec)
|
||||
in.MachineCommonParams.DeepCopyInto(&out.MachineCommonParams)
|
||||
out.AmazonEC2Config = in.AmazonEC2Config
|
||||
out.AzureConfig = in.AzureConfig
|
||||
out.DigitalOceanConfig = in.DigitalOceanConfig
|
||||
@@ -787,6 +830,21 @@ func (in *MachineStatus) DeepCopyInto(out *MachineStatus) {
|
||||
*out = make([]MachineCondition, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.NodeStatus.DeepCopyInto(&out.NodeStatus)
|
||||
if in.Requested != nil {
|
||||
in, out := &in.Requested, &out.Requested
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -953,6 +1011,281 @@ func (in *NetworkConfig) DeepCopy() *NetworkConfig {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodSecurityPolicyTemplate) DeepCopyInto(out *PodSecurityPolicyTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplate.
|
||||
func (in *PodSecurityPolicyTemplate) DeepCopy() *PodSecurityPolicyTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSecurityPolicyTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSecurityPolicyTemplate) 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 *PodSecurityPolicyTemplateList) DeepCopyInto(out *PodSecurityPolicyTemplateList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PodSecurityPolicyTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplateList.
|
||||
func (in *PodSecurityPolicyTemplateList) DeepCopy() *PodSecurityPolicyTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSecurityPolicyTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSecurityPolicyTemplateList) 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 *Project) DeepCopyInto(out *Project) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
|
||||
func (in *Project) DeepCopy() *Project {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Project)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Project) 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 *ProjectList) DeepCopyInto(out *ProjectList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Project, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
|
||||
func (in *ProjectList) DeepCopy() *ProjectList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectList) 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 *ProjectRoleTemplate) DeepCopyInto(out *ProjectRoleTemplate) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]rbac_v1.PolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ProjectRoleTemplateNames != nil {
|
||||
in, out := &in.ProjectRoleTemplateNames, &out.ProjectRoleTemplateNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplate.
|
||||
func (in *ProjectRoleTemplate) DeepCopy() *ProjectRoleTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplate) 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 *ProjectRoleTemplateBinding) DeepCopyInto(out *ProjectRoleTemplateBinding) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Subject = in.Subject
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBinding.
|
||||
func (in *ProjectRoleTemplateBinding) DeepCopy() *ProjectRoleTemplateBinding {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateBinding)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateBinding) 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 *ProjectRoleTemplateBindingList) DeepCopyInto(out *ProjectRoleTemplateBindingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ProjectRoleTemplateBinding, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateBindingList.
|
||||
func (in *ProjectRoleTemplateBindingList) DeepCopy() *ProjectRoleTemplateBindingList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateBindingList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateBindingList) 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 *ProjectRoleTemplateList) DeepCopyInto(out *ProjectRoleTemplateList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ProjectRoleTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRoleTemplateList.
|
||||
func (in *ProjectRoleTemplateList) DeepCopy() *ProjectRoleTemplateList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectRoleTemplateList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ProjectRoleTemplateList) 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 *ProjectSpec) DeepCopyInto(out *ProjectSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
|
||||
func (in *ProjectSpec) DeepCopy() *ProjectSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProjectSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RKEConfigNode) DeepCopyInto(out *RKEConfigNode) {
|
||||
*out = *in
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -14,12 +14,16 @@ type Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
controller.Starter
|
||||
|
||||
MachinesGetter
|
||||
MachineDriversGetter
|
||||
MachineTemplatesGetter
|
||||
ProjectsGetter
|
||||
ProjectRoleTemplatesGetter
|
||||
PodSecurityPolicyTemplatesGetter
|
||||
ClusterRoleTemplatesGetter
|
||||
ClusterRoleTemplateBindingsGetter
|
||||
ProjectRoleTemplateBindingsGetter
|
||||
ClustersGetter
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
@@ -27,12 +31,16 @@ type Client struct {
|
||||
restClient rest.Interface
|
||||
starters []controller.Starter
|
||||
|
||||
machineControllers map[string]MachineController
|
||||
machineDriverControllers map[string]MachineDriverController
|
||||
machineTemplateControllers map[string]MachineTemplateController
|
||||
projectControllers map[string]ProjectController
|
||||
projectRoleTemplateControllers map[string]ProjectRoleTemplateController
|
||||
podSecurityPolicyTemplateControllers map[string]PodSecurityPolicyTemplateController
|
||||
clusterRoleTemplateControllers map[string]ClusterRoleTemplateController
|
||||
clusterRoleTemplateBindingControllers map[string]ClusterRoleTemplateBindingController
|
||||
projectRoleTemplateBindingControllers map[string]ProjectRoleTemplateBindingController
|
||||
clusterControllers map[string]ClusterController
|
||||
}
|
||||
|
||||
func NewForConfig(config rest.Config) (Interface, error) {
|
||||
@@ -49,12 +57,16 @@ func NewForConfig(config rest.Config) (Interface, error) {
|
||||
return &Client{
|
||||
restClient: restClient,
|
||||
|
||||
machineControllers: map[string]MachineController{},
|
||||
machineDriverControllers: map[string]MachineDriverController{},
|
||||
machineTemplateControllers: map[string]MachineTemplateController{},
|
||||
projectControllers: map[string]ProjectController{},
|
||||
projectRoleTemplateControllers: map[string]ProjectRoleTemplateController{},
|
||||
podSecurityPolicyTemplateControllers: map[string]PodSecurityPolicyTemplateController{},
|
||||
clusterRoleTemplateControllers: map[string]ClusterRoleTemplateController{},
|
||||
clusterRoleTemplateBindingControllers: map[string]ClusterRoleTemplateBindingController{},
|
||||
projectRoleTemplateBindingControllers: map[string]ProjectRoleTemplateBindingController{},
|
||||
clusterControllers: map[string]ClusterController{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -70,6 +82,45 @@ func (c *Client) Start(ctx context.Context, threadiness int) error {
|
||||
return controller.Start(ctx, threadiness, c.starters...)
|
||||
}
|
||||
|
||||
type MachinesGetter interface {
|
||||
Machines(namespace string) MachineInterface
|
||||
}
|
||||
|
||||
func (c *Client) Machines(namespace string) MachineInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineResource, MachineGroupVersionKind, machineFactory{})
|
||||
return &machineClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type MachineDriversGetter interface {
|
||||
MachineDrivers(namespace string) MachineDriverInterface
|
||||
}
|
||||
|
||||
func (c *Client) MachineDrivers(namespace string) MachineDriverInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineDriverResource, MachineDriverGroupVersionKind, machineDriverFactory{})
|
||||
return &machineDriverClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type MachineTemplatesGetter interface {
|
||||
MachineTemplates(namespace string) MachineTemplateInterface
|
||||
}
|
||||
|
||||
func (c *Client) MachineTemplates(namespace string) MachineTemplateInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &MachineTemplateResource, MachineTemplateGroupVersionKind, machineTemplateFactory{})
|
||||
return &machineTemplateClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type ProjectsGetter interface {
|
||||
Projects(namespace string) ProjectInterface
|
||||
}
|
||||
@@ -147,3 +198,16 @@ func (c *Client) ProjectRoleTemplateBindings(namespace string) ProjectRoleTempla
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type ClustersGetter interface {
|
||||
Clusters(namespace string) ClusterInterface
|
||||
}
|
||||
|
||||
func (c *Client) Clusters(namespace string) ClusterInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{})
|
||||
return &clusterClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
MachineGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "cluster.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "Machine",
|
||||
}
|
||||
MachineResource = metav1.APIResource{
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
MachineDriverGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "cluster.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "MachineDriver",
|
||||
}
|
||||
MachineDriverResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type MachineDriverLifecycle interface {
|
||||
Initialize(obj *MachineDriver) error
|
||||
Remove(obj *MachineDriver) error
|
||||
Updated(obj *MachineDriver) error
|
||||
}
|
||||
|
||||
type machineDriverLifecycleAdapter struct {
|
||||
lifecycle MachineDriverLifecycle
|
||||
}
|
||||
|
||||
func (w *machineDriverLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*MachineDriver))
|
||||
}
|
||||
|
||||
func (w *machineDriverLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*MachineDriver))
|
||||
}
|
||||
|
||||
func (w *machineDriverLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*MachineDriver))
|
||||
}
|
||||
|
||||
func NewMachineDriverLifecycleAdapter(name string, client MachineDriverInterface, l MachineDriverLifecycle) MachineDriverHandlerFunc {
|
||||
adapter := &machineDriverLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *MachineDriver) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type MachineLifecycle interface {
|
||||
Initialize(obj *Machine) error
|
||||
Remove(obj *Machine) error
|
||||
Updated(obj *Machine) error
|
||||
}
|
||||
|
||||
type machineLifecycleAdapter struct {
|
||||
lifecycle MachineLifecycle
|
||||
}
|
||||
|
||||
func (w *machineLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*Machine))
|
||||
}
|
||||
|
||||
func (w *machineLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*Machine))
|
||||
}
|
||||
|
||||
func (w *machineLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*Machine))
|
||||
}
|
||||
|
||||
func NewMachineLifecycleAdapter(name string, client MachineInterface, l MachineLifecycle) MachineHandlerFunc {
|
||||
adapter := &machineLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *Machine) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
MachineTemplateGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "cluster.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "MachineTemplate",
|
||||
}
|
||||
MachineTemplateResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type MachineTemplateLifecycle interface {
|
||||
Initialize(obj *MachineTemplate) error
|
||||
Remove(obj *MachineTemplate) error
|
||||
Updated(obj *MachineTemplate) error
|
||||
}
|
||||
|
||||
type machineTemplateLifecycleAdapter struct {
|
||||
lifecycle MachineTemplateLifecycle
|
||||
}
|
||||
|
||||
func (w *machineTemplateLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*MachineTemplate))
|
||||
}
|
||||
|
||||
func (w *machineTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*MachineTemplate))
|
||||
}
|
||||
|
||||
func (w *machineTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*MachineTemplate))
|
||||
}
|
||||
|
||||
func NewMachineTemplateLifecycleAdapter(name string, client MachineTemplateInterface, l MachineTemplateLifecycle) MachineTemplateHandlerFunc {
|
||||
adapter := &machineTemplateLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *MachineTemplate) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
PodSecurityPolicyTemplateGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "PodSecurityPolicyTemplate",
|
||||
}
|
||||
PodSecurityPolicyTemplateResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type PodSecurityPolicyTemplateLifecycle interface {
|
||||
Initialize(obj *PodSecurityPolicyTemplate) error
|
||||
Remove(obj *PodSecurityPolicyTemplate) error
|
||||
Updated(obj *PodSecurityPolicyTemplate) error
|
||||
}
|
||||
|
||||
type podSecurityPolicyTemplateLifecycleAdapter struct {
|
||||
lifecycle PodSecurityPolicyTemplateLifecycle
|
||||
}
|
||||
|
||||
func (w *podSecurityPolicyTemplateLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*PodSecurityPolicyTemplate))
|
||||
}
|
||||
|
||||
func (w *podSecurityPolicyTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*PodSecurityPolicyTemplate))
|
||||
}
|
||||
|
||||
func (w *podSecurityPolicyTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*PodSecurityPolicyTemplate))
|
||||
}
|
||||
|
||||
func NewPodSecurityPolicyTemplateLifecycleAdapter(name string, client PodSecurityPolicyTemplateInterface, l PodSecurityPolicyTemplateLifecycle) PodSecurityPolicyTemplateHandlerFunc {
|
||||
adapter := &podSecurityPolicyTemplateLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *PodSecurityPolicyTemplate) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ProjectGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "Project",
|
||||
}
|
||||
ProjectResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ProjectLifecycle interface {
|
||||
Initialize(obj *Project) error
|
||||
Remove(obj *Project) error
|
||||
Updated(obj *Project) error
|
||||
}
|
||||
|
||||
type projectLifecycleAdapter struct {
|
||||
lifecycle ProjectLifecycle
|
||||
}
|
||||
|
||||
func (w *projectLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*Project))
|
||||
}
|
||||
|
||||
func (w *projectLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*Project))
|
||||
}
|
||||
|
||||
func (w *projectLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*Project))
|
||||
}
|
||||
|
||||
func NewProjectLifecycleAdapter(name string, client ProjectInterface, l ProjectLifecycle) ProjectHandlerFunc {
|
||||
adapter := &projectLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *Project) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ProjectRoleTemplateBindingGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "ProjectRoleTemplateBinding",
|
||||
}
|
||||
ProjectRoleTemplateBindingResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ProjectRoleTemplateBindingLifecycle interface {
|
||||
Initialize(obj *ProjectRoleTemplateBinding) error
|
||||
Remove(obj *ProjectRoleTemplateBinding) error
|
||||
Updated(obj *ProjectRoleTemplateBinding) error
|
||||
}
|
||||
|
||||
type projectRoleTemplateBindingLifecycleAdapter struct {
|
||||
lifecycle ProjectRoleTemplateBindingLifecycle
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateBindingLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*ProjectRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*ProjectRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*ProjectRoleTemplateBinding))
|
||||
}
|
||||
|
||||
func NewProjectRoleTemplateBindingLifecycleAdapter(name string, client ProjectRoleTemplateBindingInterface, l ProjectRoleTemplateBindingLifecycle) ProjectRoleTemplateBindingHandlerFunc {
|
||||
adapter := &projectRoleTemplateBindingLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *ProjectRoleTemplateBinding) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
ProjectRoleTemplateGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "authorization.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "management.cattle.io",
|
||||
Kind: "ProjectRoleTemplate",
|
||||
}
|
||||
ProjectRoleTemplateResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type ProjectRoleTemplateLifecycle interface {
|
||||
Initialize(obj *ProjectRoleTemplate) error
|
||||
Remove(obj *ProjectRoleTemplate) error
|
||||
Updated(obj *ProjectRoleTemplate) error
|
||||
}
|
||||
|
||||
type projectRoleTemplateLifecycleAdapter struct {
|
||||
lifecycle ProjectRoleTemplateLifecycle
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*ProjectRoleTemplate))
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*ProjectRoleTemplate))
|
||||
}
|
||||
|
||||
func (w *projectRoleTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*ProjectRoleTemplate))
|
||||
}
|
||||
|
||||
func NewProjectRoleTemplateLifecycleAdapter(name string, client ProjectRoleTemplateInterface, l ProjectRoleTemplateLifecycle) ProjectRoleTemplateHandlerFunc {
|
||||
adapter := &projectRoleTemplateLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *ProjectRoleTemplate) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
@@ -1,4 +1,4 @@
|
||||
package v1
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
var (
|
||||
WorkloadGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Group: "workload.cattle.io",
|
||||
Version: "v3",
|
||||
Group: "project.cattle.io",
|
||||
Kind: "Workload",
|
||||
}
|
||||
WorkloadResource = metav1.APIResource{
|
@@ -0,0 +1,39 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type WorkloadLifecycle interface {
|
||||
Initialize(obj *Workload) error
|
||||
Remove(obj *Workload) error
|
||||
Updated(obj *Workload) error
|
||||
}
|
||||
|
||||
type workloadLifecycleAdapter struct {
|
||||
lifecycle WorkloadLifecycle
|
||||
}
|
||||
|
||||
func (w *workloadLifecycleAdapter) Initialize(obj runtime.Object) error {
|
||||
return w.lifecycle.Initialize(obj.(*Workload))
|
||||
}
|
||||
|
||||
func (w *workloadLifecycleAdapter) Finalize(obj runtime.Object) error {
|
||||
return w.lifecycle.Remove(obj.(*Workload))
|
||||
}
|
||||
|
||||
func (w *workloadLifecycleAdapter) Updated(obj runtime.Object) error {
|
||||
return w.lifecycle.Updated(obj.(*Workload))
|
||||
}
|
||||
|
||||
func NewWorkloadLifecycleAdapter(name string, client WorkloadInterface, l WorkloadLifecycle) WorkloadHandlerFunc {
|
||||
adapter := &workloadLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
|
||||
return func(key string, obj *Workload) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AttachedVolumeType = "attachedVolume"
|
||||
AttachedVolumeFieldDevicePath = "devicePath"
|
||||
AttachedVolumeFieldName = "name"
|
||||
)
|
||||
|
||||
type AttachedVolume struct {
|
||||
DevicePath string `json:"devicePath,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/clientbase"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
Cluster ClusterOperations
|
||||
ClusterNode ClusterNodeOperations
|
||||
Machine MachineOperations
|
||||
MachineDriver MachineDriverOperations
|
||||
MachineTemplate MachineTemplateOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
baseClient, err := clientbase.NewAPIClient(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := &Client{
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.Cluster = newClusterClient(client)
|
||||
client.ClusterNode = newClusterNodeClient(client)
|
||||
client.Machine = newMachineClient(client)
|
||||
client.MachineDriver = newMachineDriverClient(client)
|
||||
client.MachineTemplate = newMachineTemplateClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
@@ -1,115 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
ClusterNodeType = "clusterNode"
|
||||
ClusterNodeFieldAnnotations = "annotations"
|
||||
ClusterNodeFieldClusterName = "clusterName"
|
||||
ClusterNodeFieldConfigSource = "configSource"
|
||||
ClusterNodeFieldCreated = "created"
|
||||
ClusterNodeFieldExternalID = "externalID"
|
||||
ClusterNodeFieldLabels = "labels"
|
||||
ClusterNodeFieldName = "name"
|
||||
ClusterNodeFieldNodeName = "nodeName"
|
||||
ClusterNodeFieldOwnerReferences = "ownerReferences"
|
||||
ClusterNodeFieldPodCIDR = "podCIDR"
|
||||
ClusterNodeFieldProviderID = "providerID"
|
||||
ClusterNodeFieldRemoved = "removed"
|
||||
ClusterNodeFieldResourcePath = "resourcePath"
|
||||
ClusterNodeFieldState = "state"
|
||||
ClusterNodeFieldStatus = "status"
|
||||
ClusterNodeFieldTaints = "taints"
|
||||
ClusterNodeFieldTransitioning = "transitioning"
|
||||
ClusterNodeFieldTransitioningMessage = "transitioningMessage"
|
||||
ClusterNodeFieldUnschedulable = "unschedulable"
|
||||
ClusterNodeFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type ClusterNode struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
ClusterName string `json:"clusterName,omitempty"`
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NodeName string `json:"nodeName,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
PodCIDR string `json:"podCIDR,omitempty"`
|
||||
ProviderID string `json:"providerID,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *ClusterNodeStatus `json:"status,omitempty"`
|
||||
Taints []Taint `json:"taints,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Unschedulable *bool `json:"unschedulable,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type ClusterNodeCollection struct {
|
||||
types.Collection
|
||||
Data []ClusterNode `json:"data,omitempty"`
|
||||
client *ClusterNodeClient
|
||||
}
|
||||
|
||||
type ClusterNodeClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type ClusterNodeOperations interface {
|
||||
List(opts *types.ListOpts) (*ClusterNodeCollection, error)
|
||||
Create(opts *ClusterNode) (*ClusterNode, error)
|
||||
Update(existing *ClusterNode, updates interface{}) (*ClusterNode, error)
|
||||
ByID(id string) (*ClusterNode, error)
|
||||
Delete(container *ClusterNode) error
|
||||
}
|
||||
|
||||
func newClusterNodeClient(apiClient *Client) *ClusterNodeClient {
|
||||
return &ClusterNodeClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ClusterNodeClient) Create(container *ClusterNode) (*ClusterNode, error) {
|
||||
resp := &ClusterNode{}
|
||||
err := c.apiClient.Ops.DoCreate(ClusterNodeType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ClusterNodeClient) Update(existing *ClusterNode, updates interface{}) (*ClusterNode, error) {
|
||||
resp := &ClusterNode{}
|
||||
err := c.apiClient.Ops.DoUpdate(ClusterNodeType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ClusterNodeClient) List(opts *types.ListOpts) (*ClusterNodeCollection, error) {
|
||||
resp := &ClusterNodeCollection{}
|
||||
err := c.apiClient.Ops.DoList(ClusterNodeType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *ClusterNodeCollection) Next() (*ClusterNodeCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &ClusterNodeCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *ClusterNodeClient) ByID(id string) (*ClusterNode, error) {
|
||||
resp := &ClusterNode{}
|
||||
err := c.apiClient.Ops.DoByID(ClusterNodeType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ClusterNodeClient) Delete(container *ClusterNode) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(ClusterNodeType, &container.Resource)
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ClusterNodeStatusType = "clusterNodeStatus"
|
||||
ClusterNodeStatusFieldAddresses = "addresses"
|
||||
ClusterNodeStatusFieldAllocatable = "allocatable"
|
||||
ClusterNodeStatusFieldCapacity = "capacity"
|
||||
ClusterNodeStatusFieldConditions = "conditions"
|
||||
ClusterNodeStatusFieldDaemonEndpoints = "daemonEndpoints"
|
||||
ClusterNodeStatusFieldImages = "images"
|
||||
ClusterNodeStatusFieldLimits = "limits"
|
||||
ClusterNodeStatusFieldNodeInfo = "nodeInfo"
|
||||
ClusterNodeStatusFieldPhase = "phase"
|
||||
ClusterNodeStatusFieldRequested = "requested"
|
||||
ClusterNodeStatusFieldVolumesAttached = "volumesAttached"
|
||||
ClusterNodeStatusFieldVolumesInUse = "volumesInUse"
|
||||
)
|
||||
|
||||
type ClusterNodeStatus struct {
|
||||
Addresses []NodeAddress `json:"addresses,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
Conditions []NodeCondition `json:"conditions,omitempty"`
|
||||
DaemonEndpoints *NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
|
||||
Images []ContainerImage `json:"images,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
NodeInfo *NodeSystemInfo `json:"nodeInfo,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty"`
|
||||
VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"`
|
||||
VolumesInUse []string `json:"volumesInUse,omitempty"`
|
||||
}
|
@@ -1,139 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
MachineType = "machine"
|
||||
MachineFieldAmazonEC2Config = "amazonEc2Config"
|
||||
MachineFieldAnnotations = "annotations"
|
||||
MachineFieldAuthCertificateAuthority = "authCertificateAuthority"
|
||||
MachineFieldAuthKey = "authKey"
|
||||
MachineFieldAzureConfig = "azureConfig"
|
||||
MachineFieldClusterId = "clusterId"
|
||||
MachineFieldCreated = "created"
|
||||
MachineFieldDescription = "description"
|
||||
MachineFieldDigitalOceanConfig = "digitalOceanConfig"
|
||||
MachineFieldDockerVersion = "dockerVersion"
|
||||
MachineFieldDriver = "driver"
|
||||
MachineFieldEngineEnv = "engineEnv"
|
||||
MachineFieldEngineInsecureRegistry = "engineInsecureRegistry"
|
||||
MachineFieldEngineInstallURL = "engineInstallURL"
|
||||
MachineFieldEngineLabel = "engineLabel"
|
||||
MachineFieldEngineOpt = "engineOpt"
|
||||
MachineFieldEngineRegistryMirror = "engineRegistryMirror"
|
||||
MachineFieldEngineStorageDriver = "engineStorageDriver"
|
||||
MachineFieldExternalID = "externalId"
|
||||
MachineFieldHostname = "hostname"
|
||||
MachineFieldId = "id"
|
||||
MachineFieldLabels = "labels"
|
||||
MachineFieldMachineTemplateId = "machineTemplateId"
|
||||
MachineFieldName = "name"
|
||||
MachineFieldOwnerReferences = "ownerReferences"
|
||||
MachineFieldRemoved = "removed"
|
||||
MachineFieldResourcePath = "resourcePath"
|
||||
MachineFieldState = "state"
|
||||
MachineFieldStatus = "status"
|
||||
MachineFieldTransitioning = "transitioning"
|
||||
MachineFieldTransitioningMessage = "transitioningMessage"
|
||||
MachineFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type Machine struct {
|
||||
types.Resource
|
||||
AmazonEC2Config *AmazonEC2Config `json:"amazonEc2Config,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty"`
|
||||
AuthKey string `json:"authKey,omitempty"`
|
||||
AzureConfig *AzureConfig `json:"azureConfig,omitempty"`
|
||||
ClusterId string `json:"clusterId,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DigitalOceanConfig *DigitalOceanConfig `json:"digitalOceanConfig,omitempty"`
|
||||
DockerVersion string `json:"dockerVersion,omitempty"`
|
||||
Driver string `json:"driver,omitempty"`
|
||||
EngineEnv map[string]string `json:"engineEnv,omitempty"`
|
||||
EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty"`
|
||||
EngineInstallURL string `json:"engineInstallURL,omitempty"`
|
||||
EngineLabel map[string]string `json:"engineLabel,omitempty"`
|
||||
EngineOpt map[string]string `json:"engineOpt,omitempty"`
|
||||
EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty"`
|
||||
EngineStorageDriver string `json:"engineStorageDriver,omitempty"`
|
||||
ExternalID string `json:"externalId,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
MachineTemplateId string `json:"machineTemplateId,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *MachineStatus `json:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type MachineCollection struct {
|
||||
types.Collection
|
||||
Data []Machine `json:"data,omitempty"`
|
||||
client *MachineClient
|
||||
}
|
||||
|
||||
type MachineClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type MachineOperations interface {
|
||||
List(opts *types.ListOpts) (*MachineCollection, error)
|
||||
Create(opts *Machine) (*Machine, error)
|
||||
Update(existing *Machine, updates interface{}) (*Machine, error)
|
||||
ByID(id string) (*Machine, error)
|
||||
Delete(container *Machine) error
|
||||
}
|
||||
|
||||
func newMachineClient(apiClient *Client) *MachineClient {
|
||||
return &MachineClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *MachineClient) Create(container *Machine) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoCreate(MachineType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoUpdate(MachineType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) List(opts *types.ListOpts) (*MachineCollection, error) {
|
||||
resp := &MachineCollection{}
|
||||
err := c.apiClient.Ops.DoList(MachineType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *MachineCollection) Next() (*MachineCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &MachineCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *MachineClient) ByID(id string) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoByID(MachineType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) Delete(container *Machine) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(MachineType, &container.Resource)
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
MachineStatusType = "machineStatus"
|
||||
MachineStatusFieldConditions = "conditions"
|
||||
)
|
||||
|
||||
type MachineStatus struct {
|
||||
Conditions []MachineCondition `json:"conditions,omitempty"`
|
||||
}
|
26
client/cluster/v3/zz_generated_client.go
Normal file
26
client/cluster/v3/zz_generated_client.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/clientbase"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
Node NodeOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
baseClient, err := clientbase.NewAPIClient(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := &Client{
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.Node = newNodeClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
@@ -11,7 +11,8 @@ const (
|
||||
NodeFieldCapacity = "capacity"
|
||||
NodeFieldConfigSource = "configSource"
|
||||
NodeFieldCreated = "created"
|
||||
NodeFieldExternalID = "externalID"
|
||||
NodeFieldExternalId = "externalId"
|
||||
NodeFieldFinalizers = "finalizers"
|
||||
NodeFieldHostname = "hostname"
|
||||
NodeFieldIPAddress = "ipAddress"
|
||||
NodeFieldInfo = "info"
|
||||
@@ -40,7 +41,8 @@ type Node struct {
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
ExternalId string `json:"externalId,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty"`
|
||||
IPAddress string `json:"ipAddress,omitempty"`
|
||||
Info *NodeInfo `json:"info,omitempty"`
|
@@ -3,7 +3,7 @@ package client
|
||||
const (
|
||||
NodeSpecType = "nodeSpec"
|
||||
NodeSpecFieldConfigSource = "configSource"
|
||||
NodeSpecFieldExternalID = "externalID"
|
||||
NodeSpecFieldExternalId = "externalId"
|
||||
NodeSpecFieldPodCIDR = "podCIDR"
|
||||
NodeSpecFieldProviderID = "providerID"
|
||||
NodeSpecFieldTaints = "taints"
|
||||
@@ -12,7 +12,7 @@ const (
|
||||
|
||||
type NodeSpec struct {
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
ExternalId string `json:"externalId,omitempty"`
|
||||
PodCIDR string `json:"podCIDR,omitempty"`
|
||||
ProviderID string `json:"providerID,omitempty"`
|
||||
Taints []Taint `json:"taints,omitempty"`
|
@@ -4,6 +4,7 @@ const (
|
||||
ObjectMetaType = "objectMeta"
|
||||
ObjectMetaFieldAnnotations = "annotations"
|
||||
ObjectMetaFieldCreated = "created"
|
||||
ObjectMetaFieldFinalizers = "finalizers"
|
||||
ObjectMetaFieldLabels = "labels"
|
||||
ObjectMetaFieldName = "name"
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
@@ -16,6 +17,7 @@ const (
|
||||
type ObjectMeta struct {
|
||||
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"`
|
10
client/management/v3/zz_generated_attached_volume.go
Normal file
10
client/management/v3/zz_generated_attached_volume.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AttachedVolumeType = "attachedVolume"
|
||||
AttachedVolumeFieldName = "name"
|
||||
)
|
||||
|
||||
type AttachedVolume struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
@@ -7,12 +7,17 @@ import (
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
Node NodeOperations
|
||||
Machine MachineOperations
|
||||
MachineDriver MachineDriverOperations
|
||||
MachineTemplate MachineTemplateOperations
|
||||
Project ProjectOperations
|
||||
ProjectRoleTemplate ProjectRoleTemplateOperations
|
||||
PodSecurityPolicyTemplate PodSecurityPolicyTemplateOperations
|
||||
ClusterRoleTemplate ClusterRoleTemplateOperations
|
||||
ClusterRoleTemplateBinding ClusterRoleTemplateBindingOperations
|
||||
ProjectRoleTemplateBinding ProjectRoleTemplateBindingOperations
|
||||
Cluster ClusterOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
@@ -25,12 +30,17 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.Node = newNodeClient(client)
|
||||
client.Machine = newMachineClient(client)
|
||||
client.MachineDriver = newMachineDriverClient(client)
|
||||
client.MachineTemplate = newMachineTemplateClient(client)
|
||||
client.Project = newProjectClient(client)
|
||||
client.ProjectRoleTemplate = newProjectRoleTemplateClient(client)
|
||||
client.PodSecurityPolicyTemplate = newPodSecurityPolicyTemplateClient(client)
|
||||
client.ClusterRoleTemplate = newClusterRoleTemplateClient(client)
|
||||
client.ClusterRoleTemplateBinding = newClusterRoleTemplateBindingClient(client)
|
||||
client.ProjectRoleTemplateBinding = newProjectRoleTemplateBindingClient(client)
|
||||
client.Cluster = newClusterClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
@@ -6,20 +6,29 @@ import (
|
||||
|
||||
const (
|
||||
ClusterType = "cluster"
|
||||
ClusterFieldAPIEndpoint = "apiEndpoint"
|
||||
ClusterFieldAllocatable = "allocatable"
|
||||
ClusterFieldAnnotations = "annotations"
|
||||
ClusterFieldAzureKubernetesServiceConfig = "azureKubernetesServiceConfig"
|
||||
ClusterFieldCACert = "caCert"
|
||||
ClusterFieldCapacity = "capacity"
|
||||
ClusterFieldComponentStatuses = "componentStatuses"
|
||||
ClusterFieldConditions = "conditions"
|
||||
ClusterFieldCreated = "created"
|
||||
ClusterFieldDescription = "description"
|
||||
ClusterFieldFinalizers = "finalizers"
|
||||
ClusterFieldGoogleKubernetesEngineConfig = "googleKubernetesEngineConfig"
|
||||
ClusterFieldId = "id"
|
||||
ClusterFieldLabels = "labels"
|
||||
ClusterFieldLimits = "limits"
|
||||
ClusterFieldName = "name"
|
||||
ClusterFieldOwnerReferences = "ownerReferences"
|
||||
ClusterFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig"
|
||||
ClusterFieldRemoved = "removed"
|
||||
ClusterFieldRequested = "requested"
|
||||
ClusterFieldResourcePath = "resourcePath"
|
||||
ClusterFieldServiceAccountToken = "serviceAccountToken"
|
||||
ClusterFieldState = "state"
|
||||
ClusterFieldStatus = "status"
|
||||
ClusterFieldTransitioning = "transitioning"
|
||||
ClusterFieldTransitioningMessage = "transitioningMessage"
|
||||
ClusterFieldUuid = "uuid"
|
||||
@@ -27,20 +36,29 @@ const (
|
||||
|
||||
type Cluster struct {
|
||||
types.Resource
|
||||
APIEndpoint string `json:"apiEndpoint,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
AzureKubernetesServiceConfig *AzureKubernetesServiceConfig `json:"azureKubernetesServiceConfig,omitempty"`
|
||||
CACert string `json:"caCert,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
|
||||
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
GoogleKubernetesEngineConfig *GoogleKubernetesEngineConfig `json:"googleKubernetesEngineConfig,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *ClusterStatus `json:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
@@ -10,15 +10,13 @@ const (
|
||||
ClusterRoleTemplateFieldBuiltin = "builtin"
|
||||
ClusterRoleTemplateFieldClusterRoleTemplateIds = "clusterRoleTemplateIds"
|
||||
ClusterRoleTemplateFieldCreated = "created"
|
||||
ClusterRoleTemplateFieldFinalizers = "finalizers"
|
||||
ClusterRoleTemplateFieldLabels = "labels"
|
||||
ClusterRoleTemplateFieldName = "name"
|
||||
ClusterRoleTemplateFieldOwnerReferences = "ownerReferences"
|
||||
ClusterRoleTemplateFieldRemoved = "removed"
|
||||
ClusterRoleTemplateFieldResourcePath = "resourcePath"
|
||||
ClusterRoleTemplateFieldRules = "rules"
|
||||
ClusterRoleTemplateFieldState = "state"
|
||||
ClusterRoleTemplateFieldTransitioning = "transitioning"
|
||||
ClusterRoleTemplateFieldTransitioningMessage = "transitioningMessage"
|
||||
ClusterRoleTemplateFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@@ -28,15 +26,13 @@ type ClusterRoleTemplate struct {
|
||||
Builtin *bool `json:"builtin,omitempty"`
|
||||
ClusterRoleTemplateIds []string `json:"clusterRoleTemplateIds,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
Rules []PolicyRule `json:"rules,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type ClusterRoleTemplateCollection struct {
|
@@ -10,15 +10,13 @@ const (
|
||||
ClusterRoleTemplateBindingFieldClusterId = "clusterId"
|
||||
ClusterRoleTemplateBindingFieldClusterRoleTemplateId = "clusterRoleTemplateId"
|
||||
ClusterRoleTemplateBindingFieldCreated = "created"
|
||||
ClusterRoleTemplateBindingFieldFinalizers = "finalizers"
|
||||
ClusterRoleTemplateBindingFieldLabels = "labels"
|
||||
ClusterRoleTemplateBindingFieldName = "name"
|
||||
ClusterRoleTemplateBindingFieldOwnerReferences = "ownerReferences"
|
||||
ClusterRoleTemplateBindingFieldRemoved = "removed"
|
||||
ClusterRoleTemplateBindingFieldResourcePath = "resourcePath"
|
||||
ClusterRoleTemplateBindingFieldState = "state"
|
||||
ClusterRoleTemplateBindingFieldSubject = "subject"
|
||||
ClusterRoleTemplateBindingFieldTransitioning = "transitioning"
|
||||
ClusterRoleTemplateBindingFieldTransitioningMessage = "transitioningMessage"
|
||||
ClusterRoleTemplateBindingFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@@ -28,15 +26,13 @@ type ClusterRoleTemplateBinding struct {
|
||||
ClusterId string `json:"clusterId,omitempty"`
|
||||
ClusterRoleTemplateId string `json:"clusterRoleTemplateId,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Subject *Subject `json:"subject,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type ClusterRoleTemplateBindingCollection struct {
|
@@ -4,7 +4,6 @@ const (
|
||||
ClusterStatusType = "clusterStatus"
|
||||
ClusterStatusFieldAPIEndpoint = "apiEndpoint"
|
||||
ClusterStatusFieldAllocatable = "allocatable"
|
||||
ClusterStatusFieldAppliedSpec = "appliedSpec"
|
||||
ClusterStatusFieldCACert = "caCert"
|
||||
ClusterStatusFieldCapacity = "capacity"
|
||||
ClusterStatusFieldComponentStatuses = "componentStatuses"
|
||||
@@ -17,7 +16,6 @@ const (
|
||||
type ClusterStatus struct {
|
||||
APIEndpoint string `json:"apiEndpoint,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty"`
|
||||
CACert string `json:"caCert,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
|
10
client/management/v3/zz_generated_cpu_info.go
Normal file
10
client/management/v3/zz_generated_cpu_info.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CPUInfoType = "cpuInfo"
|
||||
CPUInfoFieldCount = "count"
|
||||
)
|
||||
|
||||
type CPUInfo struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
}
|
12
client/management/v3/zz_generated_kubernetes_info.go
Normal file
12
client/management/v3/zz_generated_kubernetes_info.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
KubernetesInfoType = "kubernetesInfo"
|
||||
KubernetesInfoFieldKubeProxyVersion = "kubeProxyVersion"
|
||||
KubernetesInfoFieldKubeletVersion = "kubeletVersion"
|
||||
)
|
||||
|
||||
type KubernetesInfo struct {
|
||||
KubeProxyVersion string `json:"kubeProxyVersion,omitempty"`
|
||||
KubeletVersion string `json:"kubeletVersion,omitempty"`
|
||||
}
|
169
client/management/v3/zz_generated_machine.go
Normal file
169
client/management/v3/zz_generated_machine.go
Normal file
@@ -0,0 +1,169 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
MachineType = "machine"
|
||||
MachineFieldAllocatable = "allocatable"
|
||||
MachineFieldAmazonEC2Config = "amazonEc2Config"
|
||||
MachineFieldAnnotations = "annotations"
|
||||
MachineFieldAuthCertificateAuthority = "authCertificateAuthority"
|
||||
MachineFieldAuthKey = "authKey"
|
||||
MachineFieldAzureConfig = "azureConfig"
|
||||
MachineFieldCapacity = "capacity"
|
||||
MachineFieldClusterId = "clusterId"
|
||||
MachineFieldConditions = "conditions"
|
||||
MachineFieldConfigSource = "configSource"
|
||||
MachineFieldCreated = "created"
|
||||
MachineFieldDescription = "description"
|
||||
MachineFieldDigitalOceanConfig = "digitalOceanConfig"
|
||||
MachineFieldDockerVersion = "dockerVersion"
|
||||
MachineFieldDriver = "driver"
|
||||
MachineFieldEngineEnv = "engineEnv"
|
||||
MachineFieldEngineInsecureRegistry = "engineInsecureRegistry"
|
||||
MachineFieldEngineInstallURL = "engineInstallURL"
|
||||
MachineFieldEngineLabel = "engineLabel"
|
||||
MachineFieldEngineOpt = "engineOpt"
|
||||
MachineFieldEngineRegistryMirror = "engineRegistryMirror"
|
||||
MachineFieldEngineStorageDriver = "engineStorageDriver"
|
||||
MachineFieldExternalId = "externalId"
|
||||
MachineFieldFinalizers = "finalizers"
|
||||
MachineFieldHostname = "hostname"
|
||||
MachineFieldIPAddress = "ipAddress"
|
||||
MachineFieldId = "id"
|
||||
MachineFieldInfo = "info"
|
||||
MachineFieldLabels = "labels"
|
||||
MachineFieldLimits = "limits"
|
||||
MachineFieldMachineTemplateId = "machineTemplateId"
|
||||
MachineFieldName = "name"
|
||||
MachineFieldOwnerReferences = "ownerReferences"
|
||||
MachineFieldPhase = "phase"
|
||||
MachineFieldPodCIDR = "podCIDR"
|
||||
MachineFieldProviderID = "providerID"
|
||||
MachineFieldRemoved = "removed"
|
||||
MachineFieldRequested = "requested"
|
||||
MachineFieldResourcePath = "resourcePath"
|
||||
MachineFieldState = "state"
|
||||
MachineFieldTaints = "taints"
|
||||
MachineFieldTransitioning = "transitioning"
|
||||
MachineFieldTransitioningMessage = "transitioningMessage"
|
||||
MachineFieldUnschedulable = "unschedulable"
|
||||
MachineFieldUuid = "uuid"
|
||||
MachineFieldVolumesAttached = "volumesAttached"
|
||||
MachineFieldVolumesInUse = "volumesInUse"
|
||||
)
|
||||
|
||||
type Machine struct {
|
||||
types.Resource
|
||||
Allocatable map[string]string `json:"allocatable,omitempty"`
|
||||
AmazonEC2Config *AmazonEC2Config `json:"amazonEc2Config,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty"`
|
||||
AuthKey string `json:"authKey,omitempty"`
|
||||
AzureConfig *AzureConfig `json:"azureConfig,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty"`
|
||||
ClusterId string `json:"clusterId,omitempty"`
|
||||
Conditions []NodeCondition `json:"conditions,omitempty"`
|
||||
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DigitalOceanConfig *DigitalOceanConfig `json:"digitalOceanConfig,omitempty"`
|
||||
DockerVersion string `json:"dockerVersion,omitempty"`
|
||||
Driver string `json:"driver,omitempty"`
|
||||
EngineEnv map[string]string `json:"engineEnv,omitempty"`
|
||||
EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty"`
|
||||
EngineInstallURL string `json:"engineInstallURL,omitempty"`
|
||||
EngineLabel map[string]string `json:"engineLabel,omitempty"`
|
||||
EngineOpt map[string]string `json:"engineOpt,omitempty"`
|
||||
EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty"`
|
||||
EngineStorageDriver string `json:"engineStorageDriver,omitempty"`
|
||||
ExternalId string `json:"externalId,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty"`
|
||||
IPAddress string `json:"ipAddress,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Info *NodeInfo `json:"info,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
MachineTemplateId string `json:"machineTemplateId,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Phase string `json:"phase,omitempty"`
|
||||
PodCIDR string `json:"podCIDR,omitempty"`
|
||||
ProviderID string `json:"providerID,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty"`
|
||||
ResourcePath string `json:"resourcePath,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Taints []Taint `json:"taints,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Unschedulable *bool `json:"unschedulable,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
VolumesAttached map[string]AttachedVolume `json:"volumesAttached,omitempty"`
|
||||
VolumesInUse []string `json:"volumesInUse,omitempty"`
|
||||
}
|
||||
type MachineCollection struct {
|
||||
types.Collection
|
||||
Data []Machine `json:"data,omitempty"`
|
||||
client *MachineClient
|
||||
}
|
||||
|
||||
type MachineClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type MachineOperations interface {
|
||||
List(opts *types.ListOpts) (*MachineCollection, error)
|
||||
Create(opts *Machine) (*Machine, error)
|
||||
Update(existing *Machine, updates interface{}) (*Machine, error)
|
||||
ByID(id string) (*Machine, error)
|
||||
Delete(container *Machine) error
|
||||
}
|
||||
|
||||
func newMachineClient(apiClient *Client) *MachineClient {
|
||||
return &MachineClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *MachineClient) Create(container *Machine) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoCreate(MachineType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoUpdate(MachineType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) List(opts *types.ListOpts) (*MachineCollection, error) {
|
||||
resp := &MachineCollection{}
|
||||
err := c.apiClient.Ops.DoList(MachineType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *MachineCollection) Next() (*MachineCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &MachineCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *MachineClient) ByID(id string) (*Machine, error) {
|
||||
resp := &Machine{}
|
||||
err := c.apiClient.Ops.DoByID(MachineType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *MachineClient) Delete(container *Machine) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(MachineType, &container.Resource)
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user