From cafc7218fb790ed950e4fdb04fb5f87e9641be1c Mon Sep 17 00:00:00 2001 From: moelsayed Date: Tue, 19 Jun 2018 22:04:18 +0200 Subject: [PATCH] Vendor bump --- vendor.conf | 2 +- .../management.cattle.io/v3/authn_types.go | 64 ++++ .../management.cattle.io/v3/cluster_types.go | 4 + .../management.cattle.io/v3/k8s_defaults.go | 2 +- .../management.cattle.io/v3/logging_types.go | 38 +- .../management.cattle.io/v3/machine_types.go | 3 +- .../apis/management.cattle.io/v3/rke_types.go | 4 +- .../v3/zz_generated_deepcopy.go | 351 +++++++++++++++++- .../v3/zz_generated_k8s_client.go | 32 ++ .../v3/zz_generated_ldap_config_controller.go | 251 +++++++++++++ ...generated_ldap_config_lifecycle_adapter.go | 51 +++ .../v3/zz_generated_scheme.go | 3 + .../zz_generated_user_attribute_controller.go | 251 +++++++++++++ ...erated_user_attribute_lifecycle_adapter.go | 51 +++ vendor/github.com/rancher/types/vendor.conf | 2 +- 15 files changed, 1082 insertions(+), 27 deletions(-) create mode 100644 vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go create mode 100644 vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go create mode 100644 vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go create mode 100644 vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go diff --git a/vendor.conf b/vendor.conf index 00730648..37e14b22 100644 --- a/vendor.conf +++ b/vendor.conf @@ -26,4 +26,4 @@ github.com/Microsoft/go-winio ab35fc04b6365e8fcb18e6e9e41ea4a02b10b17 github.com/go-ini/ini 06f5f3d67269ccec1fe5fe4134ba6e982984f7f5 github.com/rancher/norman ff60298f31f081b06d198815b4c178a578664f7d -github.com/rancher/types 206bab2696db5b7d0380f83d12d78450a9bde1c0 +github.com/rancher/types e034ea4ecc9f32f97b99a7415873015fb34a0857 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 c1a85c58..be74edd1 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 @@ -35,6 +35,19 @@ type User struct { Me bool `json:"me,omitempty"` } +// UserAttribute will have a CRD (and controller) generated for it, but will not be exposed in the API. +type UserAttribute struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + UserName string + GroupPrincipals map[string]Principals // the value is a []Principal, but code generator cannot handle slice as a value +} + +type Principals struct { + Items []Principal +} + type Group struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -175,3 +188,54 @@ type ActiveDirectoryTestAndApplyInput struct { Password string `json:"password"` Enabled bool `json:"enabled,omitempty"` } + +type LdapConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + AuthConfig `json:",inline" mapstructure:",squash"` + + Servers []string `json:"servers,omitempty" norman:"type=array[string],notnullable,required"` + Port int64 `json:"port,omitempty" norman:"default=389,notnullable,required"` + TLS bool `json:"tls,omitempty" norman:"default=false,notnullable,required"` + Certificate string `json:"certificate,omitempty"` + ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" norman:"required"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" norman:"type=password,required"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" norman:"notnullable,required"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" norman:"default=uid|sn|givenName,notnullable,required"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" norman:"default=uid,notnullable,required"` + UserObjectClass string `json:"userObjectClass,omitempty" norman:"default=inetOrgPerson,notnullable,required"` + UserNameAttribute string `json:"userNameAttribute,omitempty" norman:"default=cn,notnullable,required"` + UserMemberAttribute string `json:"userMemberAttribute,omitempty" norman:"default=memberOf,notnullable,required"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" norman:"default=cn,notnullable,required"` + GroupObjectClass string `json:"groupObjectClass,omitempty" norman:"default=groupOfNames,notnullable,required"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" norman:"default=cn,notnullable,required"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" norman:"default=entryDN,notnullable"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" norman:"default=entryDN,notnullable"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" norman:"default=member,notnullable,required"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" norman:"default=1000,notnullable,required"` +} + +type LdapTestAndApplyInput struct { + LdapConfig `json:"ldapConfig,omitempty"` + Username string `json:"username"` + Password string `json:"password" norman:"type=password,required"` +} + +type OpenLdapConfig struct { + LdapConfig `json:",inline" mapstructure:",squash"` +} + +type OpenLdapTestAndApplyInput struct { + LdapTestAndApplyInput `json:",inline" mapstructure:",squash"` +} + +type FreeIpaConfig struct { + LdapConfig `json:",inline" mapstructure:",squash"` +} + +type FreeIpaTestAndApplyInput struct { + LdapTestAndApplyInput `json:",inline" mapstructure:",squash"` +} 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 12ddb720..fdc52f1e 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 @@ -196,6 +196,10 @@ type AzureKubernetesServiceConfig struct { TenantID string `json:"tenantId,omitempty" norman:"required"` // Secret associated with the Client ID ClientSecret string `json:"clientSecret,omitempty" norman:"required,type=password"` + // Virtual network to use for the AKS cluster + VirtualNetwork string `json:"virtualNetwork,omitempty"` + // Subnet to use for the AKS Cluster (must be within the virtual network) + Subnet string `json:"subnet,omitempty"` } type AmazonElasticContainerServiceConfig struct { diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go index bf01215f..a8115be3 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go @@ -300,7 +300,7 @@ var ( PluginsDocker: m("plugins/docker:17.12"), }, LoggingSystemImages: LoggingSystemImages{ - Fluentd: m("rancher/fluentd:v0.1.7"), + Fluentd: m("rancher/fluentd:v0.1.8"), FluentdHelper: m("rancher/fluentd-helper:v0.1.2"), LogAggregatorFlexVolumeDriver: m("rancher/log-aggregator:v0.1.3"), Elaticsearch: m("quay.io/pires/docker-elasticsearch-kubernetes:5.6.2"), diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go index b90d4ea3..8422dc35 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/logging_types.go @@ -40,9 +40,9 @@ type ProjectLogging struct { type LoggingCommonSpec struct { DisplayName string `json:"displayName,omitempty"` - OutputFlushInterval int `json:"outputFlushInterval,omitempty" norman:"default=3"` - OutputTags map[string]string `json:"outputTags,omitempty"` - + OutputFlushInterval int `json:"outputFlushInterval,omitempty" norman:"default=3"` + OutputTags map[string]string `json:"outputTags,omitempty"` + DockerRootDir string `json:"dockerRootDir" norman:"default=/var/lib/docker/containers"` ElasticsearchConfig *ElasticsearchConfig `json:"elasticsearchConfig,omitempty"` SplunkConfig *SplunkConfig `json:"splunkConfig,omitempty"` KafkaConfig *KafkaConfig `json:"kafkaConfig,omitempty"` @@ -94,19 +94,28 @@ type LoggingCondition struct { } type ElasticsearchConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - IndexPrefix string `json:"indexPrefix,omitempty" norman:"required"` - DateFormat string `json:"dateFormat,omitempty" norman:"required,type=enum,options=YYYY-MM-DD|YYYY-MM|YYYY,default=YYYY-MM-DD"` - AuthUserName string `json:"authUsername,omitempty"` //secret - AuthPassword string `json:"authPassword,omitempty"` //secret - SSLVerify bool `json:"sslVerify,omitempty" norman:"required,default=true"` + Endpoint string `json:"endpoint,omitempty" norman:"required"` + IndexPrefix string `json:"indexPrefix,omitempty" norman:"required"` + DateFormat string `json:"dateFormat,omitempty" norman:"required,type=enum,options=YYYY-MM-DD|YYYY-MM|YYYY,default=YYYY-MM-DD"` + AuthUserName string `json:"authUsername,omitempty"` //secret + AuthPassword string `json:"authPassword,omitempty"` //secret + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` + ClientKeyPass string `json:"clientKeyPass"` + SSLVerify bool `json:"sslVerify"` } type SplunkConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - Source string `json:"source,omitempty"` - Token string `json:"token,omitempty" norman:"required"` //secret - SSLVerify bool `json:"sslVerify,omitempty" norman:"required,default=true"` + Endpoint string `json:"endpoint,omitempty" norman:"required"` + Source string `json:"source,omitempty"` + Token string `json:"token,omitempty" norman:"required"` //secret + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` + ClientKeyPass string `json:"clientKeyPass"` + SSLVerify bool `json:"sslVerify"` + Index string `json:"index"` } type EmbeddedConfig struct { @@ -124,6 +133,9 @@ type KafkaConfig struct { ZookeeperEndpoint string `json:"zookeeperEndpoint,omitempty"` BrokerEndpoints []string `json:"brokerEndpoints,omitempty"` Topic string `json:"topic,omitempty" norman:"required"` + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` } type SyslogConfig struct { diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go index 9107810c..ff796cd3 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/machine_types.go @@ -166,7 +166,8 @@ type CustomConfig struct { // Optional - Docker socket on the node that will be used in tunneling DockerSocket string `yaml:"docker_socket" json:"dockerSocket,omitempty"` // SSH Private Key - SSHKey string `yaml:"ssh_key" json:"sshKey,omitempty"` + SSHKey string `yaml:"ssh_key" json:"sshKey,omitempty"` + Label map[string]string `yaml:"label" json:"label,omitempty"` } type NodeSpec struct { diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go index 95879ddb..5d8a3651 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go @@ -433,7 +433,7 @@ type OpenstackCloudProvider struct { Global GlobalOpenstackOpts `json:"global" yaml:"global" ini:"Global,omitempty"` LoadBalancer LoadBalancerOpenstackOpts `json:"loadBalancer" yaml:"load_balancer" ini:"LoadBalancer,omitempty"` BlockStorage BlockStorageOpenstackOpts `json:"blockStorage" yaml:"block_storage" ini:"BlockStorage,omitempty"` - Router RouterOpenstackOpts `json:"router" yaml:"router" ini:"Router,omitempty"` + Route RouteOpenstackOpts `json:"route" yaml:"route" ini:"Route,omitempty"` Metadata MetadataOpenstackOpts `json:"metadata" yaml:"metadata" ini:"Metadata,omitempty"` } @@ -471,7 +471,7 @@ type BlockStorageOpenstackOpts struct { IgnoreVolumeAZ bool `json:"ignore-volume-az" yaml:"ignore-volume-az" ini:"ignore-volume-az,omitempty"` } -type RouterOpenstackOpts struct { +type RouteOpenstackOpts struct { RouterID string `json:"router-id" yaml:"router-id" ini:"router-id,omitempty"` // required } 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 eefda03b..410f1bc9 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 @@ -328,6 +328,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*FlannelNetworkProvider).DeepCopyInto(out.(*FlannelNetworkProvider)) return nil }, InType: reflect.TypeOf(&FlannelNetworkProvider{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*FreeIpaConfig).DeepCopyInto(out.(*FreeIpaConfig)) + return nil + }, InType: reflect.TypeOf(&FreeIpaConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*FreeIpaTestAndApplyInput).DeepCopyInto(out.(*FreeIpaTestAndApplyInput)) + return nil + }, InType: reflect.TypeOf(&FreeIpaTestAndApplyInput{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*GenerateKubeConfigOutput).DeepCopyInto(out.(*GenerateKubeConfigOutput)) return nil @@ -436,6 +444,18 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*KubernetesServicesOptions).DeepCopyInto(out.(*KubernetesServicesOptions)) return nil }, InType: reflect.TypeOf(&KubernetesServicesOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*LdapConfig).DeepCopyInto(out.(*LdapConfig)) + return nil + }, InType: reflect.TypeOf(&LdapConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*LdapConfigList).DeepCopyInto(out.(*LdapConfigList)) + return nil + }, InType: reflect.TypeOf(&LdapConfigList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*LdapTestAndApplyInput).DeepCopyInto(out.(*LdapTestAndApplyInput)) + return nil + }, InType: reflect.TypeOf(&LdapTestAndApplyInput{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*ListOpts).DeepCopyInto(out.(*ListOpts)) return nil @@ -576,6 +596,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*NotifierStatus).DeepCopyInto(out.(*NotifierStatus)) return nil }, InType: reflect.TypeOf(&NotifierStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*OpenLdapConfig).DeepCopyInto(out.(*OpenLdapConfig)) + return nil + }, InType: reflect.TypeOf(&OpenLdapConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*OpenLdapTestAndApplyInput).DeepCopyInto(out.(*OpenLdapTestAndApplyInput)) + return nil + }, InType: reflect.TypeOf(&OpenLdapTestAndApplyInput{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*OpenstackCloudProvider).DeepCopyInto(out.(*OpenstackCloudProvider)) return nil @@ -672,6 +700,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*PrincipalList).DeepCopyInto(out.(*PrincipalList)) return nil }, InType: reflect.TypeOf(&PrincipalList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Principals).DeepCopyInto(out.(*Principals)) + return nil + }, InType: reflect.TypeOf(&Principals{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*PrivateRegistry).DeepCopyInto(out.(*PrivateRegistry)) return nil @@ -805,9 +837,9 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { return nil }, InType: reflect.TypeOf(&RoleTemplateList{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*RouterOpenstackOpts).DeepCopyInto(out.(*RouterOpenstackOpts)) + in.(*RouteOpenstackOpts).DeepCopyInto(out.(*RouteOpenstackOpts)) return nil - }, InType: reflect.TypeOf(&RouterOpenstackOpts{})}, + }, InType: reflect.TypeOf(&RouteOpenstackOpts{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*RunPipelineInput).DeepCopyInto(out.(*RunPipelineInput)) return nil @@ -984,6 +1016,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*User).DeepCopyInto(out.(*User)) return nil }, InType: reflect.TypeOf(&User{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*UserAttribute).DeepCopyInto(out.(*UserAttribute)) + return nil + }, InType: reflect.TypeOf(&UserAttribute{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*UserAttributeList).DeepCopyInto(out.(*UserAttributeList)) + return nil + }, InType: reflect.TypeOf(&UserAttributeList{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*UserList).DeepCopyInto(out.(*UserList)) return nil @@ -2628,6 +2668,13 @@ func (in *Condition) DeepCopy() *Condition { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomConfig) DeepCopyInto(out *CustomConfig) { *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -2968,6 +3015,58 @@ func (in *FlannelNetworkProvider) DeepCopy() *FlannelNetworkProvider { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FreeIpaConfig) DeepCopyInto(out *FreeIpaConfig) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaConfig. +func (in *FreeIpaConfig) DeepCopy() *FreeIpaConfig { + if in == nil { + return nil + } + out := new(FreeIpaConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FreeIpaConfig) 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 *FreeIpaTestAndApplyInput) DeepCopyInto(out *FreeIpaTestAndApplyInput) { + *out = *in + in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FreeIpaTestAndApplyInput. +func (in *FreeIpaTestAndApplyInput) DeepCopy() *FreeIpaTestAndApplyInput { + if in == nil { + return nil + } + out := new(FreeIpaTestAndApplyInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FreeIpaTestAndApplyInput) 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 *GenerateKubeConfigOutput) DeepCopyInto(out *GenerateKubeConfigOutput) { *out = *in @@ -3613,6 +3712,99 @@ func (in *KubernetesServicesOptions) DeepCopy() *KubernetesServicesOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LdapConfig) DeepCopyInto(out *LdapConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.AuthConfig.DeepCopyInto(&out.AuthConfig) + if in.Servers != nil { + in, out := &in.Servers, &out.Servers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfig. +func (in *LdapConfig) DeepCopy() *LdapConfig { + if in == nil { + return nil + } + out := new(LdapConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LdapConfig) 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 *LdapConfigList) DeepCopyInto(out *LdapConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LdapConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapConfigList. +func (in *LdapConfigList) DeepCopy() *LdapConfigList { + if in == nil { + return nil + } + out := new(LdapConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LdapConfigList) 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 *LdapTestAndApplyInput) DeepCopyInto(out *LdapTestAndApplyInput) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LdapTestAndApplyInput. +func (in *LdapTestAndApplyInput) DeepCopy() *LdapTestAndApplyInput { + if in == nil { + return nil + } + out := new(LdapTestAndApplyInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LdapTestAndApplyInput) 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 *ListOpts) DeepCopyInto(out *ListOpts) { *out = *in @@ -4297,7 +4489,7 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = nil } else { *out = new(CustomConfig) - **out = **in + (*in).DeepCopyInto(*out) } } in.InternalNodeSpec.DeepCopyInto(&out.InternalNodeSpec) @@ -4714,13 +4906,65 @@ func (in *NotifierStatus) DeepCopy() *NotifierStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenLdapConfig) DeepCopyInto(out *OpenLdapConfig) { + *out = *in + in.LdapConfig.DeepCopyInto(&out.LdapConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapConfig. +func (in *OpenLdapConfig) DeepCopy() *OpenLdapConfig { + if in == nil { + return nil + } + out := new(OpenLdapConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenLdapConfig) 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 *OpenLdapTestAndApplyInput) DeepCopyInto(out *OpenLdapTestAndApplyInput) { + *out = *in + in.LdapTestAndApplyInput.DeepCopyInto(&out.LdapTestAndApplyInput) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenLdapTestAndApplyInput. +func (in *OpenLdapTestAndApplyInput) DeepCopy() *OpenLdapTestAndApplyInput { + if in == nil { + return nil + } + out := new(OpenLdapTestAndApplyInput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenLdapTestAndApplyInput) 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 *OpenstackCloudProvider) DeepCopyInto(out *OpenstackCloudProvider) { *out = *in out.Global = in.Global out.LoadBalancer = in.LoadBalancer out.BlockStorage = in.BlockStorage - out.Router = in.Router + out.Route = in.Route out.Metadata = in.Metadata return } @@ -5367,6 +5611,29 @@ func (in *PrincipalList) DeepCopyObject() runtime.Object { } } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Principals) DeepCopyInto(out *Principals) { + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Principal, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Principals. +func (in *Principals) DeepCopy() *Principals { + if in == nil { + return nil + } + out := new(Principals) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrivateRegistry) DeepCopyInto(out *PrivateRegistry) { *out = *in @@ -6265,17 +6532,17 @@ func (in *RoleTemplateList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouterOpenstackOpts) DeepCopyInto(out *RouterOpenstackOpts) { +func (in *RouteOpenstackOpts) DeepCopyInto(out *RouteOpenstackOpts) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterOpenstackOpts. -func (in *RouterOpenstackOpts) DeepCopy() *RouterOpenstackOpts { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteOpenstackOpts. +func (in *RouteOpenstackOpts) DeepCopy() *RouteOpenstackOpts { if in == nil { return nil } - out := new(RouterOpenstackOpts) + out := new(RouteOpenstackOpts) in.DeepCopyInto(out) return out } @@ -7326,6 +7593,74 @@ func (in *User) DeepCopyObject() runtime.Object { } } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAttribute) DeepCopyInto(out *UserAttribute) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GroupPrincipals != nil { + in, out := &in.GroupPrincipals, &out.GroupPrincipals + *out = make(map[string]Principals, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAttribute. +func (in *UserAttribute) DeepCopy() *UserAttribute { + if in == nil { + return nil + } + out := new(UserAttribute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAttribute) 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 *UserAttributeList) DeepCopyInto(out *UserAttributeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]UserAttribute, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAttributeList. +func (in *UserAttributeList) DeepCopy() *UserAttributeList { + if in == nil { + return nil + } + out := new(UserAttributeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserAttributeList) 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 *UserList) DeepCopyInto(out *UserList) { *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 da2e5f23..4c40d353 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 @@ -39,9 +39,11 @@ type Interface interface { PrincipalsGetter UsersGetter AuthConfigsGetter + LdapConfigsGetter TokensGetter DynamicSchemasGetter PreferencesGetter + UserAttributesGetter ProjectNetworkPoliciesGetter ClusterLoggingsGetter ProjectLoggingsGetter @@ -88,9 +90,11 @@ type Client struct { principalControllers map[string]PrincipalController userControllers map[string]UserController authConfigControllers map[string]AuthConfigController + ldapConfigControllers map[string]LdapConfigController tokenControllers map[string]TokenController dynamicSchemaControllers map[string]DynamicSchemaController preferenceControllers map[string]PreferenceController + userAttributeControllers map[string]UserAttributeController projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController clusterLoggingControllers map[string]ClusterLoggingController projectLoggingControllers map[string]ProjectLoggingController @@ -146,9 +150,11 @@ func NewForConfig(config rest.Config) (Interface, error) { principalControllers: map[string]PrincipalController{}, userControllers: map[string]UserController{}, authConfigControllers: map[string]AuthConfigController{}, + ldapConfigControllers: map[string]LdapConfigController{}, tokenControllers: map[string]TokenController{}, dynamicSchemaControllers: map[string]DynamicSchemaController{}, preferenceControllers: map[string]PreferenceController{}, + userAttributeControllers: map[string]UserAttributeController{}, projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{}, clusterLoggingControllers: map[string]ClusterLoggingController{}, projectLoggingControllers: map[string]ProjectLoggingController{}, @@ -491,6 +497,19 @@ func (c *Client) AuthConfigs(namespace string) AuthConfigInterface { } } +type LdapConfigsGetter interface { + LdapConfigs(namespace string) LdapConfigInterface +} + +func (c *Client) LdapConfigs(namespace string) LdapConfigInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &LdapConfigResource, LdapConfigGroupVersionKind, ldapConfigFactory{}) + return &ldapConfigClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + type TokensGetter interface { Tokens(namespace string) TokenInterface } @@ -530,6 +549,19 @@ func (c *Client) Preferences(namespace string) PreferenceInterface { } } +type UserAttributesGetter interface { + UserAttributes(namespace string) UserAttributeInterface +} + +func (c *Client) UserAttributes(namespace string) UserAttributeInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &UserAttributeResource, UserAttributeGroupVersionKind, userAttributeFactory{}) + return &userAttributeClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + type ProjectNetworkPoliciesGetter interface { ProjectNetworkPolicies(namespace string) ProjectNetworkPolicyInterface } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go new file mode 100644 index 00000000..91a436c7 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go @@ -0,0 +1,251 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "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 ( + LdapConfigGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "LdapConfig", + } + LdapConfigResource = metav1.APIResource{ + Name: "ldapconfigs", + SingularName: "ldapconfig", + Namespaced: false, + Kind: LdapConfigGroupVersionKind.Kind, + } +) + +type LdapConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []LdapConfig +} + +type LdapConfigHandlerFunc func(key string, obj *LdapConfig) error + +type LdapConfigLister interface { + List(namespace string, selector labels.Selector) (ret []*LdapConfig, err error) + Get(namespace, name string) (*LdapConfig, error) +} + +type LdapConfigController interface { + Informer() cache.SharedIndexInformer + Lister() LdapConfigLister + AddHandler(name string, handler LdapConfigHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler LdapConfigHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type LdapConfigInterface interface { + ObjectClient() *objectclient.ObjectClient + Create(*LdapConfig) (*LdapConfig, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*LdapConfig, error) + Get(name string, opts metav1.GetOptions) (*LdapConfig, error) + Update(*LdapConfig) (*LdapConfig, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*LdapConfigList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() LdapConfigController + AddHandler(name string, sync LdapConfigHandlerFunc) + AddLifecycle(name string, lifecycle LdapConfigLifecycle) + AddClusterScopedHandler(name, clusterName string, sync LdapConfigHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle LdapConfigLifecycle) +} + +type ldapConfigLister struct { + controller *ldapConfigController +} + +func (l *ldapConfigLister) List(namespace string, selector labels.Selector) (ret []*LdapConfig, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*LdapConfig)) + }) + return +} + +func (l *ldapConfigLister) Get(namespace, name string) (*LdapConfig, 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: LdapConfigGroupVersionKind.Group, + Resource: "ldapConfig", + }, name) + } + return obj.(*LdapConfig), nil +} + +type ldapConfigController struct { + controller.GenericController +} + +func (c *ldapConfigController) Lister() LdapConfigLister { + return &ldapConfigLister{ + controller: c, + } +} + +func (c *ldapConfigController) AddHandler(name string, handler LdapConfigHandlerFunc) { + c.GenericController.AddHandler(name, 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.(*LdapConfig)) + }) +} + +func (c *ldapConfigController) AddClusterScopedHandler(name, cluster string, handler LdapConfigHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*LdapConfig)) + }) +} + +type ldapConfigFactory struct { +} + +func (c ldapConfigFactory) Object() runtime.Object { + return &LdapConfig{} +} + +func (c ldapConfigFactory) List() runtime.Object { + return &LdapConfigList{} +} + +func (s *ldapConfigClient) Controller() LdapConfigController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.ldapConfigControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(LdapConfigGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &ldapConfigController{ + GenericController: genericController, + } + + s.client.ldapConfigControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type ldapConfigClient struct { + client *Client + ns string + objectClient *objectclient.ObjectClient + controller LdapConfigController +} + +func (s *ldapConfigClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *ldapConfigClient) Create(o *LdapConfig) (*LdapConfig, error) { + obj, err := s.objectClient.Create(o) + return obj.(*LdapConfig), err +} + +func (s *ldapConfigClient) Get(name string, opts metav1.GetOptions) (*LdapConfig, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*LdapConfig), err +} + +func (s *ldapConfigClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*LdapConfig, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*LdapConfig), err +} + +func (s *ldapConfigClient) Update(o *LdapConfig) (*LdapConfig, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*LdapConfig), err +} + +func (s *ldapConfigClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *ldapConfigClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *ldapConfigClient) List(opts metav1.ListOptions) (*LdapConfigList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*LdapConfigList), err +} + +func (s *ldapConfigClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *ldapConfigClient) Patch(o *LdapConfig, data []byte, subresources ...string) (*LdapConfig, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*LdapConfig), err +} + +func (s *ldapConfigClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *ldapConfigClient) AddHandler(name string, sync LdapConfigHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *ldapConfigClient) AddLifecycle(name string, lifecycle LdapConfigLifecycle) { + sync := NewLdapConfigLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *ldapConfigClient) AddClusterScopedHandler(name, clusterName string, sync LdapConfigHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *ldapConfigClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle LdapConfigLifecycle) { + sync := NewLdapConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go new file mode 100644 index 00000000..beb2c4a5 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type LdapConfigLifecycle interface { + Create(obj *LdapConfig) (*LdapConfig, error) + Remove(obj *LdapConfig) (*LdapConfig, error) + Updated(obj *LdapConfig) (*LdapConfig, error) +} + +type ldapConfigLifecycleAdapter struct { + lifecycle LdapConfigLifecycle +} + +func (w *ldapConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*LdapConfig)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *ldapConfigLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*LdapConfig)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *ldapConfigLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*LdapConfig)) + if o == nil { + return nil, err + } + return o, err +} + +func NewLdapConfigLifecycleAdapter(name string, clusterScoped bool, client LdapConfigInterface, l LdapConfigLifecycle) LdapConfigHandlerFunc { + adapter := &ldapConfigLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *LdapConfig) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} 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 26ccca06..c5e13f14 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 @@ -81,12 +81,15 @@ func addKnownTypes(scheme *runtime.Scheme) error { &UserList{}, &AuthConfig{}, &AuthConfigList{}, + &LdapConfig{}, + &LdapConfigList{}, &Token{}, &TokenList{}, &DynamicSchema{}, &DynamicSchemaList{}, &Preference{}, &PreferenceList{}, + &UserAttribute{}, &ProjectNetworkPolicy{}, &ProjectNetworkPolicyList{}, &ClusterLogging{}, diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go new file mode 100644 index 00000000..43295fa3 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go @@ -0,0 +1,251 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "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 ( + UserAttributeGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "UserAttribute", + } + UserAttributeResource = metav1.APIResource{ + Name: "userattributes", + SingularName: "userattribute", + Namespaced: false, + Kind: UserAttributeGroupVersionKind.Kind, + } +) + +type UserAttributeList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []UserAttribute +} + +type UserAttributeHandlerFunc func(key string, obj *UserAttribute) error + +type UserAttributeLister interface { + List(namespace string, selector labels.Selector) (ret []*UserAttribute, err error) + Get(namespace, name string) (*UserAttribute, error) +} + +type UserAttributeController interface { + Informer() cache.SharedIndexInformer + Lister() UserAttributeLister + AddHandler(name string, handler UserAttributeHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler UserAttributeHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type UserAttributeInterface interface { + ObjectClient() *objectclient.ObjectClient + Create(*UserAttribute) (*UserAttribute, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*UserAttribute, error) + Get(name string, opts metav1.GetOptions) (*UserAttribute, error) + Update(*UserAttribute) (*UserAttribute, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*UserAttributeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() UserAttributeController + AddHandler(name string, sync UserAttributeHandlerFunc) + AddLifecycle(name string, lifecycle UserAttributeLifecycle) + AddClusterScopedHandler(name, clusterName string, sync UserAttributeHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle UserAttributeLifecycle) +} + +type userAttributeLister struct { + controller *userAttributeController +} + +func (l *userAttributeLister) List(namespace string, selector labels.Selector) (ret []*UserAttribute, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*UserAttribute)) + }) + return +} + +func (l *userAttributeLister) Get(namespace, name string) (*UserAttribute, 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: UserAttributeGroupVersionKind.Group, + Resource: "userAttribute", + }, name) + } + return obj.(*UserAttribute), nil +} + +type userAttributeController struct { + controller.GenericController +} + +func (c *userAttributeController) Lister() UserAttributeLister { + return &userAttributeLister{ + controller: c, + } +} + +func (c *userAttributeController) AddHandler(name string, handler UserAttributeHandlerFunc) { + c.GenericController.AddHandler(name, 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.(*UserAttribute)) + }) +} + +func (c *userAttributeController) AddClusterScopedHandler(name, cluster string, handler UserAttributeHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*UserAttribute)) + }) +} + +type userAttributeFactory struct { +} + +func (c userAttributeFactory) Object() runtime.Object { + return &UserAttribute{} +} + +func (c userAttributeFactory) List() runtime.Object { + return &UserAttributeList{} +} + +func (s *userAttributeClient) Controller() UserAttributeController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.userAttributeControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(UserAttributeGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &userAttributeController{ + GenericController: genericController, + } + + s.client.userAttributeControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type userAttributeClient struct { + client *Client + ns string + objectClient *objectclient.ObjectClient + controller UserAttributeController +} + +func (s *userAttributeClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *userAttributeClient) Create(o *UserAttribute) (*UserAttribute, error) { + obj, err := s.objectClient.Create(o) + return obj.(*UserAttribute), err +} + +func (s *userAttributeClient) Get(name string, opts metav1.GetOptions) (*UserAttribute, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*UserAttribute), err +} + +func (s *userAttributeClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*UserAttribute, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*UserAttribute), err +} + +func (s *userAttributeClient) Update(o *UserAttribute) (*UserAttribute, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*UserAttribute), err +} + +func (s *userAttributeClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *userAttributeClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *userAttributeClient) List(opts metav1.ListOptions) (*UserAttributeList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*UserAttributeList), err +} + +func (s *userAttributeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *userAttributeClient) Patch(o *UserAttribute, data []byte, subresources ...string) (*UserAttribute, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*UserAttribute), err +} + +func (s *userAttributeClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *userAttributeClient) AddHandler(name string, sync UserAttributeHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *userAttributeClient) AddLifecycle(name string, lifecycle UserAttributeLifecycle) { + sync := NewUserAttributeLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *userAttributeClient) AddClusterScopedHandler(name, clusterName string, sync UserAttributeHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *userAttributeClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle UserAttributeLifecycle) { + sync := NewUserAttributeLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go new file mode 100644 index 00000000..04050120 --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type UserAttributeLifecycle interface { + Create(obj *UserAttribute) (*UserAttribute, error) + Remove(obj *UserAttribute) (*UserAttribute, error) + Updated(obj *UserAttribute) (*UserAttribute, error) +} + +type userAttributeLifecycleAdapter struct { + lifecycle UserAttributeLifecycle +} + +func (w *userAttributeLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*UserAttribute)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *userAttributeLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*UserAttribute)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *userAttributeLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*UserAttribute)) + if o == nil { + return nil, err + } + return o, err +} + +func NewUserAttributeLifecycleAdapter(name string, clusterScoped bool, client UserAttributeInterface, l UserAttributeLifecycle) UserAttributeHandlerFunc { + adapter := &userAttributeLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *UserAttribute) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/vendor/github.com/rancher/types/vendor.conf b/vendor/github.com/rancher/types/vendor.conf index 1a855725..928538dd 100644 --- a/vendor/github.com/rancher/types/vendor.conf +++ b/vendor/github.com/rancher/types/vendor.conf @@ -7,4 +7,4 @@ golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6 -github.com/rancher/norman d70f95a3d6fc13a9f4554e74b838771ea7c928b2 +github.com/rancher/norman e03c72e8551d1c8f51270da0faa40b1235d03e1c