diff --git a/vendor.conf b/vendor.conf index ab515063..0f97af56 100644 --- a/vendor.conf +++ b/vendor.conf @@ -28,4 +28,4 @@ github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0e github.com/mattn/go-colorable efa589957cd060542a26d2dd7832fd6a6c6c3ade github.com/mattn/go-isatty 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c github.com/rancher/norman f5744043a6fb81330ee78e4f7a0f04d0ef65c9f1 -github.com/rancher/types 2810a6fa79367b12b95f61463e42f0e495fe2411 +github.com/rancher/types f5114e54b71fd7f6a41dd68e8cf54eea63551f17 diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go index ad35be53..c64e0fc0 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/authn_types.go @@ -167,10 +167,10 @@ type GoogleOauthConfig struct { metav1.ObjectMeta `json:"metadata,omitempty"` AuthConfig `json:",inline" mapstructure:",squash"` - OauthCredential string `json:"oauthCredential,omitempty" norman:"required,type=password"` - ServiceAccountCredential string `json:"serviceAccountCredential,omitempty" norman:"required,type=password"` - AdminEmail string `json:"adminEmail,omitempty"` - Hostname string `json:"hostname,omitempty" norman:"required,noupdate"` + OauthCredential string `json:"oauthCredential,omitempty" norman:"required,type=password,notnullable"` + ServiceAccountCredential string `json:"serviceAccountCredential,omitempty" norman:"required,type=password,notnullable"` + AdminEmail string `json:"adminEmail,omitempty" norman:"required,notnullable"` + Hostname string `json:"hostname,omitempty" norman:"required,notnullable,noupdate"` UserInfoEndpoint string `json:"userInfoEndpoint" norman:"default=https://openidconnect.googleapis.com/v1/userinfo,required,notnullable"` } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/backup_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/backup_types.go index 38f35529..be7f98ed 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/backup_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/backup_types.go @@ -35,8 +35,8 @@ type S3BackupConfig struct { Region string `yaml:"region" json:"region,omitempty"` // Endpoint is used if this is not an AWS API Endpoint string `yaml:"endpoint" json:"endpoint"` - // EndpointCA is used to connect to custom s3 endpoints - EndpointCA string `yaml:"endpoint_ca" json:"endpointCa,omitempty"` + // CustomCA is used to connect to custom s3 endpoints + CustomCA string `yaml:"custom_ca" json:"customCa,omitempty"` } type EtcdBackup struct { types.Namespaced diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_scan_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_scan_types.go new file mode 100644 index 00000000..4869f650 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_scan_types.go @@ -0,0 +1,56 @@ +package v3 + +import ( + "github.com/rancher/norman/condition" + "github.com/rancher/norman/types" + v1 "k8s.io/api/core/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + ClusterScanConditionCreated condition.Cond = "Created" + ClusterScanConditionCompleted condition.Cond = "Completed" +) + +type ClusterScanConfig struct { +} + +type ClusterScanCondition struct { + // Type of condition. + Type string `json:"type"` + // Status of the condition, one of True, False, Unknown. + Status v1.ConditionStatus `json:"status"` + // The last time this condition was updated. + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + // Last time the condition transitioned from one status to another. + LastTransitionTime string `json:"lastTransitionTime,omitempty"` + // The reason for the condition's last transition. + Reason string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition + Message string `json:"message,omitempty"` +} + +type ClusterScanSpec struct { + ScanType string `json:"scanType"` + // cluster ID + ClusterID string `json:"clusterId,omitempty" norman:"required,type=reference[cluster]"` + // manual flag + Manual bool `yaml:"manual" json:"manual,omitempty"` + // scanConfig + ScanConfig ClusterScanConfig `yaml:",omitempty" json:"scanConfig,omitempty"` +} + +type ClusterScanStatus struct { + Conditions []ClusterScanCondition `json:"conditions"` +} + +type ClusterScan struct { + types.Namespaced + + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterScanSpec `json:"spec"` + Status ClusterScanStatus `yaml:"status" json:"status,omitempty"` +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go index b8aa3849..4ea4bb88 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go @@ -30,6 +30,7 @@ const ( ClusterActionBackupEtcd = "backupEtcd" ClusterActionRestoreFromEtcdBackup = "restoreFromEtcdBackup" ClusterActionRotateCertificates = "rotateCertificates" + ClusterActionRunCISScan = "runSecurityScan" // ClusterConditionReady Cluster ready to serve API (healthy when true, unhealthy when false) ClusterConditionReady condition.Cond = "Ready" diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go new file mode 100644 index 00000000..2552553c --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go @@ -0,0 +1,452 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "github.com/rancher/norman/resource" + "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/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + ClusterScanGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "ClusterScan", + } + ClusterScanResource = metav1.APIResource{ + Name: "clusterscans", + SingularName: "clusterscan", + Namespaced: true, + + Kind: ClusterScanGroupVersionKind.Kind, + } + + ClusterScanGroupVersionResource = schema.GroupVersionResource{ + Group: GroupName, + Version: Version, + Resource: "clusterscans", + } +) + +func init() { + resource.Put(ClusterScanGroupVersionResource) +} + +func NewClusterScan(namespace, name string, obj ClusterScan) *ClusterScan { + obj.APIVersion, obj.Kind = ClusterScanGroupVersionKind.ToAPIVersionAndKind() + obj.Name = name + obj.Namespace = namespace + return &obj +} + +type ClusterScanList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterScan `json:"items"` +} + +type ClusterScanHandlerFunc func(key string, obj *ClusterScan) (runtime.Object, error) + +type ClusterScanChangeHandlerFunc func(obj *ClusterScan) (runtime.Object, error) + +type ClusterScanLister interface { + List(namespace string, selector labels.Selector) (ret []*ClusterScan, err error) + Get(namespace, name string) (*ClusterScan, error) +} + +type ClusterScanController interface { + Generic() controller.GenericController + Informer() cache.SharedIndexInformer + Lister() ClusterScanLister + AddHandler(ctx context.Context, name string, handler ClusterScanHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler ClusterScanHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type ClusterScanInterface interface { + ObjectClient() *objectclient.ObjectClient + Create(*ClusterScan) (*ClusterScan, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ClusterScan, error) + Get(name string, opts metav1.GetOptions) (*ClusterScan, error) + Update(*ClusterScan) (*ClusterScan, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*ClusterScanList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() ClusterScanController + AddHandler(ctx context.Context, name string, sync ClusterScanHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle ClusterScanLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterScanHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterScanLifecycle) +} + +type clusterScanLister struct { + controller *clusterScanController +} + +func (l *clusterScanLister) List(namespace string, selector labels.Selector) (ret []*ClusterScan, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*ClusterScan)) + }) + return +} + +func (l *clusterScanLister) Get(namespace, name string) (*ClusterScan, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: ClusterScanGroupVersionKind.Group, + Resource: "clusterScan", + }, key) + } + return obj.(*ClusterScan), nil +} + +type clusterScanController struct { + controller.GenericController +} + +func (c *clusterScanController) Generic() controller.GenericController { + return c.GenericController +} + +func (c *clusterScanController) Lister() ClusterScanLister { + return &clusterScanLister{ + controller: c, + } +} + +func (c *clusterScanController) AddHandler(ctx context.Context, name string, handler ClusterScanHandlerFunc) { + c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { + if obj == nil { + return handler(key, nil) + } else if v, ok := obj.(*ClusterScan); ok { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *clusterScanController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ClusterScanHandlerFunc) { + resource.PutClusterScoped(ClusterScanGroupVersionResource) + c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { + if obj == nil { + return handler(key, nil) + } else if v, ok := obj.(*ClusterScan); ok && controller.ObjectInCluster(cluster, obj) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +type clusterScanFactory struct { +} + +func (c clusterScanFactory) Object() runtime.Object { + return &ClusterScan{} +} + +func (c clusterScanFactory) List() runtime.Object { + return &ClusterScanList{} +} + +func (s *clusterScanClient) Controller() ClusterScanController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.clusterScanControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(ClusterScanGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &clusterScanController{ + GenericController: genericController, + } + + s.client.clusterScanControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type clusterScanClient struct { + client *Client + ns string + objectClient *objectclient.ObjectClient + controller ClusterScanController +} + +func (s *clusterScanClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *clusterScanClient) Create(o *ClusterScan) (*ClusterScan, error) { + obj, err := s.objectClient.Create(o) + return obj.(*ClusterScan), err +} + +func (s *clusterScanClient) Get(name string, opts metav1.GetOptions) (*ClusterScan, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*ClusterScan), err +} + +func (s *clusterScanClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ClusterScan, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*ClusterScan), err +} + +func (s *clusterScanClient) Update(o *ClusterScan) (*ClusterScan, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*ClusterScan), err +} + +func (s *clusterScanClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *clusterScanClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *clusterScanClient) List(opts metav1.ListOptions) (*ClusterScanList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*ClusterScanList), err +} + +func (s *clusterScanClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *clusterScanClient) Patch(o *ClusterScan, patchType types.PatchType, data []byte, subresources ...string) (*ClusterScan, error) { + obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) + return obj.(*ClusterScan), err +} + +func (s *clusterScanClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *clusterScanClient) AddHandler(ctx context.Context, name string, sync ClusterScanHandlerFunc) { + s.Controller().AddHandler(ctx, name, sync) +} + +func (s *clusterScanClient) AddLifecycle(ctx context.Context, name string, lifecycle ClusterScanLifecycle) { + sync := NewClusterScanLifecycleAdapter(name, false, s, lifecycle) + s.Controller().AddHandler(ctx, name, sync) +} + +func (s *clusterScanClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterScanHandlerFunc) { + s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) +} + +func (s *clusterScanClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterScanLifecycle) { + sync := NewClusterScanLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) +} + +type ClusterScanIndexer func(obj *ClusterScan) ([]string, error) + +type ClusterScanClientCache interface { + Get(namespace, name string) (*ClusterScan, error) + List(namespace string, selector labels.Selector) ([]*ClusterScan, error) + + Index(name string, indexer ClusterScanIndexer) + GetIndexed(name, key string) ([]*ClusterScan, error) +} + +type ClusterScanClient interface { + Create(*ClusterScan) (*ClusterScan, error) + Get(namespace, name string, opts metav1.GetOptions) (*ClusterScan, error) + Update(*ClusterScan) (*ClusterScan, error) + Delete(namespace, name string, options *metav1.DeleteOptions) error + List(namespace string, opts metav1.ListOptions) (*ClusterScanList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + + Cache() ClusterScanClientCache + + OnCreate(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) + OnChange(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) + OnRemove(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) + Enqueue(namespace, name string) + + Generic() controller.GenericController + ObjectClient() *objectclient.ObjectClient + Interface() ClusterScanInterface +} + +type clusterScanClientCache struct { + client *clusterScanClient2 +} + +type clusterScanClient2 struct { + iface ClusterScanInterface + controller ClusterScanController +} + +func (n *clusterScanClient2) Interface() ClusterScanInterface { + return n.iface +} + +func (n *clusterScanClient2) Generic() controller.GenericController { + return n.iface.Controller().Generic() +} + +func (n *clusterScanClient2) ObjectClient() *objectclient.ObjectClient { + return n.Interface().ObjectClient() +} + +func (n *clusterScanClient2) Enqueue(namespace, name string) { + n.iface.Controller().Enqueue(namespace, name) +} + +func (n *clusterScanClient2) Create(obj *ClusterScan) (*ClusterScan, error) { + return n.iface.Create(obj) +} + +func (n *clusterScanClient2) Get(namespace, name string, opts metav1.GetOptions) (*ClusterScan, error) { + return n.iface.GetNamespaced(namespace, name, opts) +} + +func (n *clusterScanClient2) Update(obj *ClusterScan) (*ClusterScan, error) { + return n.iface.Update(obj) +} + +func (n *clusterScanClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { + return n.iface.DeleteNamespaced(namespace, name, options) +} + +func (n *clusterScanClient2) List(namespace string, opts metav1.ListOptions) (*ClusterScanList, error) { + return n.iface.List(opts) +} + +func (n *clusterScanClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return n.iface.Watch(opts) +} + +func (n *clusterScanClientCache) Get(namespace, name string) (*ClusterScan, error) { + return n.client.controller.Lister().Get(namespace, name) +} + +func (n *clusterScanClientCache) List(namespace string, selector labels.Selector) ([]*ClusterScan, error) { + return n.client.controller.Lister().List(namespace, selector) +} + +func (n *clusterScanClient2) Cache() ClusterScanClientCache { + n.loadController() + return &clusterScanClientCache{ + client: n, + } +} + +func (n *clusterScanClient2) OnCreate(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-create", &clusterScanLifecycleDelegate{create: sync}) +} + +func (n *clusterScanClient2) OnChange(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-change", &clusterScanLifecycleDelegate{update: sync}) +} + +func (n *clusterScanClient2) OnRemove(ctx context.Context, name string, sync ClusterScanChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name, &clusterScanLifecycleDelegate{remove: sync}) +} + +func (n *clusterScanClientCache) Index(name string, indexer ClusterScanIndexer) { + err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + name: func(obj interface{}) ([]string, error) { + if v, ok := obj.(*ClusterScan); ok { + return indexer(v) + } + return nil, nil + }, + }) + + if err != nil { + panic(err) + } +} + +func (n *clusterScanClientCache) GetIndexed(name, key string) ([]*ClusterScan, error) { + var result []*ClusterScan + objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) + if err != nil { + return nil, err + } + for _, obj := range objs { + if v, ok := obj.(*ClusterScan); ok { + result = append(result, v) + } + } + + return result, nil +} + +func (n *clusterScanClient2) loadController() { + if n.controller == nil { + n.controller = n.iface.Controller() + } +} + +type clusterScanLifecycleDelegate struct { + create ClusterScanChangeHandlerFunc + update ClusterScanChangeHandlerFunc + remove ClusterScanChangeHandlerFunc +} + +func (n *clusterScanLifecycleDelegate) HasCreate() bool { + return n.create != nil +} + +func (n *clusterScanLifecycleDelegate) Create(obj *ClusterScan) (runtime.Object, error) { + if n.create == nil { + return obj, nil + } + return n.create(obj) +} + +func (n *clusterScanLifecycleDelegate) HasFinalize() bool { + return n.remove != nil +} + +func (n *clusterScanLifecycleDelegate) Remove(obj *ClusterScan) (runtime.Object, error) { + if n.remove == nil { + return obj, nil + } + return n.remove(obj) +} + +func (n *clusterScanLifecycleDelegate) Updated(obj *ClusterScan) (runtime.Object, error) { + if n.update == nil { + return obj, nil + } + return n.update(obj) +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_lifecycle_adapter.go new file mode 100644 index 00000000..67db4bf9 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_cluster_scan_lifecycle_adapter.go @@ -0,0 +1,62 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type ClusterScanLifecycle interface { + Create(obj *ClusterScan) (runtime.Object, error) + Remove(obj *ClusterScan) (runtime.Object, error) + Updated(obj *ClusterScan) (runtime.Object, error) +} + +type clusterScanLifecycleAdapter struct { + lifecycle ClusterScanLifecycle +} + +func (w *clusterScanLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterScanLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + +func (w *clusterScanLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*ClusterScan)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *clusterScanLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*ClusterScan)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *clusterScanLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*ClusterScan)) + if o == nil { + return nil, err + } + return o, err +} + +func NewClusterScanLifecycleAdapter(name string, clusterScoped bool, client ClusterScanInterface, l ClusterScanLifecycle) ClusterScanHandlerFunc { + adapter := &clusterScanLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *ClusterScan) (runtime.Object, error) { + newObj, err := syncFn(key, obj) + if o, ok := newObj.(runtime.Object); ok { + return o, err + } + return nil, err + } +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go index dc0a79b2..34adaa20 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -1794,6 +1794,138 @@ func (in *ClusterRoleTemplateBindingList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScan) DeepCopyInto(out *ClusterScan) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScan. +func (in *ClusterScan) DeepCopy() *ClusterScan { + if in == nil { + return nil + } + out := new(ClusterScan) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterScan) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScanCondition) DeepCopyInto(out *ClusterScanCondition) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanCondition. +func (in *ClusterScanCondition) DeepCopy() *ClusterScanCondition { + if in == nil { + return nil + } + out := new(ClusterScanCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScanConfig) DeepCopyInto(out *ClusterScanConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanConfig. +func (in *ClusterScanConfig) DeepCopy() *ClusterScanConfig { + if in == nil { + return nil + } + out := new(ClusterScanConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScanList) DeepCopyInto(out *ClusterScanList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterScan, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanList. +func (in *ClusterScanList) DeepCopy() *ClusterScanList { + if in == nil { + return nil + } + out := new(ClusterScanList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterScanList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScanSpec) DeepCopyInto(out *ClusterScanSpec) { + *out = *in + out.ScanConfig = in.ScanConfig + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanSpec. +func (in *ClusterScanSpec) DeepCopy() *ClusterScanSpec { + if in == nil { + return nil + } + out := new(ClusterScanSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterScanStatus) DeepCopyInto(out *ClusterScanStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ClusterScanCondition, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanStatus. +func (in *ClusterScanStatus) DeepCopy() *ClusterScanStatus { + if in == nil { + return nil + } + out := new(ClusterScanStatus) + in.DeepCopyInto(out) + return out +} + // 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 diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go index fbd4911e..ba576969 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -71,6 +71,7 @@ type Interface interface { GlobalDNSProvidersGetter KontainerDriversGetter EtcdBackupsGetter + ClusterScansGetter MonitorMetricsGetter ClusterMonitorGraphsGetter ProjectMonitorGraphsGetter @@ -133,6 +134,7 @@ type Clients struct { GlobalDNSProvider GlobalDNSProviderClient KontainerDriver KontainerDriverClient EtcdBackup EtcdBackupClient + ClusterScan ClusterScanClient MonitorMetric MonitorMetricClient ClusterMonitorGraph ClusterMonitorGraphClient ProjectMonitorGraph ProjectMonitorGraphClient @@ -197,6 +199,7 @@ type Client struct { globalDnsProviderControllers map[string]GlobalDNSProviderController kontainerDriverControllers map[string]KontainerDriverController etcdBackupControllers map[string]EtcdBackupController + clusterScanControllers map[string]ClusterScanController monitorMetricControllers map[string]MonitorMetricController clusterMonitorGraphControllers map[string]ClusterMonitorGraphController projectMonitorGraphControllers map[string]ProjectMonitorGraphController @@ -391,6 +394,9 @@ func NewClientsFromInterface(iface Interface) *Clients { EtcdBackup: &etcdBackupClient2{ iface: iface.EtcdBackups(""), }, + ClusterScan: &clusterScanClient2{ + iface: iface.ClusterScans(""), + }, MonitorMetric: &monitorMetricClient2{ iface: iface.MonitorMetrics(""), }, @@ -476,6 +482,7 @@ func NewForConfig(config rest.Config) (Interface, error) { globalDnsProviderControllers: map[string]GlobalDNSProviderController{}, kontainerDriverControllers: map[string]KontainerDriverController{}, etcdBackupControllers: map[string]EtcdBackupController{}, + clusterScanControllers: map[string]ClusterScanController{}, monitorMetricControllers: map[string]MonitorMetricController{}, clusterMonitorGraphControllers: map[string]ClusterMonitorGraphController{}, projectMonitorGraphControllers: map[string]ProjectMonitorGraphController{}, @@ -1160,6 +1167,19 @@ func (c *Client) EtcdBackups(namespace string) EtcdBackupInterface { } } +type ClusterScansGetter interface { + ClusterScans(namespace string) ClusterScanInterface +} + +func (c *Client) ClusterScans(namespace string) ClusterScanInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterScanResource, ClusterScanGroupVersionKind, clusterScanFactory{}) + return &clusterScanClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + type MonitorMetricsGetter interface { MonitorMetrics(namespace string) MonitorMetricInterface } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go index 45edeb1f..f7604600 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -135,6 +135,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &KontainerDriverList{}, &EtcdBackup{}, &EtcdBackupList{}, + &ClusterScan{}, + &ClusterScanList{}, &MonitorMetric{}, &MonitorMetricList{}, &ClusterMonitorGraph{},