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
ce86ef55
Commit
ce86ef55
authored
Feb 03, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add apiserver API group for structured configuration
parent
09cb6ee1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
588 additions
and
4 deletions
+588
-4
doc.go
staging/src/k8s.io/apiserver/pkg/apis/apiserver/doc.go
+21
-0
install.go
...rc/k8s.io/apiserver/pkg/apis/apiserver/install/install.go
+49
-0
register.go
staging/src/k8s.io/apiserver/pkg/apis/apiserver/register.go
+52
-0
types.go
staging/src/k8s.io/apiserver/pkg/apis/apiserver/types.go
+48
-0
doc.go
...g/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/doc.go
+22
-0
register.go
.../k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/register.go
+42
-0
types.go
...src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/types.go
+48
-0
zz_generated.conversion.go
...er/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go
+106
-0
zz_generated.deepcopy.go
...rver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go
+74
-0
zz_generated.deepcopy.go
....io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go
+77
-0
register.go
staging/src/k8s.io/apiserver/pkg/apis/register.go
+43
-0
config.go
staging/src/k8s.io/apiserver/pkg/server/config.go
+6
-4
No files found.
staging/src/k8s.io/apiserver/pkg/apis/apiserver/doc.go
0 → 100644
View file @
ce86ef55
/*
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.
*/
// +k8s:deepcopy-gen=package,register
// Package api is the internal version of the API.
// +groupName=apiserver.k8s.io
package
apiserver
// import "k8s.io/apiserver/pkg/apis/apiserver"
staging/src/k8s.io/apiserver/pkg/apis/apiserver/install/install.go
0 → 100644
View file @
ce86ef55
/*
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
install
import
(
"k8s.io/apimachinery/pkg/apimachinery/announced"
"k8s.io/apimachinery/pkg/apimachinery/registered"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/apis"
"k8s.io/apiserver/pkg/apis/apiserver"
"k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
)
func
init
()
{
Install
(
apis
.
GroupFactoryRegistry
,
apis
.
Registry
,
apis
.
Scheme
)
}
// Install registers the API group and adds types to a scheme
func
Install
(
groupFactoryRegistry
announced
.
APIGroupFactoryRegistry
,
registry
*
registered
.
APIRegistrationManager
,
scheme
*
runtime
.
Scheme
)
{
if
err
:=
announced
.
NewGroupMetaFactory
(
&
announced
.
GroupMetaFactoryArgs
{
GroupName
:
apiserver
.
GroupName
,
RootScopedKinds
:
sets
.
NewString
(
"APIService"
),
VersionPreferenceOrder
:
[]
string
{
v1alpha1
.
SchemeGroupVersion
.
Version
},
ImportPrefix
:
"k8s.io/apiserver/pkg/apis/apiserver"
,
AddInternalObjectsToScheme
:
apiserver
.
AddToScheme
,
},
announced
.
VersionToSchemeFunc
{
v1alpha1
.
SchemeGroupVersion
.
Version
:
v1alpha1
.
AddToScheme
,
},
)
.
Announce
(
groupFactoryRegistry
)
.
RegisterAndEnable
(
registry
,
scheme
);
err
!=
nil
{
panic
(
err
)
}
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/register.go
0 → 100644
View file @
ce86ef55
/*
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
apiserver
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const
GroupName
=
"apiserver.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
runtime
.
APIVersionInternal
}
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
func
Kind
(
kind
string
)
schema
.
GroupKind
{
return
SchemeGroupVersion
.
WithKind
(
kind
)
.
GroupKind
()
}
// Resource takes an unqualified resource and returns back a Group qualified GroupResource
func
Resource
(
resource
string
)
schema
.
GroupResource
{
return
SchemeGroupVersion
.
WithResource
(
resource
)
.
GroupResource
()
}
var
(
SchemeBuilder
=
runtime
.
NewSchemeBuilder
(
addKnownTypes
)
AddToScheme
=
SchemeBuilder
.
AddToScheme
)
// Adds the list of known types to api.Scheme.
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
AdmissionConfiguration
{},
)
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
return
nil
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/types.go
0 → 100644
View file @
ce86ef55
/*
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
apiserver
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// AdmissionConfiguration provides versioned configuration for admission controllers.
type
AdmissionConfiguration
struct
{
metav1
.
TypeMeta
// Plugins allows specifying a configuration per admission control plugin.
// +optional
Plugins
[]
AdmissionPluginConfiguration
}
// AdmissionPluginConfiguration provides the configuration for a single plug-in.
type
AdmissionPluginConfiguration
struct
{
// Name is the name of the admission controller.
// It must match the registered admission plugin name.
Name
string
// Path is the path to a configuration file that contains the plugin's
// configuration
// +optional
Path
string
// Configuration is an embedded configuration object to be used as the plugin's
// configuration. If present, it will be used instead of the path to the configuration file.
// +optional
Configuration
runtime
.
Object
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/doc.go
0 → 100644
View file @
ce86ef55
/*
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.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/apiserver
// Package v1alpha1 is the v1alpha1 version of the API.
// +groupName=apiserver.k8s.io
package
v1alpha1
// import "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/register.go
0 → 100644
View file @
ce86ef55
/*
Copyright 2016 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
v1alpha1
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const
GroupName
=
"apiserver.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
"v1alpha1"
}
var
(
SchemeBuilder
=
runtime
.
NewSchemeBuilder
(
addKnownTypes
)
AddToScheme
=
SchemeBuilder
.
AddToScheme
)
// Adds the list of known types to api.Scheme.
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
AdmissionConfiguration
{},
)
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
return
nil
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/types.go
0 → 100644
View file @
ce86ef55
/*
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
v1alpha1
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// AdmissionConfiguration provides versioned configuration for admission controllers.
type
AdmissionConfiguration
struct
{
metav1
.
TypeMeta
`json:",inline"`
// Plugins allows specifying a configuration per admission control plugin.
// +optional
Plugins
[]
AdmissionPluginConfiguration
`json:"plugins"`
}
// AdmissionPluginConfiguration provides the configuration for a single plug-in.
type
AdmissionPluginConfiguration
struct
{
// Name is the name of the admission controller.
// It must match the registered admission plugin name.
Name
string
`json:"name"`
// Path is the path to a configuration file that contains the plugin's
// configuration
// +optional
Path
string
`json:"path"`
// Configuration is an embedded configuration object to be used as the plugin's
// configuration. If present, it will be used instead of the path to the configuration file.
// +optional
Configuration
runtime
.
RawExtension
`json:"configuration"`
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go
0 → 100644
View file @
ce86ef55
// +build !ignore_autogenerated
/*
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 autogenerated by conversion-gen. Do not edit it manually!
package
v1alpha1
import
(
conversion
"k8s.io/apimachinery/pkg/conversion"
runtime
"k8s.io/apimachinery/pkg/runtime"
apiserver
"k8s.io/apiserver/pkg/apis/apiserver"
)
func
init
()
{
SchemeBuilder
.
Register
(
RegisterConversions
)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func
RegisterConversions
(
scheme
*
runtime
.
Scheme
)
error
{
return
scheme
.
AddGeneratedConversionFuncs
(
Convert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration
,
Convert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration
,
Convert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration
,
Convert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration
,
)
}
func
autoConvert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration
(
in
*
AdmissionConfiguration
,
out
*
apiserver
.
AdmissionConfiguration
,
s
conversion
.
Scope
)
error
{
if
in
.
Plugins
!=
nil
{
in
,
out
:=
&
in
.
Plugins
,
&
out
.
Plugins
*
out
=
make
([]
apiserver
.
AdmissionPluginConfiguration
,
len
(
*
in
))
for
i
:=
range
*
in
{
if
err
:=
Convert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration
(
&
(
*
in
)[
i
],
&
(
*
out
)[
i
],
s
);
err
!=
nil
{
return
err
}
}
}
else
{
out
.
Plugins
=
nil
}
return
nil
}
func
Convert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration
(
in
*
AdmissionConfiguration
,
out
*
apiserver
.
AdmissionConfiguration
,
s
conversion
.
Scope
)
error
{
return
autoConvert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration
(
in
,
out
,
s
)
}
func
autoConvert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration
(
in
*
apiserver
.
AdmissionConfiguration
,
out
*
AdmissionConfiguration
,
s
conversion
.
Scope
)
error
{
if
in
.
Plugins
!=
nil
{
in
,
out
:=
&
in
.
Plugins
,
&
out
.
Plugins
*
out
=
make
([]
AdmissionPluginConfiguration
,
len
(
*
in
))
for
i
:=
range
*
in
{
if
err
:=
Convert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration
(
&
(
*
in
)[
i
],
&
(
*
out
)[
i
],
s
);
err
!=
nil
{
return
err
}
}
}
else
{
out
.
Plugins
=
nil
}
return
nil
}
func
Convert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration
(
in
*
apiserver
.
AdmissionConfiguration
,
out
*
AdmissionConfiguration
,
s
conversion
.
Scope
)
error
{
return
autoConvert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration
(
in
,
out
,
s
)
}
func
autoConvert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration
(
in
*
AdmissionPluginConfiguration
,
out
*
apiserver
.
AdmissionPluginConfiguration
,
s
conversion
.
Scope
)
error
{
out
.
Name
=
in
.
Name
out
.
Path
=
in
.
Path
if
err
:=
runtime
.
Convert_runtime_RawExtension_To_runtime_Object
(
&
in
.
Configuration
,
&
out
.
Configuration
,
s
);
err
!=
nil
{
return
err
}
return
nil
}
func
Convert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration
(
in
*
AdmissionPluginConfiguration
,
out
*
apiserver
.
AdmissionPluginConfiguration
,
s
conversion
.
Scope
)
error
{
return
autoConvert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration
(
in
,
out
,
s
)
}
func
autoConvert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration
(
in
*
apiserver
.
AdmissionPluginConfiguration
,
out
*
AdmissionPluginConfiguration
,
s
conversion
.
Scope
)
error
{
out
.
Name
=
in
.
Name
out
.
Path
=
in
.
Path
if
err
:=
runtime
.
Convert_runtime_Object_To_runtime_RawExtension
(
&
in
.
Configuration
,
&
out
.
Configuration
,
s
);
err
!=
nil
{
return
err
}
return
nil
}
func
Convert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration
(
in
*
apiserver
.
AdmissionPluginConfiguration
,
out
*
AdmissionPluginConfiguration
,
s
conversion
.
Scope
)
error
{
return
autoConvert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration
(
in
,
out
,
s
)
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go
0 → 100644
View file @
ce86ef55
// +build !ignore_autogenerated
/*
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 autogenerated by deepcopy-gen. Do not edit it manually!
package
v1alpha1
import
(
conversion
"k8s.io/apimachinery/pkg/conversion"
runtime
"k8s.io/apimachinery/pkg/runtime"
reflect
"reflect"
)
func
init
()
{
SchemeBuilder
.
Register
(
RegisterDeepCopies
)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func
RegisterDeepCopies
(
scheme
*
runtime
.
Scheme
)
error
{
return
scheme
.
AddGeneratedDeepCopyFuncs
(
conversion
.
GeneratedDeepCopyFunc
{
Fn
:
DeepCopy_v1alpha1_AdmissionConfiguration
,
InType
:
reflect
.
TypeOf
(
&
AdmissionConfiguration
{})},
conversion
.
GeneratedDeepCopyFunc
{
Fn
:
DeepCopy_v1alpha1_AdmissionPluginConfiguration
,
InType
:
reflect
.
TypeOf
(
&
AdmissionPluginConfiguration
{})},
)
}
func
DeepCopy_v1alpha1_AdmissionConfiguration
(
in
interface
{},
out
interface
{},
c
*
conversion
.
Cloner
)
error
{
{
in
:=
in
.
(
*
AdmissionConfiguration
)
out
:=
out
.
(
*
AdmissionConfiguration
)
*
out
=
*
in
if
in
.
Plugins
!=
nil
{
in
,
out
:=
&
in
.
Plugins
,
&
out
.
Plugins
*
out
=
make
([]
AdmissionPluginConfiguration
,
len
(
*
in
))
for
i
:=
range
*
in
{
if
newVal
,
err
:=
c
.
DeepCopy
(
&
(
*
in
)[
i
]);
err
!=
nil
{
return
err
}
else
{
(
*
out
)[
i
]
=
*
newVal
.
(
*
AdmissionPluginConfiguration
)
}
}
}
return
nil
}
}
func
DeepCopy_v1alpha1_AdmissionPluginConfiguration
(
in
interface
{},
out
interface
{},
c
*
conversion
.
Cloner
)
error
{
{
in
:=
in
.
(
*
AdmissionPluginConfiguration
)
out
:=
out
.
(
*
AdmissionPluginConfiguration
)
*
out
=
*
in
if
newVal
,
err
:=
c
.
DeepCopy
(
&
in
.
Configuration
);
err
!=
nil
{
return
err
}
else
{
out
.
Configuration
=
*
newVal
.
(
*
runtime
.
RawExtension
)
}
return
nil
}
}
staging/src/k8s.io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go
0 → 100644
View file @
ce86ef55
// +build !ignore_autogenerated
/*
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 autogenerated by deepcopy-gen. Do not edit it manually!
package
apiserver
import
(
conversion
"k8s.io/apimachinery/pkg/conversion"
runtime
"k8s.io/apimachinery/pkg/runtime"
reflect
"reflect"
)
func
init
()
{
SchemeBuilder
.
Register
(
RegisterDeepCopies
)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func
RegisterDeepCopies
(
scheme
*
runtime
.
Scheme
)
error
{
return
scheme
.
AddGeneratedDeepCopyFuncs
(
conversion
.
GeneratedDeepCopyFunc
{
Fn
:
DeepCopy_apiserver_AdmissionConfiguration
,
InType
:
reflect
.
TypeOf
(
&
AdmissionConfiguration
{})},
conversion
.
GeneratedDeepCopyFunc
{
Fn
:
DeepCopy_apiserver_AdmissionPluginConfiguration
,
InType
:
reflect
.
TypeOf
(
&
AdmissionPluginConfiguration
{})},
)
}
func
DeepCopy_apiserver_AdmissionConfiguration
(
in
interface
{},
out
interface
{},
c
*
conversion
.
Cloner
)
error
{
{
in
:=
in
.
(
*
AdmissionConfiguration
)
out
:=
out
.
(
*
AdmissionConfiguration
)
*
out
=
*
in
if
in
.
Plugins
!=
nil
{
in
,
out
:=
&
in
.
Plugins
,
&
out
.
Plugins
*
out
=
make
([]
AdmissionPluginConfiguration
,
len
(
*
in
))
for
i
:=
range
*
in
{
if
newVal
,
err
:=
c
.
DeepCopy
(
&
(
*
in
)[
i
]);
err
!=
nil
{
return
err
}
else
{
(
*
out
)[
i
]
=
*
newVal
.
(
*
AdmissionPluginConfiguration
)
}
}
}
return
nil
}
}
func
DeepCopy_apiserver_AdmissionPluginConfiguration
(
in
interface
{},
out
interface
{},
c
*
conversion
.
Cloner
)
error
{
{
in
:=
in
.
(
*
AdmissionPluginConfiguration
)
out
:=
out
.
(
*
AdmissionPluginConfiguration
)
*
out
=
*
in
// in.Configuration is kind 'Interface'
if
in
.
Configuration
!=
nil
{
if
newVal
,
err
:=
c
.
DeepCopy
(
&
in
.
Configuration
);
err
!=
nil
{
return
err
}
else
{
out
.
Configuration
=
*
newVal
.
(
*
runtime
.
Object
)
}
}
return
nil
}
}
staging/src/k8s.io/apiserver/pkg/apis/register.go
0 → 100644
View file @
ce86ef55
/*
Copyright 2014 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
apis
import
(
"os"
"k8s.io/apimachinery/pkg/apimachinery/announced"
"k8s.io/apimachinery/pkg/apimachinery/registered"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
)
// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details)
var
GroupFactoryRegistry
=
make
(
announced
.
APIGroupFactoryRegistry
)
// Registry is an instance of an API registry. This is an interim step to start removing the idea of a global
// API registry.
var
Registry
=
registered
.
NewOrDie
(
os
.
Getenv
(
"KUBE_API_VERSIONS"
))
// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
// NOTE: If you are copying this file to start a new api group, STOP! Copy the
// extensions group instead. This Scheme is special and should appear ONLY in
// the api group, unless you really know what you're doing.
// TODO(lavalamp): make the above error impossible.
var
Scheme
=
runtime
.
NewScheme
()
// Codecs provides access to encoding and decoding for the scheme
var
Codecs
=
serializer
.
NewCodecFactory
(
Scheme
)
staging/src/k8s.io/apiserver/pkg/server/config.go
View file @
ce86ef55
...
@@ -50,16 +50,18 @@ import (
...
@@ -50,16 +50,18 @@ import (
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/apiserver/pkg/authorization/authorizerfactory"
"k8s.io/apiserver/pkg/authorization/authorizerfactory"
authorizerunion
"k8s.io/apiserver/pkg/authorization/union"
authorizerunion
"k8s.io/apiserver/pkg/authorization/union"
genericapifilters
"k8s.io/apiserver/pkg/endpoints/filters"
apiopenapi
"k8s.io/apiserver/pkg/endpoints/openapi"
apirequest
"k8s.io/apiserver/pkg/endpoints/request"
apirequest
"k8s.io/apiserver/pkg/endpoints/request"
genericfilters
"k8s.io/apiserver/pkg/server/filters"
genericfilters
"k8s.io/apiserver/pkg/server/filters"
"k8s.io/apiserver/pkg/server/healthz"
"k8s.io/apiserver/pkg/server/healthz"
"k8s.io/apiserver/pkg/server/mux"
"k8s.io/apiserver/pkg/server/options"
"k8s.io/apiserver/pkg/server/options"
"k8s.io/apiserver/pkg/server/routes"
restclient
"k8s.io/client-go/rest"
restclient
"k8s.io/client-go/rest"
certutil
"k8s.io/client-go/util/cert"
certutil
"k8s.io/client-go/util/cert"
genericapifilters
"k8s.io/apiserver/pkg/endpoints/filters"
apiopenapi
"k8s.io/apiserver/pkg/endpoints/openapi"
_
"k8s.io/apiserver/pkg/apis/apiserver/install"
"k8s.io/apiserver/pkg/server/mux"
"k8s.io/apiserver/pkg/server/routes"
)
)
const
(
const
(
...
...
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