mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #55017 from nikhita/remove-tpr-extensions
Automatic merge from submit-queue (batch tested with PRs 51401, 54056, 54977, 55017, 55052). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. extensions: remove TPR remnants The extensions group still had the TPR types + generated client. Having this in the codebase doesn't create any problems but would be good to clean up, especially since TPR access has been removed in 1.8. **Release note**: ```release-note NONE ``` /assign @sttts @deads2k
This commit is contained in:
commit
6f98cc9f6a
@ -56,9 +56,6 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
|
||||
"PodProxyOptions",
|
||||
"NodeProxyOptions",
|
||||
"ServiceProxyOptions",
|
||||
"ThirdPartyResource",
|
||||
"ThirdPartyResourceData",
|
||||
"ThirdPartyResourceList",
|
||||
),
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
|
@ -38,7 +38,7 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: extensions.GroupName,
|
||||
VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
|
||||
RootScopedKinds: sets.NewString("PodSecurityPolicy", "ThirdPartyResource"),
|
||||
RootScopedKinds: sets.NewString("PodSecurityPolicy"),
|
||||
AddInternalObjectsToScheme: extensions.AddToScheme,
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
|
@ -52,12 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&DeploymentRollback{},
|
||||
&ReplicationControllerDummy{},
|
||||
&Scale{},
|
||||
&ThirdPartyResource{},
|
||||
&ThirdPartyResourceList{},
|
||||
&DaemonSetList{},
|
||||
&DaemonSet{},
|
||||
&ThirdPartyResourceData{},
|
||||
&ThirdPartyResourceDataList{},
|
||||
&Ingress{},
|
||||
&IngressList{},
|
||||
&ReplicaSet{},
|
||||
|
@ -110,61 +110,6 @@ type CustomMetricCurrentStatusList struct {
|
||||
Items []CustomMetricCurrentStatus
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
type ThirdPartyResource struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Description is the description of this object.
|
||||
// +optional
|
||||
Description string
|
||||
|
||||
// Versions are versions for this third party object
|
||||
Versions []APIVersion
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
type ThirdPartyResourceList struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of horizontal pod autoscalers.
|
||||
Items []ThirdPartyResource
|
||||
}
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
// TODO: we should consider merge this struct with GroupVersion in metav1.go
|
||||
type APIVersion struct {
|
||||
// Name of this version (e.g. 'v1').
|
||||
Name string
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
type ThirdPartyResourceData struct {
|
||||
metav1.TypeMeta
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
|
||||
// Data is the raw JSON data for this data.
|
||||
// +optional
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale
|
||||
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
|
||||
@ -573,18 +518,6 @@ type DaemonSetList struct {
|
||||
Items []DaemonSet
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
type ThirdPartyResourceDataList struct {
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
// Items is a list of third party objects
|
||||
Items []ThirdPartyResourceData
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
|
120
pkg/apis/extensions/v1beta1/zz_generated.conversion.go
generated
120
pkg/apis/extensions/v1beta1/zz_generated.conversion.go
generated
@ -40,8 +40,6 @@ func init() {
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedConversionFuncs(
|
||||
Convert_v1beta1_APIVersion_To_extensions_APIVersion,
|
||||
Convert_extensions_APIVersion_To_v1beta1_APIVersion,
|
||||
Convert_v1beta1_AllowedHostPath_To_extensions_AllowedHostPath,
|
||||
Convert_extensions_AllowedHostPath_To_v1beta1_AllowedHostPath,
|
||||
Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus,
|
||||
@ -136,37 +134,9 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
|
||||
Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions,
|
||||
Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions,
|
||||
Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource,
|
||||
Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource,
|
||||
Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData,
|
||||
Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData,
|
||||
Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList,
|
||||
Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList,
|
||||
Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList,
|
||||
Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList,
|
||||
)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *v1beta1.APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_APIVersion_To_extensions_APIVersion is an autogenerated conversion function.
|
||||
func Convert_v1beta1_APIVersion_To_extensions_APIVersion(in *v1beta1.APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *v1beta1.APIVersion, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_extensions_APIVersion_To_v1beta1_APIVersion is an autogenerated conversion function.
|
||||
func Convert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *v1beta1.APIVersion, s conversion.Scope) error {
|
||||
return autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_AllowedHostPath_To_extensions_AllowedHostPath(in *v1beta1.AllowedHostPath, out *extensions.AllowedHostPath, s conversion.Scope) error {
|
||||
out.PathPrefix = in.PathPrefix
|
||||
return nil
|
||||
@ -1474,93 +1444,3 @@ func autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_Supplem
|
||||
func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *v1beta1.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
|
||||
return autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *v1beta1.ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Description = in.Description
|
||||
out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource is an autogenerated conversion function.
|
||||
func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *v1beta1.ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *v1beta1.ThirdPartyResource, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Description = in.Description
|
||||
out.Versions = *(*[]v1beta1.APIVersion)(unsafe.Pointer(&in.Versions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource is an autogenerated conversion function.
|
||||
func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *v1beta1.ThirdPartyResource, s conversion.Scope) error {
|
||||
return autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *v1beta1.ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData is an autogenerated conversion function.
|
||||
func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *v1beta1.ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *v1beta1.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData is an autogenerated conversion function.
|
||||
func Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *v1beta1.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
return autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *v1beta1.ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]extensions.ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *v1beta1.ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *v1beta1.ThirdPartyResourceDataList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1beta1.ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList is an autogenerated conversion function.
|
||||
func Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *v1beta1.ThirdPartyResourceDataList, s conversion.Scope) error {
|
||||
return autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *v1beta1.ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]extensions.ThirdPartyResource)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList is an autogenerated conversion function.
|
||||
func Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *v1beta1.ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *v1beta1.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v1beta1.ThirdPartyResource)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList is an autogenerated conversion function.
|
||||
func Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *v1beta1.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
return autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in, out, s)
|
||||
}
|
||||
|
168
pkg/apis/extensions/zz_generated.deepcopy.go
generated
168
pkg/apis/extensions/zz_generated.deepcopy.go
generated
@ -38,10 +38,6 @@ func init() {
|
||||
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*APIVersion).DeepCopyInto(out.(*APIVersion))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&APIVersion{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AllowedHostPath).DeepCopyInto(out.(*AllowedHostPath))
|
||||
return nil
|
||||
@ -234,22 +230,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
in.(*SupplementalGroupsStrategyOptions).DeepCopyInto(out.(*SupplementalGroupsStrategyOptions))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResource).DeepCopyInto(out.(*ThirdPartyResource))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceData).DeepCopyInto(out.(*ThirdPartyResourceData))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceDataList).DeepCopyInto(out.(*ThirdPartyResourceDataList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceList).DeepCopyInto(out.(*ThirdPartyResourceList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*UserIDRange).DeepCopyInto(out.(*UserIDRange))
|
||||
return nil
|
||||
@ -257,22 +237,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
)
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIVersion) DeepCopyInto(out *APIVersion) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersion.
|
||||
func (in *APIVersion) DeepCopy() *APIVersion {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIVersion)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AllowedHostPath) DeepCopyInto(out *AllowedHostPath) {
|
||||
*out = *in
|
||||
@ -1498,138 +1462,6 @@ func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrat
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ThirdPartyResource) DeepCopyInto(out *ThirdPartyResource) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Versions != nil {
|
||||
in, out := &in.Versions, &out.Versions
|
||||
*out = make([]APIVersion, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResource.
|
||||
func (in *ThirdPartyResource) DeepCopy() *ThirdPartyResource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResource) 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 *ThirdPartyResourceData) DeepCopyInto(out *ThirdPartyResourceData) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Data != nil {
|
||||
in, out := &in.Data, &out.Data
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceData.
|
||||
func (in *ThirdPartyResourceData) DeepCopy() *ThirdPartyResourceData {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceData)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceData) 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 *ThirdPartyResourceDataList) DeepCopyInto(out *ThirdPartyResourceDataList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ThirdPartyResourceData, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceDataList.
|
||||
func (in *ThirdPartyResourceDataList) DeepCopy() *ThirdPartyResourceDataList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceDataList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceDataList) 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 *ThirdPartyResourceList) DeepCopyInto(out *ThirdPartyResourceList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ThirdPartyResource, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceList.
|
||||
func (in *ThirdPartyResourceList) DeepCopy() *ThirdPartyResourceList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceList) 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 *UserIDRange) DeepCopyInto(out *UserIDRange) {
|
||||
*out = *in
|
||||
|
@ -19,7 +19,6 @@ go_library(
|
||||
"replicaset.go",
|
||||
"scale.go",
|
||||
"scale_expansion.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion",
|
||||
deps = [
|
||||
|
@ -29,7 +29,6 @@ type ExtensionsInterface interface {
|
||||
PodSecurityPoliciesGetter
|
||||
ReplicaSetsGetter
|
||||
ScalesGetter
|
||||
ThirdPartyResourcesGetter
|
||||
}
|
||||
|
||||
// ExtensionsClient is used to interact with features provided by the extensions group.
|
||||
@ -61,10 +60,6 @@ func (c *ExtensionsClient) Scales(namespace string) ScaleInterface {
|
||||
return newScales(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface {
|
||||
return newThirdPartyResources(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ExtensionsClient for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ExtensionsClient, error) {
|
||||
config := *c
|
||||
|
@ -18,7 +18,6 @@ go_library(
|
||||
"fake_replicaset.go",
|
||||
"fake_scale.go",
|
||||
"fake_scale_expansion.go",
|
||||
"fake_thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake",
|
||||
deps = [
|
||||
|
@ -50,10 +50,6 @@ func (c *FakeExtensions) Scales(namespace string) internalversion.ScaleInterface
|
||||
return &FakeScales{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeExtensions) ThirdPartyResources() internalversion.ThirdPartyResourceInterface {
|
||||
return &FakeThirdPartyResources{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeExtensions) RESTClient() rest.Interface {
|
||||
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
)
|
||||
|
||||
// FakeThirdPartyResources implements ThirdPartyResourceInterface
|
||||
type FakeThirdPartyResources struct {
|
||||
Fake *FakeExtensions
|
||||
}
|
||||
|
||||
var thirdpartyresourcesResource = schema.GroupVersionResource{Group: "extensions", Version: "", Resource: "thirdpartyresources"}
|
||||
|
||||
var thirdpartyresourcesKind = schema.GroupVersionKind{Group: "extensions", Version: "", Kind: "ThirdPartyResource"}
|
||||
|
||||
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
|
||||
func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
|
||||
func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(thirdpartyresourcesResource, thirdpartyresourcesKind, opts), &extensions.ThirdPartyResourceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &extensions.ThirdPartyResourceList{}
|
||||
for _, item := range obj.(*extensions.ThirdPartyResourceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *FakeThirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched thirdPartyResource.
|
||||
func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &extensions.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.ThirdPartyResource), err
|
||||
}
|
@ -23,5 +23,3 @@ type IngressExpansion interface{}
|
||||
type PodSecurityPolicyExpansion interface{}
|
||||
|
||||
type ReplicaSetExpansion interface{}
|
||||
|
||||
type ThirdPartyResourceExpansion interface{}
|
||||
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
|
||||
)
|
||||
|
||||
// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ThirdPartyResourcesGetter interface {
|
||||
ThirdPartyResources() ThirdPartyResourceInterface
|
||||
}
|
||||
|
||||
// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
|
||||
type ThirdPartyResourceInterface interface {
|
||||
Create(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
|
||||
Update(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*extensions.ThirdPartyResource, error)
|
||||
List(opts v1.ListOptions) (*extensions.ThirdPartyResourceList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error)
|
||||
ThirdPartyResourceExpansion
|
||||
}
|
||||
|
||||
// thirdPartyResources implements ThirdPartyResourceInterface
|
||||
type thirdPartyResources struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newThirdPartyResources returns a ThirdPartyResources
|
||||
func newThirdPartyResources(c *ExtensionsClient) *thirdPartyResources {
|
||||
return &thirdPartyResources{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
|
||||
func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *extensions.ThirdPartyResource, err error) {
|
||||
result = &extensions.ThirdPartyResource{}
|
||||
err = c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
|
||||
func (c *thirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
|
||||
result = &extensions.ThirdPartyResourceList{}
|
||||
err = c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *thirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
result = &extensions.ThirdPartyResource{}
|
||||
err = c.client.Post().
|
||||
Resource("thirdpartyresources").
|
||||
Body(thirdPartyResource).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *thirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
result = &extensions.ThirdPartyResource{}
|
||||
err = c.client.Put().
|
||||
Resource("thirdpartyresources").
|
||||
Name(thirdPartyResource.Name).
|
||||
Body(thirdPartyResource).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
|
||||
func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("thirdpartyresources").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched thirdPartyResource.
|
||||
func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) {
|
||||
result = &extensions.ThirdPartyResource{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("thirdpartyresources").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -14,7 +14,6 @@ go_library(
|
||||
"interface.go",
|
||||
"podsecuritypolicy.go",
|
||||
"replicaset.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/extensions/internalversion",
|
||||
deps = [
|
||||
|
@ -34,8 +34,6 @@ type Interface interface {
|
||||
PodSecurityPolicies() PodSecurityPolicyInformer
|
||||
// ReplicaSets returns a ReplicaSetInformer.
|
||||
ReplicaSets() ReplicaSetInformer
|
||||
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||
ThirdPartyResources() ThirdPartyResourceInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -71,8 +69,3 @@ func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
|
||||
func (v *version) ReplicaSets() ReplicaSetInformer {
|
||||
return &replicaSetInformer{factory: v.SharedInformerFactory}
|
||||
}
|
||||
|
||||
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||
func (v *version) ThirdPartyResources() ThirdPartyResourceInformer {
|
||||
return &thirdPartyResourceInformer{factory: v.SharedInformerFactory}
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was automatically generated by informer-gen
|
||||
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||
internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
|
||||
internalversion "k8s.io/kubernetes/pkg/client/listers/extensions/internalversion"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ThirdPartyResourceInformer provides access to a shared informer and lister for
|
||||
// ThirdPartyResources.
|
||||
type ThirdPartyResourceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() internalversion.ThirdPartyResourceLister
|
||||
}
|
||||
|
||||
type thirdPartyResourceInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
}
|
||||
|
||||
// NewThirdPartyResourceInformer constructs a new informer for ThirdPartyResource type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewThirdPartyResourceInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
return client.Extensions().ThirdPartyResources().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
return client.Extensions().ThirdPartyResources().Watch(options)
|
||||
},
|
||||
},
|
||||
&extensions.ThirdPartyResource{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func defaultThirdPartyResourceInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewThirdPartyResourceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||
}
|
||||
|
||||
func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&extensions.ThirdPartyResource{}, defaultThirdPartyResourceInformer)
|
||||
}
|
||||
|
||||
func (f *thirdPartyResourceInformer) Lister() internalversion.ThirdPartyResourceLister {
|
||||
return internalversion.NewThirdPartyResourceLister(f.Informer().GetIndexer())
|
||||
}
|
@ -134,8 +134,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().InternalVersion().PodSecurityPolicies().Informer()}, nil
|
||||
case extensions.SchemeGroupVersion.WithResource("replicasets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().InternalVersion().ReplicaSets().Informer()}, nil
|
||||
case extensions.SchemeGroupVersion.WithResource("thirdpartyresources"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().InternalVersion().ThirdPartyResources().Informer()}, nil
|
||||
|
||||
// Group=Networking, Version=InternalVersion
|
||||
case networking.SchemeGroupVersion.WithResource("networkpolicies"):
|
||||
|
@ -19,7 +19,6 @@ go_library(
|
||||
"replicaset.go",
|
||||
"replicaset_expansion.go",
|
||||
"scale.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/client/listers/extensions/internalversion",
|
||||
deps = [
|
||||
|
@ -37,7 +37,3 @@ type ScaleListerExpansion interface{}
|
||||
// ScaleNamespaceListerExpansion allows custom methods to be added to
|
||||
// ScaleNamespaceLister.
|
||||
type ScaleNamespaceListerExpansion interface{}
|
||||
|
||||
// ThirdPartyResourceListerExpansion allows custom methods to be added to
|
||||
// ThirdPartyResourceLister.
|
||||
type ThirdPartyResourceListerExpansion interface{}
|
||||
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was automatically generated by lister-gen
|
||||
|
||||
package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
)
|
||||
|
||||
// ThirdPartyResourceLister helps list ThirdPartyResources.
|
||||
type ThirdPartyResourceLister interface {
|
||||
// List lists all ThirdPartyResources in the indexer.
|
||||
List(selector labels.Selector) (ret []*extensions.ThirdPartyResource, err error)
|
||||
// Get retrieves the ThirdPartyResource from the index for a given name.
|
||||
Get(name string) (*extensions.ThirdPartyResource, error)
|
||||
ThirdPartyResourceListerExpansion
|
||||
}
|
||||
|
||||
// thirdPartyResourceLister implements the ThirdPartyResourceLister interface.
|
||||
type thirdPartyResourceLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister.
|
||||
func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister {
|
||||
return &thirdPartyResourceLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ThirdPartyResources in the indexer.
|
||||
func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*extensions.ThirdPartyResource, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*extensions.ThirdPartyResource))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ThirdPartyResource from the index for a given name.
|
||||
func (s *thirdPartyResourceLister) Get(name string) (*extensions.ThirdPartyResource, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(extensions.Resource("thirdpartyresource"), name)
|
||||
}
|
||||
return obj.(*extensions.ThirdPartyResource), nil
|
||||
}
|
@ -81,9 +81,6 @@ func init() {
|
||||
"PodProxyOptions",
|
||||
"NodeProxyOptions",
|
||||
"ServiceProxyOptions",
|
||||
"ThirdPartyResource",
|
||||
"ThirdPartyResourceData",
|
||||
"ThirdPartyResourceList",
|
||||
),
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
@ -205,7 +202,7 @@ func init() {
|
||||
&announced.GroupMetaFactoryArgs{
|
||||
GroupName: extensionsv1beta1.GroupName,
|
||||
VersionPreferenceOrder: []string{extensionsv1beta1.SchemeGroupVersion.Version},
|
||||
RootScopedKinds: sets.NewString("PodSecurityPolicy", "ThirdPartyResource"),
|
||||
RootScopedKinds: sets.NewString("PodSecurityPolicy"),
|
||||
},
|
||||
announced.VersionToSchemeFunc{
|
||||
extensionsv1beta1.SchemeGroupVersion.Version: extensionsv1beta1.AddToScheme,
|
||||
|
@ -303,15 +303,6 @@ func AddHandlers(h printers.PrintHandler) {
|
||||
h.TableHandler(componentStatusColumnDefinitions, printComponentStatus)
|
||||
h.TableHandler(componentStatusColumnDefinitions, printComponentStatusList)
|
||||
|
||||
thirdPartyResourceColumnDefinitions := []metav1alpha1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
||||
{Name: "Description", Type: "string", Description: extensionsv1beta1.ThirdPartyResource{}.SwaggerDoc()["description"]},
|
||||
{Name: "Version(s)", Type: "string", Description: extensionsv1beta1.ThirdPartyResource{}.SwaggerDoc()["versions"]},
|
||||
}
|
||||
|
||||
h.TableHandler(thirdPartyResourceColumnDefinitions, printThirdPartyResource)
|
||||
h.TableHandler(thirdPartyResourceColumnDefinitions, printThirdPartyResourceList)
|
||||
|
||||
deploymentColumnDefinitions := []metav1alpha1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
||||
{Name: "Desired", Type: "string", Description: extensionsv1beta1.DeploymentSpec{}.SwaggerDoc()["replicas"]},
|
||||
@ -1435,33 +1426,6 @@ func printComponentStatusList(list *api.ComponentStatusList, options printers.Pr
|
||||
return rows, nil
|
||||
}
|
||||
|
||||
func printThirdPartyResource(obj *extensions.ThirdPartyResource, options printers.PrintOptions) ([]metav1alpha1.TableRow, error) {
|
||||
row := metav1alpha1.TableRow{
|
||||
Object: runtime.RawExtension{Object: obj},
|
||||
}
|
||||
|
||||
versions := make([]string, len(obj.Versions))
|
||||
for ix := range obj.Versions {
|
||||
version := &obj.Versions[ix]
|
||||
versions[ix] = fmt.Sprintf("%s", version.Name)
|
||||
}
|
||||
versionsString := strings.Join(versions, ",")
|
||||
row.Cells = append(row.Cells, obj.Name, obj.Description, versionsString)
|
||||
return []metav1alpha1.TableRow{row}, nil
|
||||
}
|
||||
|
||||
func printThirdPartyResourceList(list *extensions.ThirdPartyResourceList, options printers.PrintOptions) ([]metav1alpha1.TableRow, error) {
|
||||
rows := make([]metav1alpha1.TableRow, 0, len(list.Items))
|
||||
for i := range list.Items {
|
||||
r, err := printThirdPartyResource(&list.Items[i], options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rows = append(rows, r...)
|
||||
}
|
||||
return rows, nil
|
||||
}
|
||||
|
||||
func truncate(str string, maxLen int) string {
|
||||
if len(str) > maxLen {
|
||||
return str[0:maxLen] + "..."
|
||||
|
1441
staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go
generated
1441
staging/src/k8s.io/api/extensions/v1beta1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@ -32,13 +32,6 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
message APIVersion {
|
||||
// Name of this version (e.g. 'v1').
|
||||
// +optional
|
||||
optional string name = 1;
|
||||
}
|
||||
|
||||
// defines the host volume conditions that will be enabled by a policy
|
||||
// for pods to use. It requires the path prefix to be defined.
|
||||
message AllowedHostPath {
|
||||
@ -1074,51 +1067,3 @@ message SupplementalGroupsStrategyOptions {
|
||||
repeated IDRange ranges = 2;
|
||||
}
|
||||
|
||||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
message ThirdPartyResource {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Description is the description of this object.
|
||||
// +optional
|
||||
optional string description = 2;
|
||||
|
||||
// Versions are versions for this third party object
|
||||
// +optional
|
||||
repeated APIVersion versions = 3;
|
||||
}
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
message ThirdPartyResourceData {
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Data is the raw JSON data for this data.
|
||||
// +optional
|
||||
optional bytes data = 2;
|
||||
}
|
||||
|
||||
// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
|
||||
message ThirdPartyResourceDataList {
|
||||
// Standard list metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of ThirdpartyResourceData.
|
||||
repeated ThirdPartyResourceData items = 2;
|
||||
}
|
||||
|
||||
// ThirdPartyResourceList is a list of ThirdPartyResources.
|
||||
message ThirdPartyResourceList {
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of ThirdPartyResources.
|
||||
repeated ThirdPartyResource items = 2;
|
||||
}
|
||||
|
||||
|
@ -49,12 +49,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&DeploymentRollback{},
|
||||
&ReplicationControllerDummy{},
|
||||
&Scale{},
|
||||
&ThirdPartyResource{},
|
||||
&ThirdPartyResourceList{},
|
||||
&DaemonSetList{},
|
||||
&DaemonSet{},
|
||||
&ThirdPartyResourceData{},
|
||||
&ThirdPartyResourceDataList{},
|
||||
&Ingress{},
|
||||
&IngressList{},
|
||||
&ReplicaSet{},
|
||||
|
@ -100,63 +100,6 @@ type CustomMetricCurrentStatusList struct {
|
||||
Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
type ThirdPartyResource struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Description is the description of this object.
|
||||
// +optional
|
||||
Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
|
||||
|
||||
// Versions are versions for this third party object
|
||||
// +optional
|
||||
Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ThirdPartyResourceList is a list of ThirdPartyResources.
|
||||
type ThirdPartyResourceList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of ThirdPartyResources.
|
||||
Items []ThirdPartyResource `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
type APIVersion struct {
|
||||
// Name of this version (e.g. 'v1').
|
||||
// +optional
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
type ThirdPartyResourceData struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Data is the raw JSON data for this data.
|
||||
// +optional
|
||||
Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale
|
||||
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
|
||||
@ -588,20 +531,6 @@ type DaemonSetList struct {
|
||||
Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
|
||||
type ThirdPartyResourceDataList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of ThirdpartyResourceData.
|
||||
Items []ThirdPartyResourceData `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
|
@ -27,15 +27,6 @@ package v1beta1
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
var map_APIVersion = map[string]string{
|
||||
"": "An APIVersion represents a single concrete version of an object model.",
|
||||
"name": "Name of this version (e.g. 'v1').",
|
||||
}
|
||||
|
||||
func (APIVersion) SwaggerDoc() map[string]string {
|
||||
return map_APIVersion
|
||||
}
|
||||
|
||||
var map_AllowedHostPath = map[string]string{
|
||||
"": "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.",
|
||||
"pathPrefix": "is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`",
|
||||
@ -623,45 +614,4 @@ func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
|
||||
return map_SupplementalGroupsStrategyOptions
|
||||
}
|
||||
|
||||
var map_ThirdPartyResource = map[string]string{
|
||||
"": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.",
|
||||
"metadata": "Standard object metadata",
|
||||
"description": "Description is the description of this object.",
|
||||
"versions": "Versions are versions for this third party object",
|
||||
}
|
||||
|
||||
func (ThirdPartyResource) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResource
|
||||
}
|
||||
|
||||
var map_ThirdPartyResourceData = map[string]string{
|
||||
"": "An internal object, used for versioned storage in etcd. Not exposed to the end user.",
|
||||
"metadata": "Standard object metadata.",
|
||||
"data": "Data is the raw JSON data for this data.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResourceData) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResourceData
|
||||
}
|
||||
|
||||
var map_ThirdPartyResourceDataList = map[string]string{
|
||||
"": "ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.",
|
||||
"metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is the list of ThirdpartyResourceData.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResourceDataList) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResourceDataList
|
||||
}
|
||||
|
||||
var map_ThirdPartyResourceList = map[string]string{
|
||||
"": "ThirdPartyResourceList is a list of ThirdPartyResources.",
|
||||
"metadata": "Standard list metadata.",
|
||||
"items": "Items is the list of ThirdPartyResources.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResourceList) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResourceList
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
|
@ -39,10 +39,6 @@ func init() {
|
||||
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*APIVersion).DeepCopyInto(out.(*APIVersion))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&APIVersion{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AllowedHostPath).DeepCopyInto(out.(*AllowedHostPath))
|
||||
return nil
|
||||
@ -267,41 +263,9 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
in.(*SupplementalGroupsStrategyOptions).DeepCopyInto(out.(*SupplementalGroupsStrategyOptions))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResource).DeepCopyInto(out.(*ThirdPartyResource))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceData).DeepCopyInto(out.(*ThirdPartyResourceData))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceDataList).DeepCopyInto(out.(*ThirdPartyResourceDataList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ThirdPartyResourceList).DeepCopyInto(out.(*ThirdPartyResourceList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
|
||||
)
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIVersion) DeepCopyInto(out *APIVersion) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersion.
|
||||
func (in *APIVersion) DeepCopy() *APIVersion {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIVersion)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AllowedHostPath) DeepCopyInto(out *AllowedHostPath) {
|
||||
*out = *in
|
||||
@ -1831,135 +1795,3 @@ func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrat
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ThirdPartyResource) DeepCopyInto(out *ThirdPartyResource) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Versions != nil {
|
||||
in, out := &in.Versions, &out.Versions
|
||||
*out = make([]APIVersion, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResource.
|
||||
func (in *ThirdPartyResource) DeepCopy() *ThirdPartyResource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResource) 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 *ThirdPartyResourceData) DeepCopyInto(out *ThirdPartyResourceData) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Data != nil {
|
||||
in, out := &in.Data, &out.Data
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceData.
|
||||
func (in *ThirdPartyResourceData) DeepCopy() *ThirdPartyResourceData {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceData)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceData) 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 *ThirdPartyResourceDataList) DeepCopyInto(out *ThirdPartyResourceDataList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ThirdPartyResourceData, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceDataList.
|
||||
func (in *ThirdPartyResourceDataList) DeepCopy() *ThirdPartyResourceDataList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceDataList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceDataList) 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 *ThirdPartyResourceList) DeepCopyInto(out *ThirdPartyResourceList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ThirdPartyResource, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdPartyResourceList.
|
||||
func (in *ThirdPartyResourceList) DeepCopy() *ThirdPartyResourceList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ThirdPartyResourceList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ThirdPartyResourceList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ go_library(
|
||||
"interface.go",
|
||||
"podsecuritypolicy.go",
|
||||
"replicaset.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/informers/extensions/v1beta1",
|
||||
deps = [
|
||||
|
@ -34,8 +34,6 @@ type Interface interface {
|
||||
PodSecurityPolicies() PodSecurityPolicyInformer
|
||||
// ReplicaSets returns a ReplicaSetInformer.
|
||||
ReplicaSets() ReplicaSetInformer
|
||||
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||
ThirdPartyResources() ThirdPartyResourceInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -71,8 +69,3 @@ func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
|
||||
func (v *version) ReplicaSets() ReplicaSetInformer {
|
||||
return &replicaSetInformer{factory: v.SharedInformerFactory}
|
||||
}
|
||||
|
||||
// ThirdPartyResources returns a ThirdPartyResourceInformer.
|
||||
func (v *version) ThirdPartyResources() ThirdPartyResourceInformer {
|
||||
return &thirdPartyResourceInformer{factory: v.SharedInformerFactory}
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was automatically generated by informer-gen
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// ThirdPartyResourceInformer provides access to a shared informer and lister for
|
||||
// ThirdPartyResources.
|
||||
type ThirdPartyResourceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.ThirdPartyResourceLister
|
||||
}
|
||||
|
||||
type thirdPartyResourceInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
}
|
||||
|
||||
// NewThirdPartyResourceInformer constructs a new informer for ThirdPartyResource type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
return client.ExtensionsV1beta1().ThirdPartyResources().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
return client.ExtensionsV1beta1().ThirdPartyResources().Watch(options)
|
||||
},
|
||||
},
|
||||
&extensions_v1beta1.ThirdPartyResource{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func defaultThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewThirdPartyResourceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||
}
|
||||
|
||||
func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&extensions_v1beta1.ThirdPartyResource{}, defaultThirdPartyResourceInformer)
|
||||
}
|
||||
|
||||
func (f *thirdPartyResourceInformer) Lister() v1beta1.ThirdPartyResourceLister {
|
||||
return v1beta1.NewThirdPartyResourceLister(f.Informer().GetIndexer())
|
||||
}
|
@ -170,8 +170,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil
|
||||
case extensions_v1beta1.SchemeGroupVersion.WithResource("replicasets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
|
||||
case extensions_v1beta1.SchemeGroupVersion.WithResource("thirdpartyresources"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ThirdPartyResources().Informer()}, nil
|
||||
|
||||
// Group=Networking, Version=V1
|
||||
case networking_v1.SchemeGroupVersion.WithResource("networkpolicies"):
|
||||
|
@ -19,7 +19,6 @@ go_library(
|
||||
"replicaset.go",
|
||||
"scale.go",
|
||||
"scale_expansion.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1",
|
||||
deps = [
|
||||
|
@ -31,7 +31,6 @@ type ExtensionsV1beta1Interface interface {
|
||||
PodSecurityPoliciesGetter
|
||||
ReplicaSetsGetter
|
||||
ScalesGetter
|
||||
ThirdPartyResourcesGetter
|
||||
}
|
||||
|
||||
// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
|
||||
@ -63,10 +62,6 @@ func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface {
|
||||
return newScales(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterface {
|
||||
return newThirdPartyResources(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
|
||||
config := *c
|
||||
|
@ -18,7 +18,6 @@ go_library(
|
||||
"fake_replicaset.go",
|
||||
"fake_scale.go",
|
||||
"fake_scale_expansion.go",
|
||||
"fake_thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake",
|
||||
deps = [
|
||||
|
@ -50,10 +50,6 @@ func (c *FakeExtensionsV1beta1) Scales(namespace string) v1beta1.ScaleInterface
|
||||
return &FakeScales{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeExtensionsV1beta1) ThirdPartyResources() v1beta1.ThirdPartyResourceInterface {
|
||||
return &FakeThirdPartyResources{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface {
|
||||
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeThirdPartyResources implements ThirdPartyResourceInterface
|
||||
type FakeThirdPartyResources struct {
|
||||
Fake *FakeExtensionsV1beta1
|
||||
}
|
||||
|
||||
var thirdpartyresourcesResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "thirdpartyresources"}
|
||||
|
||||
var thirdpartyresourcesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "ThirdPartyResource"}
|
||||
|
||||
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
|
||||
func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
|
||||
func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(thirdpartyresourcesResource, thirdpartyresourcesKind, opts), &v1beta1.ThirdPartyResourceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.ThirdPartyResourceList{}
|
||||
for _, item := range obj.(*v1beta1.ThirdPartyResourceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ThirdPartyResource), err
|
||||
}
|
||||
|
||||
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched thirdPartyResource.
|
||||
func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &v1beta1.ThirdPartyResource{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ThirdPartyResource), err
|
||||
}
|
@ -23,5 +23,3 @@ type IngressExpansion interface{}
|
||||
type PodSecurityPolicyExpansion interface{}
|
||||
|
||||
type ReplicaSetExpansion interface{}
|
||||
|
||||
type ThirdPartyResourceExpansion interface{}
|
||||
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ThirdPartyResourcesGetter interface {
|
||||
ThirdPartyResources() ThirdPartyResourceInterface
|
||||
}
|
||||
|
||||
// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
|
||||
type ThirdPartyResourceInterface interface {
|
||||
Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
|
||||
Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error)
|
||||
ThirdPartyResourceExpansion
|
||||
}
|
||||
|
||||
// thirdPartyResources implements ThirdPartyResourceInterface
|
||||
type thirdPartyResources struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newThirdPartyResources returns a ThirdPartyResources
|
||||
func newThirdPartyResources(c *ExtensionsV1beta1Client) *thirdPartyResources {
|
||||
return &thirdPartyResources{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
|
||||
func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
result = &v1beta1.ThirdPartyResource{}
|
||||
err = c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
|
||||
func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
|
||||
result = &v1beta1.ThirdPartyResourceList{}
|
||||
err = c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *thirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
result = &v1beta1.ThirdPartyResource{}
|
||||
err = c.client.Post().
|
||||
Resource("thirdpartyresources").
|
||||
Body(thirdPartyResource).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
|
||||
func (c *thirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
result = &v1beta1.ThirdPartyResource{}
|
||||
err = c.client.Put().
|
||||
Resource("thirdpartyresources").
|
||||
Name(thirdPartyResource.Name).
|
||||
Body(thirdPartyResource).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
|
||||
func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("thirdpartyresources").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("thirdpartyresources").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched thirdPartyResource.
|
||||
func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
result = &v1beta1.ThirdPartyResource{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("thirdpartyresources").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -19,7 +19,6 @@ go_library(
|
||||
"replicaset.go",
|
||||
"replicaset_expansion.go",
|
||||
"scale.go",
|
||||
"thirdpartyresource.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/listers/extensions/v1beta1",
|
||||
deps = [
|
||||
|
@ -37,7 +37,3 @@ type ScaleListerExpansion interface{}
|
||||
// ScaleNamespaceListerExpansion allows custom methods to be added to
|
||||
// ScaleNamespaceLister.
|
||||
type ScaleNamespaceListerExpansion interface{}
|
||||
|
||||
// ThirdPartyResourceListerExpansion allows custom methods to be added to
|
||||
// ThirdPartyResourceLister.
|
||||
type ThirdPartyResourceListerExpansion interface{}
|
||||
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file was automatically generated by lister-gen
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ThirdPartyResourceLister helps list ThirdPartyResources.
|
||||
type ThirdPartyResourceLister interface {
|
||||
// List lists all ThirdPartyResources in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error)
|
||||
// Get retrieves the ThirdPartyResource from the index for a given name.
|
||||
Get(name string) (*v1beta1.ThirdPartyResource, error)
|
||||
ThirdPartyResourceListerExpansion
|
||||
}
|
||||
|
||||
// thirdPartyResourceLister implements the ThirdPartyResourceLister interface.
|
||||
type thirdPartyResourceLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister.
|
||||
func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister {
|
||||
return &thirdPartyResourceLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ThirdPartyResources in the indexer.
|
||||
func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.ThirdPartyResource))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ThirdPartyResource from the index for a given name.
|
||||
func (s *thirdPartyResourceLister) Get(name string) (*v1beta1.ThirdPartyResource, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("thirdpartyresource"), name)
|
||||
}
|
||||
return obj.(*v1beta1.ThirdPartyResource), nil
|
||||
}
|
@ -446,8 +446,6 @@ var ephemeralWhiteList = createEphemeralWhiteList(
|
||||
gvr("extensions", "v1beta1", "deploymentrollbacks"), // used to rollback deployment, not stored in etcd
|
||||
gvr("extensions", "v1beta1", "replicationcontrollerdummies"), // not stored in etcd
|
||||
gvr("extensions", "v1beta1", "scales"), // not stored in etcd, part of kapiv1.ReplicationController
|
||||
gvr("extensions", "v1beta1", "thirdpartyresourcedatas"), // we cannot create this
|
||||
gvr("extensions", "v1beta1", "thirdpartyresources"), // these have been removed from the API server, but kept for the client
|
||||
// --
|
||||
|
||||
// k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1
|
||||
|
@ -498,7 +498,6 @@ Summary API when querying /stats/summary should report resource usage through th
|
||||
Sysctls should reject invalid sysctls,davidopp,1,node
|
||||
Sysctls should support sysctls,Random-Liu,1,node
|
||||
Sysctls should support unsafe sysctls which are actually whitelisted,deads2k,1,node
|
||||
ThirdParty resources Simple Third Party creating/deleting thirdparty objects works,luxas,1,api-machinery
|
||||
Upgrade cluster upgrade should maintain a functioning cluster,luxas,1,cluster-lifecycle
|
||||
Upgrade master upgrade should maintain a functioning cluster,xiang90,1,cluster-lifecycle
|
||||
Upgrade node upgrade should maintain a functioning cluster,zmerlynn,1,cluster-lifecycle
|
||||
@ -758,10 +757,6 @@ k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage,dchen1107,1,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/replicaset,rrati,0,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage,wojtek-t,1,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/rest,rrati,0,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource,mwielgus,1,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage,mikedanese,1,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata,sttts,1,
|
||||
k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage,childsb,1,
|
||||
k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget,Q-Lee,1,
|
||||
k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage,dchen1107,1,
|
||||
k8s.io/kubernetes/pkg/registry/rbac/reconciliation,roberthbailey,1,
|
||||
|
|
Loading…
Reference in New Issue
Block a user