mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Generated
This commit is contained in:
parent
649ee4f2d0
commit
308c23cf89
10
api/openapi-spec/swagger.json
generated
10
api/openapi-spec/swagger.json
generated
@ -17968,6 +17968,11 @@
|
||||
"kind": "DeleteOptions",
|
||||
"version": "v1"
|
||||
},
|
||||
{
|
||||
"group": "admission.k8s.io",
|
||||
"kind": "DeleteOptions",
|
||||
"version": "v1"
|
||||
},
|
||||
{
|
||||
"group": "admission.k8s.io",
|
||||
"kind": "DeleteOptions",
|
||||
@ -18585,6 +18590,11 @@
|
||||
"kind": "WatchEvent",
|
||||
"version": "v1"
|
||||
},
|
||||
{
|
||||
"group": "admission.k8s.io",
|
||||
"kind": "WatchEvent",
|
||||
"version": "v1"
|
||||
},
|
||||
{
|
||||
"group": "admission.k8s.io",
|
||||
"kind": "WatchEvent",
|
||||
|
@ -27,6 +27,7 @@ kazel_configured_tags = ["openapi-gen"]
|
||||
# tags_values_pkgs is a dictionary mapping {k8s build tag: {tag value: [pkgs including that tag:value]}}
|
||||
tags_values_pkgs = {"openapi-gen": {
|
||||
"false": [
|
||||
"staging/src/k8s.io/api/admission/v1",
|
||||
"staging/src/k8s.io/api/admission/v1beta1",
|
||||
"staging/src/k8s.io/api/core/v1",
|
||||
"staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1",
|
||||
@ -114,6 +115,7 @@ tags_pkgs_values = {"openapi-gen": {
|
||||
"pkg/apis/abac/v1beta1": ["true"],
|
||||
"pkg/apis/auditregistration": ["true"],
|
||||
"pkg/version": ["true"],
|
||||
"staging/src/k8s.io/api/admission/v1": ["false"],
|
||||
"staging/src/k8s.io/api/admission/v1beta1": ["false"],
|
||||
"staging/src/k8s.io/api/admissionregistration/v1": ["true"],
|
||||
"staging/src/k8s.io/api/admissionregistration/v1beta1": ["true"],
|
||||
|
@ -36,6 +36,7 @@ filegroup(
|
||||
":package-srcs",
|
||||
"//pkg/apis/admission/fuzzer:all-srcs",
|
||||
"//pkg/apis/admission/install:all-srcs",
|
||||
"//pkg/apis/admission/v1:all-srcs",
|
||||
"//pkg/apis/admission/v1beta1:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
|
@ -12,6 +12,7 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/apis/admission:go_default_library",
|
||||
"//pkg/apis/admission/v1:go_default_library",
|
||||
"//pkg/apis/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
|
39
pkg/apis/admission/v1/BUILD
Normal file
39
pkg/apis/admission/v1/BUILD
Normal file
@ -0,0 +1,39 @@
|
||||
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",
|
||||
"zz_generated.conversion.go",
|
||||
"zz_generated.defaults.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/apis/admission/v1",
|
||||
deps = [
|
||||
"//pkg/apis/admission:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//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/apimachinery/pkg/types:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
206
pkg/apis/admission/v1/zz_generated.conversion.go
generated
Normal file
206
pkg/apis/admission/v1/zz_generated.conversion.go
generated
Normal file
@ -0,0 +1,206 @@
|
||||
// +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"
|
||||
|
||||
v1 "k8s.io/api/admission/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
admission "k8s.io/kubernetes/pkg/apis/admission"
|
||||
)
|
||||
|
||||
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((*v1.AdmissionRequest)(nil), (*admission.AdmissionRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_AdmissionRequest_To_admission_AdmissionRequest(a.(*v1.AdmissionRequest), b.(*admission.AdmissionRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*admission.AdmissionRequest)(nil), (*v1.AdmissionRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_admission_AdmissionRequest_To_v1_AdmissionRequest(a.(*admission.AdmissionRequest), b.(*v1.AdmissionRequest), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.AdmissionResponse)(nil), (*admission.AdmissionResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_AdmissionResponse_To_admission_AdmissionResponse(a.(*v1.AdmissionResponse), b.(*admission.AdmissionResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*admission.AdmissionResponse)(nil), (*v1.AdmissionResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_admission_AdmissionResponse_To_v1_AdmissionResponse(a.(*admission.AdmissionResponse), b.(*v1.AdmissionResponse), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.AdmissionReview)(nil), (*admission.AdmissionReview)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_AdmissionReview_To_admission_AdmissionReview(a.(*v1.AdmissionReview), b.(*admission.AdmissionReview), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*admission.AdmissionReview)(nil), (*v1.AdmissionReview)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_admission_AdmissionReview_To_v1_AdmissionReview(a.(*admission.AdmissionReview), b.(*v1.AdmissionReview), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1_AdmissionRequest_To_admission_AdmissionRequest(in *v1.AdmissionRequest, out *admission.AdmissionRequest, s conversion.Scope) error {
|
||||
out.UID = types.UID(in.UID)
|
||||
out.Kind = in.Kind
|
||||
out.Resource = in.Resource
|
||||
out.SubResource = in.SubResource
|
||||
out.RequestKind = (*metav1.GroupVersionKind)(unsafe.Pointer(in.RequestKind))
|
||||
out.RequestResource = (*metav1.GroupVersionResource)(unsafe.Pointer(in.RequestResource))
|
||||
out.RequestSubResource = in.RequestSubResource
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
out.Operation = admission.Operation(in.Operation)
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.UserInfo, &out.UserInfo, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Object, &out.Object, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.OldObject, &out.OldObject, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.DryRun = (*bool)(unsafe.Pointer(in.DryRun))
|
||||
if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Options, &out.Options, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_AdmissionRequest_To_admission_AdmissionRequest is an autogenerated conversion function.
|
||||
func Convert_v1_AdmissionRequest_To_admission_AdmissionRequest(in *v1.AdmissionRequest, out *admission.AdmissionRequest, s conversion.Scope) error {
|
||||
return autoConvert_v1_AdmissionRequest_To_admission_AdmissionRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_admission_AdmissionRequest_To_v1_AdmissionRequest(in *admission.AdmissionRequest, out *v1.AdmissionRequest, s conversion.Scope) error {
|
||||
out.UID = types.UID(in.UID)
|
||||
out.Kind = in.Kind
|
||||
out.Resource = in.Resource
|
||||
out.SubResource = in.SubResource
|
||||
out.RequestKind = (*metav1.GroupVersionKind)(unsafe.Pointer(in.RequestKind))
|
||||
out.RequestResource = (*metav1.GroupVersionResource)(unsafe.Pointer(in.RequestResource))
|
||||
out.RequestSubResource = in.RequestSubResource
|
||||
out.Name = in.Name
|
||||
out.Namespace = in.Namespace
|
||||
out.Operation = v1.Operation(in.Operation)
|
||||
// TODO: Inefficient conversion - can we improve it?
|
||||
if err := s.Convert(&in.UserInfo, &out.UserInfo, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Object, &out.Object, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.OldObject, &out.OldObject, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.DryRun = (*bool)(unsafe.Pointer(in.DryRun))
|
||||
if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Options, &out.Options, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_admission_AdmissionRequest_To_v1_AdmissionRequest is an autogenerated conversion function.
|
||||
func Convert_admission_AdmissionRequest_To_v1_AdmissionRequest(in *admission.AdmissionRequest, out *v1.AdmissionRequest, s conversion.Scope) error {
|
||||
return autoConvert_admission_AdmissionRequest_To_v1_AdmissionRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_AdmissionResponse_To_admission_AdmissionResponse(in *v1.AdmissionResponse, out *admission.AdmissionResponse, s conversion.Scope) error {
|
||||
out.UID = types.UID(in.UID)
|
||||
out.Allowed = in.Allowed
|
||||
out.Result = (*metav1.Status)(unsafe.Pointer(in.Result))
|
||||
out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch))
|
||||
out.PatchType = (*admission.PatchType)(unsafe.Pointer(in.PatchType))
|
||||
out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_AdmissionResponse_To_admission_AdmissionResponse is an autogenerated conversion function.
|
||||
func Convert_v1_AdmissionResponse_To_admission_AdmissionResponse(in *v1.AdmissionResponse, out *admission.AdmissionResponse, s conversion.Scope) error {
|
||||
return autoConvert_v1_AdmissionResponse_To_admission_AdmissionResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_admission_AdmissionResponse_To_v1_AdmissionResponse(in *admission.AdmissionResponse, out *v1.AdmissionResponse, s conversion.Scope) error {
|
||||
out.UID = types.UID(in.UID)
|
||||
out.Allowed = in.Allowed
|
||||
out.Result = (*metav1.Status)(unsafe.Pointer(in.Result))
|
||||
out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch))
|
||||
out.PatchType = (*v1.PatchType)(unsafe.Pointer(in.PatchType))
|
||||
out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_admission_AdmissionResponse_To_v1_AdmissionResponse is an autogenerated conversion function.
|
||||
func Convert_admission_AdmissionResponse_To_v1_AdmissionResponse(in *admission.AdmissionResponse, out *v1.AdmissionResponse, s conversion.Scope) error {
|
||||
return autoConvert_admission_AdmissionResponse_To_v1_AdmissionResponse(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_AdmissionReview_To_admission_AdmissionReview(in *v1.AdmissionReview, out *admission.AdmissionReview, s conversion.Scope) error {
|
||||
if in.Request != nil {
|
||||
in, out := &in.Request, &out.Request
|
||||
*out = new(admission.AdmissionRequest)
|
||||
if err := Convert_v1_AdmissionRequest_To_admission_AdmissionRequest(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Request = nil
|
||||
}
|
||||
out.Response = (*admission.AdmissionResponse)(unsafe.Pointer(in.Response))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_AdmissionReview_To_admission_AdmissionReview is an autogenerated conversion function.
|
||||
func Convert_v1_AdmissionReview_To_admission_AdmissionReview(in *v1.AdmissionReview, out *admission.AdmissionReview, s conversion.Scope) error {
|
||||
return autoConvert_v1_AdmissionReview_To_admission_AdmissionReview(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_admission_AdmissionReview_To_v1_AdmissionReview(in *admission.AdmissionReview, out *v1.AdmissionReview, s conversion.Scope) error {
|
||||
if in.Request != nil {
|
||||
in, out := &in.Request, &out.Request
|
||||
*out = new(v1.AdmissionRequest)
|
||||
if err := Convert_admission_AdmissionRequest_To_v1_AdmissionRequest(*in, *out, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Request = nil
|
||||
}
|
||||
out.Response = (*v1.AdmissionResponse)(unsafe.Pointer(in.Response))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_admission_AdmissionReview_To_v1_AdmissionReview is an autogenerated conversion function.
|
||||
func Convert_admission_AdmissionReview_To_v1_AdmissionReview(in *admission.AdmissionReview, out *v1.AdmissionReview, s conversion.Scope) error {
|
||||
return autoConvert_admission_AdmissionReview_To_v1_AdmissionReview(in, out, s)
|
||||
}
|
32
pkg/apis/admission/v1/zz_generated.defaults.go
generated
Normal file
32
pkg/apis/admission/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
|
||||
}
|
@ -5,6 +5,7 @@ go_test(
|
||||
srcs = ["roundtrip_test.go"],
|
||||
data = glob(["testdata/**"]),
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
@ -63,6 +64,7 @@ filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//staging/src/k8s.io/api/admission/v1:all-srcs",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:all-srcs",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1:all-srcs",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:all-srcs",
|
||||
|
39
staging/src/k8s.io/api/admission/v1/BUILD
Normal file
39
staging/src/k8s.io/api/admission/v1/BUILD
Normal file
@ -0,0 +1,39 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"generated.pb.go",
|
||||
"register.go",
|
||||
"types.go",
|
||||
"types_swagger_doc_generated.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/k8s.io/api/admission/v1",
|
||||
importpath = "k8s.io/api/admission/v1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/authentication/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1: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/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
1769
staging/src/k8s.io/api/admission/v1/generated.pb.go
generated
Normal file
1769
staging/src/k8s.io/api/admission/v1/generated.pb.go
generated
Normal file
File diff suppressed because it is too large
Load Diff
160
staging/src/k8s.io/api/admission/v1/generated.proto
Normal file
160
staging/src/k8s.io/api/admission/v1/generated.proto
Normal file
@ -0,0 +1,160 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.admission.v1;
|
||||
|
||||
import "k8s.io/api/authentication/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1";
|
||||
|
||||
// AdmissionRequest describes the admission.Attributes for the admission request.
|
||||
message AdmissionRequest {
|
||||
// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
optional string uid = 1;
|
||||
|
||||
// Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2;
|
||||
|
||||
// Resource is the fully-qualified resource being requested (for example, v1.pods)
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3;
|
||||
|
||||
// SubResource is the subresource being requested, if any (for example, "status" or "scale")
|
||||
// +optional
|
||||
optional string subResource = 4;
|
||||
|
||||
// RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
|
||||
// If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1 deployments would be converted and sent to the webhook
|
||||
// with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
|
||||
// and `requestKind: {group:"apps", version:"v1", kind:"Deployment"}` (indicating the kind of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind requestKind = 13;
|
||||
|
||||
// RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
|
||||
// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1 deployments would be converted and sent to the webhook
|
||||
// with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
|
||||
// and `requestResource: {group:"apps", version:"v1", resource:"deployments"}` (indicating the resource of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource requestResource = 14;
|
||||
|
||||
// RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
|
||||
// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
optional string requestSubResource = 15;
|
||||
|
||||
// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
|
||||
// rely on the server to generate the name. If that is the case, this field will contain an empty string.
|
||||
// +optional
|
||||
optional string name = 5;
|
||||
|
||||
// Namespace is the namespace associated with the request (if any).
|
||||
// +optional
|
||||
optional string namespace = 6;
|
||||
|
||||
// Operation is the operation being performed. This may be different than the operation
|
||||
// requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
|
||||
optional string operation = 7;
|
||||
|
||||
// UserInfo is information about the requesting user
|
||||
optional k8s.io.api.authentication.v1.UserInfo userInfo = 8;
|
||||
|
||||
// Object is the object from the incoming request.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9;
|
||||
|
||||
// OldObject is the existing object. Only populated for DELETE and UPDATE requests.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10;
|
||||
|
||||
// DryRun indicates that modifications will definitely not be persisted for this request.
|
||||
// Defaults to false.
|
||||
// +optional
|
||||
optional bool dryRun = 11;
|
||||
|
||||
// Options is the operation option structure of the operation being performed.
|
||||
// e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
|
||||
// different than the options the caller provided. e.g. for a patch request the performed
|
||||
// Operation might be a CREATE, in which case the Options will a
|
||||
// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension options = 12;
|
||||
}
|
||||
|
||||
// AdmissionResponse describes an admission response.
|
||||
message AdmissionResponse {
|
||||
// UID is an identifier for the individual request/response.
|
||||
// This must be copied over from the corresponding AdmissionRequest.
|
||||
optional string uid = 1;
|
||||
|
||||
// Allowed indicates whether or not the admission request was permitted.
|
||||
optional bool allowed = 2;
|
||||
|
||||
// Result contains extra details into why an admission request was denied.
|
||||
// This field IS NOT consulted in any way if "Allowed" is "true".
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
|
||||
|
||||
// The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
|
||||
// +optional
|
||||
optional bytes patch = 4;
|
||||
|
||||
// The type of Patch. Currently we only allow "JSONPatch".
|
||||
// +optional
|
||||
optional string patchType = 5;
|
||||
|
||||
// AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
|
||||
// MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
|
||||
// admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
|
||||
// the admission webhook to add additional context to the audit log for this request.
|
||||
// +optional
|
||||
map<string, string> auditAnnotations = 6;
|
||||
}
|
||||
|
||||
// AdmissionReview describes an admission review request/response.
|
||||
message AdmissionReview {
|
||||
// Request describes the attributes for the admission request.
|
||||
// +optional
|
||||
optional AdmissionRequest request = 1;
|
||||
|
||||
// Response describes the attributes for the admission response.
|
||||
// +optional
|
||||
optional AdmissionResponse response = 2;
|
||||
}
|
||||
|
77
staging/src/k8s.io/api/admission/v1/types_swagger_doc_generated.go
generated
Normal file
77
staging/src/k8s.io/api/admission/v1/types_swagger_doc_generated.go
generated
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_AdmissionRequest = map[string]string{
|
||||
"": "AdmissionRequest describes the admission.Attributes for the admission request.",
|
||||
"uid": "UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.",
|
||||
"kind": "Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)",
|
||||
"resource": "Resource is the fully-qualified resource being requested (for example, v1.pods)",
|
||||
"subResource": "SubResource is the subresource being requested, if any (for example, \"status\" or \"scale\")",
|
||||
"requestKind": "RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). If this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1 deployments would be converted and sent to the webhook with `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for), and `requestKind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details.",
|
||||
"requestResource": "RequestResource is the fully-qualified resource of the original API request (for example, v1.pods). If this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1 deployments would be converted and sent to the webhook with `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for), and `requestResource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type.",
|
||||
"requestSubResource": "RequestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\") If this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed. See documentation for the \"matchPolicy\" field in the webhook configuration type.",
|
||||
"name": "Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this field will contain an empty string.",
|
||||
"namespace": "Namespace is the namespace associated with the request (if any).",
|
||||
"operation": "Operation is the operation being performed. This may be different than the operation requested. e.g. a patch can result in either a CREATE or UPDATE Operation.",
|
||||
"userInfo": "UserInfo is information about the requesting user",
|
||||
"object": "Object is the object from the incoming request.",
|
||||
"oldObject": "OldObject is the existing object. Only populated for DELETE and UPDATE requests.",
|
||||
"dryRun": "DryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.",
|
||||
"options": "Options is the operation option structure of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be different than the options the caller provided. e.g. for a patch request the performed Operation might be a CREATE, in which case the Options will a `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.",
|
||||
}
|
||||
|
||||
func (AdmissionRequest) SwaggerDoc() map[string]string {
|
||||
return map_AdmissionRequest
|
||||
}
|
||||
|
||||
var map_AdmissionResponse = map[string]string{
|
||||
"": "AdmissionResponse describes an admission response.",
|
||||
"uid": "UID is an identifier for the individual request/response. This must be copied over from the corresponding AdmissionRequest.",
|
||||
"allowed": "Allowed indicates whether or not the admission request was permitted.",
|
||||
"status": "Result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".",
|
||||
"patch": "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.",
|
||||
"patchType": "The type of Patch. Currently we only allow \"JSONPatch\".",
|
||||
"auditAnnotations": "AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.",
|
||||
}
|
||||
|
||||
func (AdmissionResponse) SwaggerDoc() map[string]string {
|
||||
return map_AdmissionResponse
|
||||
}
|
||||
|
||||
var map_AdmissionReview = map[string]string{
|
||||
"": "AdmissionReview describes an admission review request/response.",
|
||||
"request": "Request describes the attributes for the admission request.",
|
||||
"response": "Response describes the attributes for the admission response.",
|
||||
}
|
||||
|
||||
func (AdmissionReview) SwaggerDoc() map[string]string {
|
||||
return map_AdmissionReview
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
136
staging/src/k8s.io/api/admission/v1/zz_generated.deepcopy.go
generated
Normal file
136
staging/src/k8s.io/api/admission/v1/zz_generated.deepcopy.go
generated
Normal file
@ -0,0 +1,136 @@
|
||||
// +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 (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
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 *AdmissionRequest) DeepCopyInto(out *AdmissionRequest) {
|
||||
*out = *in
|
||||
out.Kind = in.Kind
|
||||
out.Resource = in.Resource
|
||||
if in.RequestKind != nil {
|
||||
in, out := &in.RequestKind, &out.RequestKind
|
||||
*out = new(metav1.GroupVersionKind)
|
||||
**out = **in
|
||||
}
|
||||
if in.RequestResource != nil {
|
||||
in, out := &in.RequestResource, &out.RequestResource
|
||||
*out = new(metav1.GroupVersionResource)
|
||||
**out = **in
|
||||
}
|
||||
in.UserInfo.DeepCopyInto(&out.UserInfo)
|
||||
in.Object.DeepCopyInto(&out.Object)
|
||||
in.OldObject.DeepCopyInto(&out.OldObject)
|
||||
if in.DryRun != nil {
|
||||
in, out := &in.DryRun, &out.DryRun
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
in.Options.DeepCopyInto(&out.Options)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequest.
|
||||
func (in *AdmissionRequest) DeepCopy() *AdmissionRequest {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AdmissionRequest)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) {
|
||||
*out = *in
|
||||
if in.Result != nil {
|
||||
in, out := &in.Result, &out.Result
|
||||
*out = new(metav1.Status)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Patch != nil {
|
||||
in, out := &in.Patch, &out.Patch
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.PatchType != nil {
|
||||
in, out := &in.PatchType, &out.PatchType
|
||||
*out = new(PatchType)
|
||||
**out = **in
|
||||
}
|
||||
if in.AuditAnnotations != nil {
|
||||
in, out := &in.AuditAnnotations, &out.AuditAnnotations
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionResponse.
|
||||
func (in *AdmissionResponse) DeepCopy() *AdmissionResponse {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AdmissionResponse)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.Request != nil {
|
||||
in, out := &in.Request, &out.Request
|
||||
*out = new(AdmissionRequest)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Response != nil {
|
||||
in, out := &in.Response, &out.Response
|
||||
*out = new(AdmissionResponse)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReview.
|
||||
func (in *AdmissionReview) DeepCopy() *AdmissionReview {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AdmissionReview)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AdmissionReview) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
@ -80,7 +80,7 @@ message AdmissionRequest {
|
||||
optional string requestSubResource = 15;
|
||||
|
||||
// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
|
||||
// rely on the server to generate the name. If that is the case, this method will return the empty string.
|
||||
// rely on the server to generate the name. If that is the case, this field will contain an empty string.
|
||||
// +optional
|
||||
optional string name = 5;
|
||||
|
||||
@ -95,11 +95,11 @@ message AdmissionRequest {
|
||||
// UserInfo is information about the requesting user
|
||||
optional k8s.io.api.authentication.v1.UserInfo userInfo = 8;
|
||||
|
||||
// Object is the object from the incoming request prior to default values being applied
|
||||
// Object is the object from the incoming request.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9;
|
||||
|
||||
// OldObject is the existing object. Only populated for UPDATE requests.
|
||||
// OldObject is the existing object. Only populated for DELETE and UPDATE requests.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10;
|
||||
|
||||
|
@ -36,12 +36,12 @@ var map_AdmissionRequest = map[string]string{
|
||||
"requestKind": "RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). If this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for), and `requestKind: {group:\"apps\", version:\"v1beta1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details.",
|
||||
"requestResource": "RequestResource is the fully-qualified resource of the original API request (for example, v1.pods). If this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for), and `requestResource: {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type.",
|
||||
"requestSubResource": "RequestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\") If this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed. See documentation for the \"matchPolicy\" field in the webhook configuration type.",
|
||||
"name": "Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this method will return the empty string.",
|
||||
"name": "Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this field will contain an empty string.",
|
||||
"namespace": "Namespace is the namespace associated with the request (if any).",
|
||||
"operation": "Operation is the operation being performed. This may be different than the operation requested. e.g. a patch can result in either a CREATE or UPDATE Operation.",
|
||||
"userInfo": "UserInfo is information about the requesting user",
|
||||
"object": "Object is the object from the incoming request prior to default values being applied",
|
||||
"oldObject": "OldObject is the existing object. Only populated for UPDATE requests.",
|
||||
"object": "Object is the object from the incoming request.",
|
||||
"oldObject": "OldObject is the existing object. Only populated for DELETE and UPDATE requests.",
|
||||
"dryRun": "DryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.",
|
||||
"options": "Options is the operation option structure of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be different than the options the caller provided. e.g. for a patch request the performed Operation might be a CREATE, in which case the Options will a `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.",
|
||||
}
|
||||
|
81
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.json
vendored
Normal file
81
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.json
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"kind": "AdmissionReview",
|
||||
"apiVersion": "admission.k8s.io/v1",
|
||||
"request": {
|
||||
"uid": "ő岅ȕHH壬%龺ǟ橸章蒪ʤǎ",
|
||||
"kind": {
|
||||
"group": "2",
|
||||
"version": "3",
|
||||
"kind": "4"
|
||||
},
|
||||
"resource": {
|
||||
"group": "5",
|
||||
"version": "6",
|
||||
"resource": "7"
|
||||
},
|
||||
"subResource": "8",
|
||||
"requestKind": {
|
||||
"group": "9",
|
||||
"version": "10",
|
||||
"kind": "11"
|
||||
},
|
||||
"requestResource": {
|
||||
"group": "12",
|
||||
"version": "13",
|
||||
"resource": "14"
|
||||
},
|
||||
"requestSubResource": "15",
|
||||
"name": "16",
|
||||
"namespace": "17",
|
||||
"operation": "¡ıŵDz",
|
||||
"userInfo": {
|
||||
"username": "18",
|
||||
"uid": "19",
|
||||
"groups": [
|
||||
"20"
|
||||
],
|
||||
"extra": {
|
||||
"21": [
|
||||
"22"
|
||||
]
|
||||
}
|
||||
},
|
||||
"object": {"apiVersion":"example.com/v1","kind":"CustomType","spec":{"replicas":1},"status":{"available":1}},
|
||||
"oldObject": {"apiVersion":"example.com/v1","kind":"CustomType","spec":{"replicas":1},"status":{"available":1}},
|
||||
"dryRun": false,
|
||||
"options": {"apiVersion":"example.com/v1","kind":"CustomType","spec":{"replicas":1},"status":{"available":1}}
|
||||
},
|
||||
"response": {
|
||||
"uid": "輂]¨\u0026桰]]æȌ殸2爟¼ªov鈶",
|
||||
"allowed": false,
|
||||
"status": {
|
||||
"metadata": {
|
||||
"selfLink": "(湗Ć]ʪƬ滈憴Uą飋ī",
|
||||
"resourceVersion": "71208173751669476"
|
||||
},
|
||||
"status": "23",
|
||||
"message": "24",
|
||||
"reason": "Hr鯹)晿\u003co,c鮽ort昍řČ扷5Ɨ",
|
||||
"details": {
|
||||
"name": "25",
|
||||
"group": "26",
|
||||
"kind": "27",
|
||||
"uid": "Ƣ6/ʕVŚ(ĿȊ甞",
|
||||
"causes": [
|
||||
{
|
||||
"reason": "颋Dž",
|
||||
"message": "28",
|
||||
"field": "29"
|
||||
}
|
||||
],
|
||||
"retryAfterSeconds": 1001983654
|
||||
},
|
||||
"code": 153738858
|
||||
},
|
||||
"patch": "fQ==",
|
||||
"patchType": "-Ǐ忄*齧獚敆Ȏțê",
|
||||
"auditAnnotations": {
|
||||
"30": "31"
|
||||
}
|
||||
}
|
||||
}
|
BIN
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.pb
vendored
Normal file
BIN
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.pb
vendored
Normal file
Binary file not shown.
80
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.yaml
vendored
Normal file
80
staging/src/k8s.io/api/testdata/HEAD/admission.k8s.io.v1.AdmissionReview.yaml
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
apiVersion: admission.k8s.io/v1
|
||||
kind: AdmissionReview
|
||||
request:
|
||||
dryRun: false
|
||||
kind:
|
||||
group: "2"
|
||||
kind: "4"
|
||||
version: "3"
|
||||
name: "16"
|
||||
namespace: "17"
|
||||
object:
|
||||
apiVersion: example.com/v1
|
||||
kind: CustomType
|
||||
spec:
|
||||
replicas: 1
|
||||
status:
|
||||
available: 1
|
||||
oldObject:
|
||||
apiVersion: example.com/v1
|
||||
kind: CustomType
|
||||
spec:
|
||||
replicas: 1
|
||||
status:
|
||||
available: 1
|
||||
operation: ¡ıŵDz
|
||||
options:
|
||||
apiVersion: example.com/v1
|
||||
kind: CustomType
|
||||
spec:
|
||||
replicas: 1
|
||||
status:
|
||||
available: 1
|
||||
requestKind:
|
||||
group: "9"
|
||||
kind: "11"
|
||||
version: "10"
|
||||
requestResource:
|
||||
group: "12"
|
||||
resource: "14"
|
||||
version: "13"
|
||||
requestSubResource: "15"
|
||||
resource:
|
||||
group: "5"
|
||||
resource: "7"
|
||||
version: "6"
|
||||
subResource: "8"
|
||||
uid: ő岅ȕHH壬%龺ǟ橸章蒪ʤǎ
|
||||
userInfo:
|
||||
extra:
|
||||
"21":
|
||||
- "22"
|
||||
groups:
|
||||
- "20"
|
||||
uid: "19"
|
||||
username: "18"
|
||||
response:
|
||||
allowed: false
|
||||
auditAnnotations:
|
||||
"30": "31"
|
||||
patch: fQ==
|
||||
patchType: -Ǐ忄*齧獚敆Ȏțê
|
||||
status:
|
||||
code: 153738858
|
||||
details:
|
||||
causes:
|
||||
- field: "29"
|
||||
message: "28"
|
||||
reason: 颋Dž
|
||||
group: "26"
|
||||
kind: "27"
|
||||
name: "25"
|
||||
retryAfterSeconds: 1001983654
|
||||
uid: Ƣ6/ʕVŚ(ĿȊ甞
|
||||
message: "24"
|
||||
metadata:
|
||||
resourceVersion: "71208173751669476"
|
||||
selfLink: (湗Ć]ʪƬ滈憴Uą飋ī
|
||||
reason: Hr鯹)晿<o,c鮽ort昍řČ扷5Ɨ
|
||||
status: "23"
|
||||
uid: 輂]¨&桰]]æȌ殸2爟¼ªov鈶
|
@ -11,6 +11,7 @@ go_library(
|
||||
importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/generic",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
|
@ -12,7 +12,7 @@ go_library(
|
||||
importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
|
@ -1,4 +1,4 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@ -10,10 +10,12 @@ go_library(
|
||||
importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/request",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/authentication/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic:go_default_library",
|
||||
],
|
||||
@ -32,3 +34,26 @@ filegroup(
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["admissionreview_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/apps/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/authentication/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1: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/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/admission:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
|
||||
"//vendor/github.com/google/go-cmp/cmp:go_default_library",
|
||||
"//vendor/k8s.io/utils/pointer:go_default_library",
|
||||
],
|
||||
)
|
||||
|
@ -11,7 +11,6 @@ go_library(
|
||||
importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/validating",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
|
@ -14,6 +14,7 @@ go_library(
|
||||
"//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1: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/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
|
||||
"//staging/src/k8s.io/apiserver/pkg/apis/audit/install:go_default_library",
|
||||
|
@ -10,6 +10,7 @@ go_library(
|
||||
importpath = "k8s.io/kubectl/pkg/scheme",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
|
@ -15,7 +15,9 @@ go_test(
|
||||
],
|
||||
deps = [
|
||||
"//cmd/kube-apiserver/app/testing:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admission/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library",
|
||||
"//staging/src/k8s.io/api/apps/v1:go_default_library",
|
||||
"//staging/src/k8s.io/api/apps/v1beta1:go_default_library",
|
||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@ -1019,6 +1019,7 @@ gopkg.in/warnings.v0
|
||||
# gopkg.in/yaml.v2 v2.2.2 => gopkg.in/yaml.v2 v2.2.2
|
||||
gopkg.in/yaml.v2
|
||||
# k8s.io/api v0.0.0 => ./staging/src/k8s.io/api
|
||||
k8s.io/api/admission/v1
|
||||
k8s.io/api/admission/v1beta1
|
||||
k8s.io/api/admissionregistration/v1
|
||||
k8s.io/api/admissionregistration/v1beta1
|
||||
|
Loading…
Reference in New Issue
Block a user