Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3b0b95ec
Commit
3b0b95ec
authored
Nov 02, 2017
by
Nikhita Raghunath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove TPR remnants
There are still TPR types and generated client in the extensions group. It is better to clean that up, now that it has been removed from master.
parent
12752f31
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2 additions
and
192 deletions
+2
-192
install.go
pkg/api/install/install.go
+0
-3
install.go
pkg/apis/extensions/install/install.go
+1
-1
register.go
pkg/apis/extensions/register.go
+0
-4
types.go
pkg/apis/extensions/types.go
+0
-67
install.go
pkg/kubectl/scheme/install.go
+1
-4
printers.go
pkg/printers/internalversion/printers.go
+0
-36
register.go
staging/src/k8s.io/api/extensions/v1beta1/register.go
+0
-4
types.go
staging/src/k8s.io/api/extensions/v1beta1/types.go
+0
-71
etcd_storage_path_test.go
test/integration/etcd/etcd_storage_path_test.go
+0
-2
No files found.
pkg/api/install/install.go
View file @
3b0b95ec
...
...
@@ -56,9 +56,6 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
"PodProxyOptions"
,
"NodeProxyOptions"
,
"ServiceProxyOptions"
,
"ThirdPartyResource"
,
"ThirdPartyResourceData"
,
"ThirdPartyResourceList"
,
),
},
announced
.
VersionToSchemeFunc
{
...
...
pkg/apis/extensions/install/install.go
View file @
3b0b95ec
...
...
@@ -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
{
...
...
pkg/apis/extensions/register.go
View file @
3b0b95ec
...
...
@@ -52,12 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&
DeploymentRollback
{},
&
ReplicationControllerDummy
{},
&
Scale
{},
&
ThirdPartyResource
{},
&
ThirdPartyResourceList
{},
&
DaemonSetList
{},
&
DaemonSet
{},
&
ThirdPartyResourceData
{},
&
ThirdPartyResourceDataList
{},
&
Ingress
{},
&
IngressList
{},
&
ReplicaSet
{},
...
...
pkg/apis/extensions/types.go
View file @
3b0b95ec
...
...
@@ -111,61 +111,6 @@ type CustomMetricCurrentStatusList struct {
}
// +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
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
...
...
@@ -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
...
...
pkg/kubectl/scheme/install.go
View file @
3b0b95ec
...
...
@@ -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
,
...
...
pkg/printers/internalversion/printers.go
View file @
3b0b95ec
...
...
@@ -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
]
+
"..."
...
...
staging/src/k8s.io/api/extensions/v1beta1/register.go
View file @
3b0b95ec
...
...
@@ -49,12 +49,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&
DeploymentRollback
{},
&
ReplicationControllerDummy
{},
&
Scale
{},
&
ThirdPartyResource
{},
&
ThirdPartyResourceList
{},
&
DaemonSetList
{},
&
DaemonSet
{},
&
ThirdPartyResourceData
{},
&
ThirdPartyResourceDataList
{},
&
Ingress
{},
&
IngressList
{},
&
ReplicaSet
{},
...
...
staging/src/k8s.io/api/extensions/v1beta1/types.go
View file @
3b0b95ec
...
...
@@ -101,63 +101,6 @@ type CustomMetricCurrentStatusList struct {
}
// +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
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
...
...
@@ -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
...
...
test/integration/etcd/etcd_storage_path_test.go
View file @
3b0b95ec
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment