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
e50340ee
Unverified
Commit
e50340ee
authored
Aug 09, 2018
by
Lucas Käldström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to 'pkg/apis/componentconfig/install' and fix inconsistencies
parent
a224e53d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
36 additions
and
134 deletions
+36
-134
violation_exceptions.list
api/api-rules/violation_exceptions.list
+0
-0
verify-api-groups.sh
hack/verify-api-groups.sh
+1
-0
testapi.go
pkg/api/testapi/testapi.go
+0
-1
defaulting_test.go
pkg/api/testing/defaulting_test.go
+0
-3
serialization_test.go
pkg/api/testing/serialization_test.go
+1
-5
OWNERS
pkg/apis/componentconfig/OWNERS
+17
-42
fuzzer.go
pkg/apis/componentconfig/fuzzer/fuzzer.go
+3
-0
install.go
pkg/apis/componentconfig/install/install.go
+0
-38
register.go
pkg/apis/componentconfig/register.go
+13
-11
register.go
pkg/apis/componentconfig/v1alpha1/register.go
+0
-2
types.go
pkg/apis/componentconfig/v1alpha1/types.go
+0
-0
register.go
.../clientset_generated/internalclientset/scheme/register.go
+0
-2
register_custom.go
...set_generated/internalclientset/scheme/register_custom.go
+0
-27
import_known_versions.go
pkg/master/import_known_versions.go
+0
-1
import_known_versions_test.go
pkg/master/import_known_versions_test.go
+1
-2
No files found.
api/api-rules/violation_exceptions.list
View file @
e50340ee
This diff is collapsed.
Click to expand it.
hack/verify-api-groups.sh
View file @
e50340ee
...
...
@@ -94,6 +94,7 @@ done
packages_without_install
=(
"k8s.io/kubernetes/pkg/apis/abac"
"k8s.io/kubernetes/pkg/apis/admission"
"k8s.io/kubernetes/pkg/apis/componentconfig"
# TODO: Remove this package completely and from this list
)
known_version_files
=(
"pkg/master/import_known_versions.go"
...
...
pkg/api/testapi/testapi.go
View file @
e50340ee
...
...
@@ -61,7 +61,6 @@ import (
_
"k8s.io/kubernetes/pkg/apis/autoscaling/install"
_
"k8s.io/kubernetes/pkg/apis/batch/install"
_
"k8s.io/kubernetes/pkg/apis/certificates/install"
_
"k8s.io/kubernetes/pkg/apis/componentconfig/install"
_
"k8s.io/kubernetes/pkg/apis/coordination/install"
_
"k8s.io/kubernetes/pkg/apis/core/install"
_
"k8s.io/kubernetes/pkg/apis/events/install"
...
...
pkg/api/testing/defaulting_test.go
View file @
e50340ee
...
...
@@ -88,9 +88,6 @@ func TestDefaulting(t *testing.T) {
{
Group
:
"batch"
,
Version
:
"v2alpha1"
,
Kind
:
"JobTemplate"
}
:
{},
{
Group
:
"certificates.k8s.io"
,
Version
:
"v1beta1"
,
Kind
:
"CertificateSigningRequest"
}
:
{},
{
Group
:
"certificates.k8s.io"
,
Version
:
"v1beta1"
,
Kind
:
"CertificateSigningRequestList"
}
:
{},
{
Group
:
"componentconfig"
,
Version
:
"v1alpha1"
,
Kind
:
"KubeProxyConfiguration"
}
:
{},
{
Group
:
"componentconfig"
,
Version
:
"v1alpha1"
,
Kind
:
"KubeSchedulerConfiguration"
}
:
{},
{
Group
:
"componentconfig"
,
Version
:
"v1alpha1"
,
Kind
:
"KubeletConfiguration"
}
:
{},
{
Group
:
"kubeadm.k8s.io"
,
Version
:
"v1alpha1"
,
Kind
:
"MasterConfiguration"
}
:
{},
// This object contains only int fields which currently breaks the defaulting test because
// it's pretty stupid. Once we add non integer fields, we should uncomment this.
...
...
pkg/api/testing/serialization_test.go
View file @
e50340ee
...
...
@@ -205,11 +205,7 @@ func TestCommonKindsRegistered(t *testing.T) {
func
TestRoundTripTypes
(
t
*
testing
.
T
)
{
seed
:=
rand
.
Int63
()
fuzzer
:=
fuzzer
.
FuzzerFor
(
FuzzerFuncs
,
rand
.
NewSource
(
seed
),
legacyscheme
.
Codecs
)
nonRoundTrippableTypes
:=
map
[
schema
.
GroupVersionKind
]
bool
{
{
Group
:
"componentconfig"
,
Version
:
runtime
.
APIVersionInternal
,
Kind
:
"KubeProxyConfiguration"
}
:
true
,
{
Group
:
"componentconfig"
,
Version
:
runtime
.
APIVersionInternal
,
Kind
:
"KubeSchedulerConfiguration"
}
:
true
,
}
nonRoundTrippableTypes
:=
map
[
schema
.
GroupVersionKind
]
bool
{}
roundtrip
.
RoundTripTypes
(
t
,
legacyscheme
.
Scheme
,
legacyscheme
.
Codecs
,
fuzzer
,
nonRoundTrippableTypes
)
}
...
...
pkg/apis/componentconfig/OWNERS
View file @
e50340ee
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- yujuhong
- derekwaynecarr
- caesarxuchao
- vishh
- mikedanese
- liggitt
- nikhiljindal
- gmarek
- sttts
- dchen1107
- saad-ali
- luxas
- justinsb
- pwittrock
- ncdc
- yifan-gu
- mwielgus
- feiskyer
- dims
- errordeveloper
- mtaufen
- markturansky
- freehan
- mml
- ingvagabund
- cjcullen
- mbohlool
- jessfraz
- david-mcmahon
- therc
- '249043822'
- mqliang
- mfanjie
approvers:
- mikedanese
- vishh
- mtaufen
- api-approvers
- mikedanese
- vishh
- mtaufen
- luxas
- sttts
reviewers:
- api-reviewers
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- vishh
- mikedanese
- liggitt
- luxas
pkg/apis/componentconfig/fuzzer/fuzzer.go
View file @
e50340ee
...
...
@@ -21,6 +21,9 @@ import (
)
// Funcs returns the fuzzer functions for the componentconfig api group.
// TODO: When the componentconfig types are split out to individual API groups
// we should re-enable the fuzzing and defaulting unit tests. Also add a
// TestTypeTags-kind of unit test like in `pkg/master`
var
Funcs
=
func
(
codecs
runtimeserializer
.
CodecFactory
)
[]
interface
{}
{
return
[]
interface
{}{}
}
pkg/apis/componentconfig/install/install.go
deleted
100644 → 0
View file @
a224e53d
/*
Copyright 2015 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 install installs the experimental API group, making it available as
// an option to all of the API encoding/decoding machinery.
package
install
import
(
"k8s.io/apimachinery/pkg/runtime"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/apis/componentconfig"
"k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1"
)
func
init
()
{
Install
(
legacyscheme
.
Scheme
)
}
// Install registers the API group and adds types to a scheme
func
Install
(
scheme
*
runtime
.
Scheme
)
{
utilruntime
.
Must
(
componentconfig
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1alpha1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
scheme
.
SetVersionPriority
(
v1alpha1
.
SchemeGroupVersion
))
}
pkg/apis/componentconfig/register.go
View file @
e50340ee
...
...
@@ -21,29 +21,31 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
)
var
(
SchemeBuilder
=
runtime
.
NewSchemeBuilder
(
addKnownTypes
)
AddToScheme
=
SchemeBuilder
.
AddToScheme
)
// GroupName is the group name use in this package
const
GroupName
=
"componentconfig"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
runtime
.
APIVersionInternal
}
var
(
SchemeBuilder
runtime
.
SchemeBuilder
localSchemeBuilder
=
&
SchemeBuilder
AddToScheme
=
localSchemeBuilder
.
AddToScheme
)
func
init
()
{
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder
.
Register
(
addKnownTypes
)
}
// Kind takes an unqualified kind and returns a Group qualified GroupKind
func
Kind
(
kind
string
)
schema
.
GroupKind
{
return
SchemeGroupVersion
.
WithKind
(
kind
)
.
GroupKind
()
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func
Resource
(
resource
string
)
schema
.
GroupResource
{
return
SchemeGroupVersion
.
WithResource
(
resource
)
.
GroupResource
()
}
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
// TODO this will get cleaned up with the scheme types are fixed
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
KubeSchedulerConfiguration
{},
)
...
...
pkg/apis/componentconfig/v1alpha1/register.go
View file @
e50340ee
...
...
@@ -28,8 +28,6 @@ const GroupName = "componentconfig"
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
"v1alpha1"
}
var
(
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
SchemeBuilder
runtime
.
SchemeBuilder
localSchemeBuilder
=
&
SchemeBuilder
AddToScheme
=
localSchemeBuilder
.
AddToScheme
...
...
pkg/apis/componentconfig/v1alpha1/types.go
View file @
e50340ee
This diff is collapsed.
Click to expand it.
pkg/client/clientset_generated/internalclientset/scheme/register.go
View file @
e50340ee
...
...
@@ -70,6 +70,4 @@ func Install(scheme *runtime.Scheme) {
scheduling
.
Install
(
scheme
)
settings
.
Install
(
scheme
)
storage
.
Install
(
scheme
)
ExtraInstall
(
scheme
)
}
pkg/client/clientset_generated/internalclientset/scheme/register_custom.go
deleted
100644 → 0
View file @
a224e53d
/*
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
scheme
import
(
"k8s.io/apimachinery/pkg/runtime"
componentconfig
"k8s.io/kubernetes/pkg/apis/componentconfig/install"
)
func
ExtraInstall
(
scheme
*
runtime
.
Scheme
)
{
// componentconfig is an apigroup, but we don't have an API endpoint because its objects are just embedded in ConfigMaps.
componentconfig
.
Install
(
scheme
)
}
pkg/master/import_known_versions.go
View file @
e50340ee
...
...
@@ -26,7 +26,6 @@ import (
_
"k8s.io/kubernetes/pkg/apis/autoscaling/install"
_
"k8s.io/kubernetes/pkg/apis/batch/install"
_
"k8s.io/kubernetes/pkg/apis/certificates/install"
_
"k8s.io/kubernetes/pkg/apis/componentconfig/install"
_
"k8s.io/kubernetes/pkg/apis/coordination/install"
_
"k8s.io/kubernetes/pkg/apis/core/install"
_
"k8s.io/kubernetes/pkg/apis/events/install"
...
...
pkg/master/import_known_versions_test.go
View file @
e50340ee
...
...
@@ -39,13 +39,12 @@ func TestGroupVersions(t *testing.T) {
"apps"
,
"autoscaling"
,
"batch"
,
"componentconfig"
,
"extensions"
,
"policy"
,
)
// No new groups should be added to the legacyUnsuffixedGroups exclusion list
if
len
(
legacyUnsuffixedGroups
)
!=
7
{
if
len
(
legacyUnsuffixedGroups
)
!=
6
{
t
.
Errorf
(
"No additional unnamespaced groups should be created"
)
}
...
...
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