mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #85098 from liggitt/admission-config-v1
Promote apiserver.config.k8s.io/v1, kind=AdmissionConfiguration
This commit is contained in:
commit
b49afbfa64
@ -351,6 +351,7 @@ staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadm
|
|||||||
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1
|
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1
|
||||||
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts
|
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts
|
||||||
staging/src/k8s.io/apiserver/pkg/apis/apiserver
|
staging/src/k8s.io/apiserver/pkg/apis/apiserver
|
||||||
|
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1
|
||||||
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
|
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
|
||||||
staging/src/k8s.io/apiserver/pkg/apis/audit
|
staging/src/k8s.io/apiserver/pkg/apis/audit
|
||||||
staging/src/k8s.io/apiserver/pkg/apis/audit/v1
|
staging/src/k8s.io/apiserver/pkg/apis/audit/v1
|
||||||
|
@ -28,7 +28,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/audit:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/audit:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
|
||||||
@ -54,6 +54,7 @@ go_test(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
||||||
"//vendor/github.com/stretchr/testify/assert:go_default_library",
|
"//vendor/github.com/stretchr/testify/assert:go_default_library",
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/apiserver/pkg/apis/apiserver"
|
"k8s.io/apiserver/pkg/apis/apiserver"
|
||||||
apiserverv1alpha1 "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
apiserverv1 "k8s.io/apiserver/pkg/apis/apiserver/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeAbs(path, base string) (string, error) {
|
func makeAbs(path, base string) (string, error) {
|
||||||
@ -110,11 +110,11 @@ func ReadAdmissionConfiguration(pluginNames []string, configFilePath string, con
|
|||||||
// previously read input from a non-versioned file configuration to the
|
// previously read input from a non-versioned file configuration to the
|
||||||
// current input file.
|
// current input file.
|
||||||
legacyPluginsWithUnversionedConfig := sets.NewString("ImagePolicyWebhook", "PodNodeSelector")
|
legacyPluginsWithUnversionedConfig := sets.NewString("ImagePolicyWebhook", "PodNodeSelector")
|
||||||
externalConfig := &apiserverv1alpha1.AdmissionConfiguration{}
|
externalConfig := &apiserverv1.AdmissionConfiguration{}
|
||||||
for _, pluginName := range pluginNames {
|
for _, pluginName := range pluginNames {
|
||||||
if legacyPluginsWithUnversionedConfig.Has(pluginName) {
|
if legacyPluginsWithUnversionedConfig.Has(pluginName) {
|
||||||
externalConfig.Plugins = append(externalConfig.Plugins,
|
externalConfig.Plugins = append(externalConfig.Plugins,
|
||||||
apiserverv1alpha1.AdmissionPluginConfiguration{
|
apiserverv1.AdmissionPluginConfiguration{
|
||||||
Name: pluginName,
|
Name: pluginName,
|
||||||
Path: configFilePath})
|
Path: configFilePath})
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/json"
|
"k8s.io/apimachinery/pkg/util/json"
|
||||||
"k8s.io/apiserver/pkg/apis/apiserver"
|
"k8s.io/apiserver/pkg/apis/apiserver"
|
||||||
|
apiserverapiv1 "k8s.io/apiserver/pkg/apis/apiserver/v1"
|
||||||
apiserverapiv1alpha1 "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
apiserverapiv1alpha1 "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -76,6 +77,48 @@ func TestReadAdmissionConfiguration(t *testing.T) {
|
|||||||
ConfigBody: `{
|
ConfigBody: `{
|
||||||
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
||||||
"kind": "AdmissionConfiguration",
|
"kind": "AdmissionConfiguration",
|
||||||
|
"plugins": [
|
||||||
|
{"name": "ImagePolicyWebhook", "path": "/tmp/image-policy-webhook.json"},
|
||||||
|
{"name": "ResourceQuota"}
|
||||||
|
]}`,
|
||||||
|
ExpectedAdmissionConfig: &apiserver.AdmissionConfiguration{
|
||||||
|
Plugins: []apiserver.AdmissionPluginConfiguration{
|
||||||
|
{
|
||||||
|
Name: "ImagePolicyWebhook",
|
||||||
|
Path: "/tmp/image-policy-webhook.json",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "ResourceQuota",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
PluginNames: []string{},
|
||||||
|
},
|
||||||
|
"v1 configuration - path fixup": {
|
||||||
|
ConfigBody: `{
|
||||||
|
"apiVersion": "apiserver.config.k8s.io/v1",
|
||||||
|
"kind": "AdmissionConfiguration",
|
||||||
|
"plugins": [
|
||||||
|
{"name": "ImagePolicyWebhook", "path": "image-policy-webhook.json"},
|
||||||
|
{"name": "ResourceQuota"}
|
||||||
|
]}`,
|
||||||
|
ExpectedAdmissionConfig: &apiserver.AdmissionConfiguration{
|
||||||
|
Plugins: []apiserver.AdmissionPluginConfiguration{
|
||||||
|
{
|
||||||
|
Name: "ImagePolicyWebhook",
|
||||||
|
Path: imagePolicyWebhookFile,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "ResourceQuota",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
PluginNames: []string{},
|
||||||
|
},
|
||||||
|
"v1 configuration - abspath": {
|
||||||
|
ConfigBody: `{
|
||||||
|
"apiVersion": "apiserver.config.k8s.io/v1",
|
||||||
|
"kind": "AdmissionConfiguration",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{"name": "ImagePolicyWebhook", "path": "/tmp/image-policy-webhook.json"},
|
{"name": "ImagePolicyWebhook", "path": "/tmp/image-policy-webhook.json"},
|
||||||
{"name": "ResourceQuota"}
|
{"name": "ResourceQuota"}
|
||||||
@ -141,6 +184,7 @@ func TestReadAdmissionConfiguration(t *testing.T) {
|
|||||||
scheme := runtime.NewScheme()
|
scheme := runtime.NewScheme()
|
||||||
require.NoError(t, apiserver.AddToScheme(scheme))
|
require.NoError(t, apiserver.AddToScheme(scheme))
|
||||||
require.NoError(t, apiserverapiv1alpha1.AddToScheme(scheme))
|
require.NoError(t, apiserverapiv1alpha1.AddToScheme(scheme))
|
||||||
|
require.NoError(t, apiserverapiv1.AddToScheme(scheme))
|
||||||
|
|
||||||
for testName, testCase := range testCases {
|
for testName, testCase := range testCases {
|
||||||
if err = ioutil.WriteFile(configFileName, []byte(testCase.ConfigBody), 0644); err != nil {
|
if err = ioutil.WriteFile(configFileName, []byte(testCase.ConfigBody), 0644); err != nil {
|
||||||
@ -171,7 +215,7 @@ func TestEmbeddedConfiguration(t *testing.T) {
|
|||||||
ConfigBody string
|
ConfigBody string
|
||||||
ExpectedConfig string
|
ExpectedConfig string
|
||||||
}{
|
}{
|
||||||
"versioned configuration": {
|
"v1alpha1 versioned configuration": {
|
||||||
ConfigBody: `{
|
ConfigBody: `{
|
||||||
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
||||||
"kind": "AdmissionConfiguration",
|
"kind": "AdmissionConfiguration",
|
||||||
@ -191,7 +235,7 @@ func TestEmbeddedConfiguration(t *testing.T) {
|
|||||||
"foo": "bar"
|
"foo": "bar"
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
"legacy configuration": {
|
"v1alpha1 legacy configuration": {
|
||||||
ConfigBody: `{
|
ConfigBody: `{
|
||||||
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
"apiVersion": "apiserver.k8s.io/v1alpha1",
|
||||||
"kind": "AdmissionConfiguration",
|
"kind": "AdmissionConfiguration",
|
||||||
@ -207,12 +251,49 @@ func TestEmbeddedConfiguration(t *testing.T) {
|
|||||||
"foo": "bar"
|
"foo": "bar"
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
|
"v1 versioned configuration": {
|
||||||
|
ConfigBody: `{
|
||||||
|
"apiVersion": "apiserver.config.k8s.io/v1",
|
||||||
|
"kind": "AdmissionConfiguration",
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "Foo",
|
||||||
|
"configuration": {
|
||||||
|
"apiVersion": "foo.admission.k8s.io/v1alpha1",
|
||||||
|
"kind": "Configuration",
|
||||||
|
"foo": "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]}`,
|
||||||
|
ExpectedConfig: `{
|
||||||
|
"apiVersion": "foo.admission.k8s.io/v1alpha1",
|
||||||
|
"kind": "Configuration",
|
||||||
|
"foo": "bar"
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
"v1 legacy configuration": {
|
||||||
|
ConfigBody: `{
|
||||||
|
"apiVersion": "apiserver.config.k8s.io/v1",
|
||||||
|
"kind": "AdmissionConfiguration",
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "Foo",
|
||||||
|
"configuration": {
|
||||||
|
"foo": "bar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]}`,
|
||||||
|
ExpectedConfig: `{
|
||||||
|
"foo": "bar"
|
||||||
|
}`,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for desc, test := range testCases {
|
for desc, test := range testCases {
|
||||||
scheme := runtime.NewScheme()
|
scheme := runtime.NewScheme()
|
||||||
require.NoError(t, apiserver.AddToScheme(scheme))
|
require.NoError(t, apiserver.AddToScheme(scheme))
|
||||||
require.NoError(t, apiserverapiv1alpha1.AddToScheme(scheme))
|
require.NoError(t, apiserverapiv1alpha1.AddToScheme(scheme))
|
||||||
|
require.NoError(t, apiserverapiv1.AddToScheme(scheme))
|
||||||
|
|
||||||
if err = ioutil.WriteFile(configFileName, []byte(test.ConfigBody), 0644); err != nil {
|
if err = ioutil.WriteFile(configFileName, []byte(test.ConfigBody), 0644); err != nil {
|
||||||
t.Errorf("[%s] unexpected err writing temp file: %v", desc, err)
|
t.Errorf("[%s] unexpected err writing temp file: %v", desc, err)
|
||||||
|
@ -34,6 +34,7 @@ filegroup(
|
|||||||
srcs = [
|
srcs = [
|
||||||
":package-srcs",
|
":package-srcs",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/install:all-srcs",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/install:all-srcs",
|
||||||
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1:all-srcs",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:all-srcs",
|
||||||
],
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
|
@ -14,6 +14,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -20,12 +20,19 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
"k8s.io/apiserver/pkg/apis/apiserver"
|
"k8s.io/apiserver/pkg/apis/apiserver"
|
||||||
|
"k8s.io/apiserver/pkg/apis/apiserver/v1"
|
||||||
"k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
"k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Install registers the API group and adds types to a scheme
|
// Install registers the API group and adds types to a scheme
|
||||||
func Install(scheme *runtime.Scheme) {
|
func Install(scheme *runtime.Scheme) {
|
||||||
utilruntime.Must(apiserver.AddToScheme(scheme))
|
utilruntime.Must(apiserver.AddToScheme(scheme))
|
||||||
|
|
||||||
|
// v1alpha is in the k8s.io-suffixed API group
|
||||||
utilruntime.Must(v1alpha1.AddToScheme(scheme))
|
utilruntime.Must(v1alpha1.AddToScheme(scheme))
|
||||||
utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion))
|
utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion))
|
||||||
|
|
||||||
|
// v1 is in the config.k8s.io-suffixed API group
|
||||||
|
utilruntime.Must(v1.AddToScheme(scheme))
|
||||||
|
utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion))
|
||||||
}
|
}
|
||||||
|
@ -21,21 +21,15 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
const GroupName = "apiserver.k8s.io"
|
const LegacyGroupName = "apiserver.k8s.io"
|
||||||
|
const GroupName = "apiserver.config.k8s.io"
|
||||||
|
|
||||||
|
// LegacySchemeGroupVersion is group version used to register these objects
|
||||||
|
var LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: runtime.APIVersionInternal}
|
||||||
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
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 (
|
var (
|
||||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
AddToScheme = SchemeBuilder.AddToScheme
|
||||||
@ -43,6 +37,10 @@ var (
|
|||||||
|
|
||||||
// Adds the list of known types to the given scheme.
|
// Adds the list of known types to the given scheme.
|
||||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddKnownTypes(LegacySchemeGroupVersion,
|
||||||
|
&AdmissionConfiguration{},
|
||||||
|
&EgressSelectorConfiguration{},
|
||||||
|
)
|
||||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||||
&AdmissionConfiguration{},
|
&AdmissionConfiguration{},
|
||||||
&EgressSelectorConfiguration{},
|
&EgressSelectorConfiguration{},
|
||||||
|
40
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/BUILD
Normal file
40
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/BUILD
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"register.go",
|
||||||
|
"types.go",
|
||||||
|
"zz_generated.conversion.go",
|
||||||
|
"zz_generated.deepcopy.go",
|
||||||
|
"zz_generated.defaults.go",
|
||||||
|
],
|
||||||
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/apiserver/v1",
|
||||||
|
importpath = "k8s.io/apiserver/pkg/apis/apiserver/v1",
|
||||||
|
deps = [
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
23
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/doc.go
Normal file
23
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/doc.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 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
|
||||||
|
// +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/apiserver
|
||||||
|
// +k8s:defaulter-gen=TypeMeta
|
||||||
|
// +groupName=apiserver.config.k8s.io
|
||||||
|
|
||||||
|
// Package v1 is the v1 version of the API.
|
||||||
|
package v1 // import "k8s.io/apiserver/pkg/apis/apiserver/v1"
|
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
const GroupName = "apiserver.config.k8s.io"
|
||||||
|
|
||||||
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
|
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
|
||||||
|
|
||||||
|
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
|
||||||
|
)
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds the list of known types to the given scheme.
|
||||||
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||||
|
&AdmissionConfiguration{},
|
||||||
|
)
|
||||||
|
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
|
return nil
|
||||||
|
}
|
50
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/types.go
Normal file
50
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/types.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
|
// 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.Unknown `json:"configuration"`
|
||||||
|
}
|
103
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.conversion.go
generated
Normal file
103
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.conversion.go
generated
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by conversion-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
unsafe "unsafe"
|
||||||
|
|
||||||
|
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
apiserver "k8s.io/apiserver/pkg/apis/apiserver"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
localSchemeBuilder.Register(RegisterConversions)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterConversions adds conversion functions to the given scheme.
|
||||||
|
// Public to allow building arbitrary schemes.
|
||||||
|
func RegisterConversions(s *runtime.Scheme) error {
|
||||||
|
if err := s.AddGeneratedConversionFunc((*AdmissionConfiguration)(nil), (*apiserver.AdmissionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(a.(*AdmissionConfiguration), b.(*apiserver.AdmissionConfiguration), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*apiserver.AdmissionConfiguration)(nil), (*AdmissionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_apiserver_AdmissionConfiguration_To_v1_AdmissionConfiguration(a.(*apiserver.AdmissionConfiguration), b.(*AdmissionConfiguration), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*AdmissionPluginConfiguration)(nil), (*apiserver.AdmissionPluginConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration(a.(*AdmissionPluginConfiguration), b.(*apiserver.AdmissionPluginConfiguration), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*apiserver.AdmissionPluginConfiguration)(nil), (*AdmissionPluginConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_apiserver_AdmissionPluginConfiguration_To_v1_AdmissionPluginConfiguration(a.(*apiserver.AdmissionPluginConfiguration), b.(*AdmissionPluginConfiguration), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(in *AdmissionConfiguration, out *apiserver.AdmissionConfiguration, s conversion.Scope) error {
|
||||||
|
out.Plugins = *(*[]apiserver.AdmissionPluginConfiguration)(unsafe.Pointer(&in.Plugins))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration is an autogenerated conversion function.
|
||||||
|
func Convert_v1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(in *AdmissionConfiguration, out *apiserver.AdmissionConfiguration, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiserver_AdmissionConfiguration_To_v1_AdmissionConfiguration(in *apiserver.AdmissionConfiguration, out *AdmissionConfiguration, s conversion.Scope) error {
|
||||||
|
out.Plugins = *(*[]AdmissionPluginConfiguration)(unsafe.Pointer(&in.Plugins))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiserver_AdmissionConfiguration_To_v1_AdmissionConfiguration is an autogenerated conversion function.
|
||||||
|
func Convert_apiserver_AdmissionConfiguration_To_v1_AdmissionConfiguration(in *apiserver.AdmissionConfiguration, out *AdmissionConfiguration, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiserver_AdmissionConfiguration_To_v1_AdmissionConfiguration(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration(in *AdmissionPluginConfiguration, out *apiserver.AdmissionPluginConfiguration, s conversion.Scope) error {
|
||||||
|
out.Name = in.Name
|
||||||
|
out.Path = in.Path
|
||||||
|
out.Configuration = (*runtime.Unknown)(unsafe.Pointer(in.Configuration))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration is an autogenerated conversion function.
|
||||||
|
func Convert_v1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration(in *AdmissionPluginConfiguration, out *apiserver.AdmissionPluginConfiguration, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_apiserver_AdmissionPluginConfiguration_To_v1_AdmissionPluginConfiguration(in *apiserver.AdmissionPluginConfiguration, out *AdmissionPluginConfiguration, s conversion.Scope) error {
|
||||||
|
out.Name = in.Name
|
||||||
|
out.Path = in.Path
|
||||||
|
out.Configuration = (*runtime.Unknown)(unsafe.Pointer(in.Configuration))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_apiserver_AdmissionPluginConfiguration_To_v1_AdmissionPluginConfiguration is an autogenerated conversion function.
|
||||||
|
func Convert_apiserver_AdmissionPluginConfiguration_To_v1_AdmissionPluginConfiguration(in *apiserver.AdmissionPluginConfiguration, out *AdmissionPluginConfiguration, s conversion.Scope) error {
|
||||||
|
return autoConvert_apiserver_AdmissionPluginConfiguration_To_v1_AdmissionPluginConfiguration(in, out, s)
|
||||||
|
}
|
78
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.deepcopy.go
generated
Normal file
78
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.deepcopy.go
generated
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *AdmissionConfiguration) DeepCopyInto(out *AdmissionConfiguration) {
|
||||||
|
*out = *in
|
||||||
|
out.TypeMeta = in.TypeMeta
|
||||||
|
if in.Plugins != nil {
|
||||||
|
in, out := &in.Plugins, &out.Plugins
|
||||||
|
*out = make([]AdmissionPluginConfiguration, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionConfiguration.
|
||||||
|
func (in *AdmissionConfiguration) DeepCopy() *AdmissionConfiguration {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(AdmissionConfiguration)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||||
|
func (in *AdmissionConfiguration) DeepCopyObject() runtime.Object {
|
||||||
|
if c := in.DeepCopy(); c != nil {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *AdmissionPluginConfiguration) DeepCopyInto(out *AdmissionPluginConfiguration) {
|
||||||
|
*out = *in
|
||||||
|
if in.Configuration != nil {
|
||||||
|
in, out := &in.Configuration, &out.Configuration
|
||||||
|
*out = new(runtime.Unknown)
|
||||||
|
(*in).DeepCopyInto(*out)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionPluginConfiguration.
|
||||||
|
func (in *AdmissionPluginConfiguration) DeepCopy() *AdmissionPluginConfiguration {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(AdmissionPluginConfiguration)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
32
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.defaults.go
generated
Normal file
32
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/zz_generated.defaults.go
generated
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegisterDefaults adds defaulters functions to the given scheme.
|
||||||
|
// Public to allow building arbitrary schemes.
|
||||||
|
// All generated defaulters are covering - they call all nested defaulters.
|
||||||
|
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||||
|
return nil
|
||||||
|
}
|
@ -60,15 +60,12 @@ func ReadEgressSelectorConfiguration(configFilePath string) (*apiserver.EgressSe
|
|||||||
if decodedConfig.Kind != "EgressSelectorConfiguration" {
|
if decodedConfig.Kind != "EgressSelectorConfiguration" {
|
||||||
return nil, fmt.Errorf("invalid service configuration object %q", decodedConfig.Kind)
|
return nil, fmt.Errorf("invalid service configuration object %q", decodedConfig.Kind)
|
||||||
}
|
}
|
||||||
config, err := cfgScheme.ConvertToVersion(&decodedConfig, apiserver.SchemeGroupVersion)
|
internalConfig := &apiserver.EgressSelectorConfiguration{}
|
||||||
if err != nil {
|
if err := cfgScheme.Convert(&decodedConfig, internalConfig, nil); err != nil {
|
||||||
// we got an error where the decode wasn't related to a missing type
|
// we got an error where the decode wasn't related to a missing type
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if internalConfig, ok := config.(*apiserver.EgressSelectorConfiguration); ok {
|
return internalConfig, nil
|
||||||
return internalConfig, nil
|
|
||||||
}
|
|
||||||
return nil, fmt.Errorf("unable to convert %T to *apiserver.EgressSelectorConfiguration", config)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateEgressSelectorConfiguration checks the apiserver.EgressSelectorConfiguration for
|
// ValidateEgressSelectorConfiguration checks the apiserver.EgressSelectorConfiguration for
|
||||||
|
@ -41,6 +41,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit/v1:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/apis/audit/v1:go_default_library",
|
||||||
|
@ -32,6 +32,7 @@ import (
|
|||||||
mutatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating"
|
mutatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating"
|
||||||
validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating"
|
validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating"
|
||||||
apiserverapi "k8s.io/apiserver/pkg/apis/apiserver"
|
apiserverapi "k8s.io/apiserver/pkg/apis/apiserver"
|
||||||
|
apiserverapiv1 "k8s.io/apiserver/pkg/apis/apiserver/v1"
|
||||||
apiserverapiv1alpha1 "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
apiserverapiv1alpha1 "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1"
|
||||||
"k8s.io/apiserver/pkg/server"
|
"k8s.io/apiserver/pkg/server"
|
||||||
"k8s.io/client-go/informers"
|
"k8s.io/client-go/informers"
|
||||||
@ -45,6 +46,7 @@ var configScheme = runtime.NewScheme()
|
|||||||
func init() {
|
func init() {
|
||||||
utilruntime.Must(apiserverapi.AddToScheme(configScheme))
|
utilruntime.Must(apiserverapi.AddToScheme(configScheme))
|
||||||
utilruntime.Must(apiserverapiv1alpha1.AddToScheme(configScheme))
|
utilruntime.Must(apiserverapiv1alpha1.AddToScheme(configScheme))
|
||||||
|
utilruntime.Must(apiserverapiv1.AddToScheme(configScheme))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AdmissionOptions holds the admission options
|
// AdmissionOptions holds the admission options
|
||||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@ -1271,6 +1271,7 @@ k8s.io/apiserver/pkg/admission/plugin/webhook/validating
|
|||||||
k8s.io/apiserver/pkg/admission/testing
|
k8s.io/apiserver/pkg/admission/testing
|
||||||
k8s.io/apiserver/pkg/apis/apiserver
|
k8s.io/apiserver/pkg/apis/apiserver
|
||||||
k8s.io/apiserver/pkg/apis/apiserver/install
|
k8s.io/apiserver/pkg/apis/apiserver/install
|
||||||
|
k8s.io/apiserver/pkg/apis/apiserver/v1
|
||||||
k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
|
k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
|
||||||
k8s.io/apiserver/pkg/apis/audit
|
k8s.io/apiserver/pkg/apis/audit
|
||||||
k8s.io/apiserver/pkg/apis/audit/install
|
k8s.io/apiserver/pkg/apis/audit/install
|
||||||
|
Loading…
Reference in New Issue
Block a user