From cb43840492b383f4e1b87d7108d51c6439e1dad5 Mon Sep 17 00:00:00 2001 From: mbohlool Date: Tue, 7 Nov 2017 12:42:06 -0800 Subject: [PATCH] Update generated files --- api/openapi-spec/swagger.json | 342 ++-- ...admissionregistration.k8s.io_v1alpha1.json | 114 +- .../v1alpha1/definitions.html | 330 +-- .../v1alpha1/operations.html | 48 +- pkg/BUILD | 2 + .../v1alpha1/zz_generated.conversion.go | 220 +- .../v1alpha1/zz_generated.defaults.go | 20 +- .../zz_generated.deepcopy.go | 278 +-- .../internalversion/BUILD | 2 +- .../admissionregistration_client.go | 10 +- .../externaladmissionhookconfiguration.go | 145 -- .../internalversion/fake/BUILD | 2 +- .../fake/fake_admissionregistration_client.go | 8 +- ...fake_externaladmissionhookconfiguration.go | 118 -- .../fake_validatingwebhookconfiguration.go | 118 ++ .../internalversion/generated_expansion.go | 4 +- .../validatingwebhookconfiguration.go | 145 ++ .../internalversion/BUILD | 2 +- .../internalversion/interface.go | 14 +- ...n.go => validatingwebhookconfiguration.go} | 38 +- .../internalversion/generic.go | 4 +- .../internalversion/BUILD | 2 +- .../internalversion/expansion_generated.go | 8 +- .../externaladmissionhookconfiguration.go | 65 - .../validatingwebhookconfiguration.go | 65 + .../listers/apis/admissionregistration/BUILD | 32 + .../expansion_generated.go | 27 + .../initializerconfiguration.go | 65 + pkg/registry/BUILD | 2 +- pkg/registry/admissionregistration/rest/BUILD | 2 +- .../BUILD | 4 +- .../storage/BUILD | 4 +- .../v1alpha1/generated.pb.go | 1799 ++++++++--------- .../v1alpha1/generated.proto | 130 +- .../v1alpha1/types_swagger_doc_generated.go | 86 +- .../v1alpha1/zz_generated.deepcopy.go | 278 +-- .../pkg/admission/configuration/BUILD | 4 +- .../admissionregistration/v1alpha1/BUILD | 2 +- .../externaladmissionhookconfiguration.go | 87 - .../v1alpha1/interface.go | 14 +- .../validatingwebhookconfiguration.go | 87 + .../src/k8s.io/client-go/informers/generic.go | 4 +- .../admissionregistration/v1alpha1/BUILD | 2 +- .../v1alpha1/admissionregistration_client.go | 10 +- .../externaladmissionhookconfiguration.go | 145 -- .../admissionregistration/v1alpha1/fake/BUILD | 2 +- .../fake/fake_admissionregistration_client.go | 8 +- ...fake_externaladmissionhookconfiguration.go | 118 -- .../fake_validatingwebhookconfiguration.go | 118 ++ .../v1alpha1/generated_expansion.go | 4 +- .../validatingwebhookconfiguration.go | 145 ++ .../admissionregistration/v1alpha1/BUILD | 2 +- .../v1alpha1/expansion_generated.go | 8 +- .../externaladmissionhookconfiguration.go | 65 - .../validatingwebhookconfiguration.go | 65 + 55 files changed, 2769 insertions(+), 2654 deletions(-) delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/externaladmissionhookconfiguration.go delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_externaladmissionhookconfiguration.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go rename pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/{externaladmissionhookconfiguration.go => validatingwebhookconfiguration.go} (50%) delete mode 100644 pkg/client/listers/admissionregistration/internalversion/externaladmissionhookconfiguration.go create mode 100644 pkg/client/listers/admissionregistration/internalversion/validatingwebhookconfiguration.go create mode 100644 pkg/client/listers/apis/admissionregistration/BUILD create mode 100644 pkg/client/listers/apis/admissionregistration/expansion_generated.go create mode 100644 pkg/client/listers/apis/admissionregistration/initializerconfiguration.go rename pkg/registry/admissionregistration/{externaladmissionhookconfiguration => validatingwebhookconfiguration}/BUILD (88%) rename pkg/registry/admissionregistration/{externaladmissionhookconfiguration => validatingwebhookconfiguration}/storage/BUILD (83%) delete mode 100644 staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go create mode 100644 staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_externaladmissionhookconfiguration.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingwebhookconfiguration.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingwebhookconfiguration.go delete mode 100644 staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go create mode 100644 staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index e156a0c560..35bdaeabc2 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -18837,7 +18837,7 @@ }, "/apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations": { "get": { - "description": "list or watch objects of kind ExternalAdmissionHookConfiguration", + "description": "list or watch objects of kind ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -18854,7 +18854,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "listAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "listAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "uniqueItems": true, @@ -18917,7 +18917,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList" } }, "401": { @@ -18927,12 +18927,12 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, "post": { - "description": "create an ExternalAdmissionHookConfiguration", + "description": "create a ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -18947,14 +18947,14 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "createAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "createAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } } ], @@ -18962,19 +18962,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "401": { @@ -18984,12 +18984,12 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, "delete": { - "description": "delete collection of ExternalAdmissionHookConfiguration", + "description": "delete collection of ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19004,7 +19004,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "deleteAdmissionregistrationV1alpha1CollectionExternalAdmissionHookConfiguration", + "operationId": "deleteAdmissionregistrationV1alpha1CollectionValidatingWebhookConfiguration", "parameters": [ { "uniqueItems": true, @@ -19077,7 +19077,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, @@ -19093,7 +19093,7 @@ }, "/apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}": { "get": { - "description": "read the specified ExternalAdmissionHookConfiguration", + "description": "read the specified ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19108,7 +19108,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "readAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "readAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "uniqueItems": true, @@ -19129,7 +19129,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "401": { @@ -19139,12 +19139,12 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, "put": { - "description": "replace the specified ExternalAdmissionHookConfiguration", + "description": "replace the specified ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19159,14 +19159,14 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "replaceAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "replaceAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } } ], @@ -19174,13 +19174,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "401": { @@ -19190,12 +19190,12 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, "delete": { - "description": "delete an ExternalAdmissionHookConfiguration", + "description": "delete a ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19210,7 +19210,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "deleteAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "deleteAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "name": "body", @@ -19256,12 +19256,12 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, "patch": { - "description": "partially update the specified ExternalAdmissionHookConfiguration", + "description": "partially update the specified ValidatingWebhookConfiguration", "consumes": [ "application/json-patch+json", "application/merge-patch+json", @@ -19278,7 +19278,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "patchAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "patchAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "parameters": [ { "name": "body", @@ -19293,7 +19293,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" } }, "401": { @@ -19303,7 +19303,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, @@ -19311,7 +19311,7 @@ { "uniqueItems": true, "type": "string", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "name": "name", "in": "path", "required": true @@ -19817,7 +19817,7 @@ }, "/apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations": { "get": { - "description": "watch individual changes to a list of ExternalAdmissionHookConfiguration", + "description": "watch individual changes to a list of ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19834,7 +19834,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "watchAdmissionregistrationV1alpha1ExternalAdmissionHookConfigurationList", + "operationId": "watchAdmissionregistrationV1alpha1ValidatingWebhookConfigurationList", "responses": { "200": { "description": "OK", @@ -19849,7 +19849,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, @@ -19921,7 +19921,7 @@ }, "/apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations/{name}": { "get": { - "description": "watch changes to an object of kind ExternalAdmissionHookConfiguration", + "description": "watch changes to an object of kind ValidatingWebhookConfiguration", "consumes": [ "*/*" ], @@ -19938,7 +19938,7 @@ "tags": [ "admissionregistration_v1alpha1" ], - "operationId": "watchAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", + "operationId": "watchAdmissionregistrationV1alpha1ValidatingWebhookConfiguration", "responses": { "200": { "description": "OK", @@ -19953,7 +19953,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", + "kind": "ValidatingWebhookConfiguration", "version": "v1alpha1" } }, @@ -19996,7 +19996,7 @@ { "uniqueItems": true, "type": "string", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "name": "name", "in": "path", "required": true @@ -66522,124 +66522,6 @@ } }, "definitions": { - "io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig": { - "description": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook", - "required": [ - "service", - "urlPath", - "caBundle" - ], - "properties": { - "caBundle": { - "description": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", - "type": "string", - "format": "byte" - }, - "service": { - "description": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference" - }, - "urlPath": { - "description": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.", - "type": "string" - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook": { - "description": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.", - "required": [ - "name", - "clientConfig" - ], - "properties": { - "clientConfig": { - "description": "ClientConfig defines how to communicate with the hook. Required", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig" - }, - "failurePolicy": { - "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", - "type": "string" - }, - "name": { - "description": "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", - "type": "string" - }, - "rules": { - "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration": { - "description": "ExternalAdmissionHookConfiguration describes the configuration of initializers.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - "type": "string" - }, - "externalAdmissionHooks": { - "description": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": { - "description": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ExternalAdmissionHookConfiguration.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfigurationList", - "version": "v1alpha1" - } - ] - }, "io.k8s.api.admissionregistration.v1alpha1.Initializer": { "description": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", "required": [ @@ -66802,6 +66684,124 @@ } } }, + "io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration": { + "description": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", + "properties": { + "Webhooks": { + "description": "Webhooks is a list of webhooks and the affected resources and operations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Webhook" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1alpha1" + } + ] + }, + "io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList": { + "description": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ValidatingWebhookConfiguration.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfigurationList", + "version": "v1alpha1" + } + ] + }, + "io.k8s.api.admissionregistration.v1alpha1.Webhook": { + "description": "Webhook describes an admission webhook and the resources and operations it applies to.", + "required": [ + "name", + "clientConfig" + ], + "properties": { + "clientConfig": { + "description": "ClientConfig defines how to communicate with the hook. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.WebhookClientConfig" + }, + "failurePolicy": { + "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", + "type": "string" + }, + "name": { + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "type": "string" + }, + "rules": { + "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations" + } + } + } + }, + "io.k8s.api.admissionregistration.v1alpha1.WebhookClientConfig": { + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook", + "required": [ + "service", + "urlPath", + "caBundle" + ], + "properties": { + "caBundle": { + "description": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", + "type": "string", + "format": "byte" + }, + "service": { + "description": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference" + }, + "urlPath": { + "description": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.", + "type": "string" + } + } + }, "io.k8s.api.apps.v1.ControllerRevision": { "description": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", "required": [ @@ -80926,22 +80926,6 @@ "description": "Deprecated. Please use io.k8s.api.core.v1.WeightedPodAffinityTerm instead.", "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.AdmissionHookClientConfig": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHook": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList" - }, "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Initializer": { "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Initializer instead.", "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Initializer" @@ -80966,6 +80950,18 @@ "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ServiceReference instead.", "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference" }, + "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ValidatingWebhookConfiguration": { + "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration instead.", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration" + }, + "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList": { + "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList instead.", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList" + }, + "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Webhook": { + "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Webhook instead.", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Webhook" + }, "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ControllerRevision": { "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ControllerRevision instead.", "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" diff --git a/api/swagger-spec/admissionregistration.k8s.io_v1alpha1.json b/api/swagger-spec/admissionregistration.k8s.io_v1alpha1.json index 467625a71a..6669cbabf6 100644 --- a/api/swagger-spec/admissionregistration.k8s.io_v1alpha1.json +++ b/api/swagger-spec/admissionregistration.k8s.io_v1alpha1.json @@ -13,10 +13,10 @@ "description": "API at /apis/admissionregistration.k8s.io/v1alpha1", "operations": [ { - "type": "v1alpha1.ExternalAdmissionHookConfigurationList", + "type": "v1alpha1.ValidatingWebhookConfigurationList", "method": "GET", - "summary": "list or watch objects of kind ExternalAdmissionHookConfiguration", - "nickname": "listExternalAdmissionHookConfiguration", + "summary": "list or watch objects of kind ValidatingWebhookConfiguration", + "nickname": "listValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -95,7 +95,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.ExternalAdmissionHookConfigurationList" + "responseModel": "v1alpha1.ValidatingWebhookConfigurationList" } ], "produces": [ @@ -110,10 +110,10 @@ ] }, { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "method": "POST", - "summary": "create an ExternalAdmissionHookConfiguration", - "nickname": "createExternalAdmissionHookConfiguration", + "summary": "create a ValidatingWebhookConfiguration", + "nickname": "createValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -124,7 +124,7 @@ "allowMultiple": false }, { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "paramType": "body", "name": "body", "description": "", @@ -136,17 +136,17 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" }, { "code": 201, "message": "Created", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" }, { "code": 202, "message": "Accepted", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" } ], "produces": [ @@ -161,8 +161,8 @@ { "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of ExternalAdmissionHookConfiguration", - "nickname": "deletecollectionExternalAdmissionHookConfiguration", + "summary": "delete collection of ValidatingWebhookConfiguration", + "nickname": "deletecollectionValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -262,8 +262,8 @@ { "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of ExternalAdmissionHookConfiguration", - "nickname": "watchExternalAdmissionHookConfigurationList", + "summary": "watch individual changes to a list of ValidatingWebhookConfiguration", + "nickname": "watchValidatingWebhookConfigurationList", "parameters": [ { "type": "string", @@ -363,10 +363,10 @@ "description": "API at /apis/admissionregistration.k8s.io/v1alpha1", "operations": [ { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "method": "GET", - "summary": "read the specified ExternalAdmissionHookConfiguration", - "nickname": "readExternalAdmissionHookConfiguration", + "summary": "read the specified ValidatingWebhookConfiguration", + "nickname": "readValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -396,7 +396,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "required": true, "allowMultiple": false } @@ -405,7 +405,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" } ], "produces": [ @@ -418,10 +418,10 @@ ] }, { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "method": "PUT", - "summary": "replace the specified ExternalAdmissionHookConfiguration", - "nickname": "replaceExternalAdmissionHookConfiguration", + "summary": "replace the specified ValidatingWebhookConfiguration", + "nickname": "replaceValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -432,7 +432,7 @@ "allowMultiple": false }, { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "paramType": "body", "name": "body", "description": "", @@ -443,7 +443,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "required": true, "allowMultiple": false } @@ -452,12 +452,12 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" }, { "code": 201, "message": "Created", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" } ], "produces": [ @@ -470,10 +470,10 @@ ] }, { - "type": "v1alpha1.ExternalAdmissionHookConfiguration", + "type": "v1alpha1.ValidatingWebhookConfiguration", "method": "PATCH", - "summary": "partially update the specified ExternalAdmissionHookConfiguration", - "nickname": "patchExternalAdmissionHookConfiguration", + "summary": "partially update the specified ValidatingWebhookConfiguration", + "nickname": "patchValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -495,7 +495,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "required": true, "allowMultiple": false } @@ -504,7 +504,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1alpha1.ExternalAdmissionHookConfiguration" + "responseModel": "v1alpha1.ValidatingWebhookConfiguration" } ], "produces": [ @@ -521,8 +521,8 @@ { "type": "v1.Status", "method": "DELETE", - "summary": "delete an ExternalAdmissionHookConfiguration", - "nickname": "deleteExternalAdmissionHookConfiguration", + "summary": "delete a ValidatingWebhookConfiguration", + "nickname": "deleteValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -568,7 +568,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "required": true, "allowMultiple": false } @@ -598,8 +598,8 @@ { "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind ExternalAdmissionHookConfiguration", - "nickname": "watchExternalAdmissionHookConfiguration", + "summary": "watch changes to an object of kind ValidatingWebhookConfiguration", + "nickname": "watchValidatingWebhookConfiguration", "parameters": [ { "type": "string", @@ -677,7 +677,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the ExternalAdmissionHookConfiguration", + "description": "name of the ValidatingWebhookConfiguration", "required": true, "allowMultiple": false } @@ -1421,9 +1421,9 @@ } ], "models": { - "v1alpha1.ExternalAdmissionHookConfigurationList": { - "id": "v1alpha1.ExternalAdmissionHookConfigurationList", - "description": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.", + "v1alpha1.ValidatingWebhookConfigurationList": { + "id": "v1alpha1.ValidatingWebhookConfigurationList", + "description": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", "required": [ "items" ], @@ -1443,9 +1443,9 @@ "items": { "type": "array", "items": { - "$ref": "v1alpha1.ExternalAdmissionHookConfiguration" + "$ref": "v1alpha1.ValidatingWebhookConfiguration" }, - "description": "List of ExternalAdmissionHookConfiguration." + "description": "List of ValidatingWebhookConfiguration." } } }, @@ -1467,9 +1467,9 @@ } } }, - "v1alpha1.ExternalAdmissionHookConfiguration": { - "id": "v1alpha1.ExternalAdmissionHookConfiguration", - "description": "ExternalAdmissionHookConfiguration describes the configuration of initializers.", + "v1alpha1.ValidatingWebhookConfiguration": { + "id": "v1alpha1.ValidatingWebhookConfiguration", + "description": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", "properties": { "kind": { "type": "string", @@ -1483,12 +1483,12 @@ "$ref": "v1.ObjectMeta", "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata." }, - "externalAdmissionHooks": { + "Webhooks": { "type": "array", "items": { - "$ref": "v1alpha1.ExternalAdmissionHook" + "$ref": "v1alpha1.Webhook" }, - "description": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations." + "description": "Webhooks is a list of webhooks and the affected resources and operations." } } }, @@ -1730,9 +1730,9 @@ } } }, - "v1alpha1.ExternalAdmissionHook": { - "id": "v1alpha1.ExternalAdmissionHook", - "description": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.", + "v1alpha1.Webhook": { + "id": "v1alpha1.Webhook", + "description": "Webhook describes an admission webhook and the resources and operations it applies to.", "required": [ "name", "clientConfig" @@ -1740,10 +1740,10 @@ "properties": { "name": { "type": "string", - "description": "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required." + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required." }, "clientConfig": { - "$ref": "v1alpha1.AdmissionHookClientConfig", + "$ref": "v1alpha1.WebhookClientConfig", "description": "ClientConfig defines how to communicate with the hook. Required" }, "rules": { @@ -1759,9 +1759,9 @@ } } }, - "v1alpha1.AdmissionHookClientConfig": { - "id": "v1alpha1.AdmissionHookClientConfig", - "description": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook", + "v1alpha1.WebhookClientConfig": { + "id": "v1alpha1.WebhookClientConfig", + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook", "required": [ "service", "urlPath", diff --git a/docs/api-reference/admissionregistration.k8s.io/v1alpha1/definitions.html b/docs/api-reference/admissionregistration.k8s.io/v1alpha1/definitions.html index 727cfd5562..a4cb314685 100755 --- a/docs/api-reference/admissionregistration.k8s.io/v1alpha1/definitions.html +++ b/docs/api-reference/admissionregistration.k8s.io/v1alpha1/definitions.html @@ -376,10 +376,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1alpha1.InitializerConfigurationList

  • -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

  • -

    v1alpha1.ExternalAdmissionHookConfigurationList

    +

    v1alpha1.ValidatingWebhookConfigurationList

  • @@ -442,6 +442,61 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
    +

    v1alpha1.Webhook

    +
    +

    Webhook describes an admission webhook and the resources and operations it applies to.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    name

    The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required.

    true

    string

    clientConfig

    ClientConfig defines how to communicate with the hook. Required

    true

    v1alpha1.WebhookClientConfig

    rules

    Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches any Rule.

    false

    v1alpha1.RuleWithOperations array

    failurePolicy

    FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.

    false

    v1alpha1.FailurePolicyType

    +

    v1alpha1.OperationType

    @@ -504,6 +559,54 @@ Depending on the enclosing object, subresources might not be allowed. Required.< +
    +
    +

    v1alpha1.WebhookClientConfig

    +
    +

    WebhookClientConfig contains the information to make a TLS connection with the webhook

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    service

    Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required

    true

    v1alpha1.ServiceReference

    urlPath

    URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.

    true

    string

    caBundle

    CABundle is a PEM encoded CA bundle which will be used to validate webhook’s server certificate. Required

    true

    string

    +

    v1alpha1.RuleWithOperations

    @@ -688,54 +791,6 @@ Depending on the enclosing object, subresources might not be allowed. Required.< -
    -
    -

    v1alpha1.AdmissionHookClientConfig

    -
    -

    AdmissionHookClientConfig contains the information to make a TLS connection with the webhook

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    service

    Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required

    true

    v1alpha1.ServiceReference

    urlPath

    URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.

    true

    string

    caBundle

    CABundle is a PEM encoded CA bundle which will be used to validate webhook’s server certificate. Required

    true

    string

    -

    v1.Status

    @@ -857,61 +912,6 @@ Depending on the enclosing object, subresources might not be allowed. Required.< -
    -
    -

    v1alpha1.ExternalAdmissionHook

    -
    -

    ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    name

    The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required.

    true

    string

    clientConfig

    ClientConfig defines how to communicate with the hook. Required

    true

    v1alpha1.AdmissionHookClientConfig

    rules

    Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches any Rule.

    false

    v1alpha1.RuleWithOperations array

    failurePolicy

    FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.

    false

    v1alpha1.FailurePolicyType

    -

    v1alpha1.ServiceReference

    @@ -996,9 +996,9 @@ Depending on the enclosing object, subresources might not be allowed. Required.<
    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    -

    ExternalAdmissionHookConfiguration describes the configuration of initializers.

    +

    ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.

    @@ -1040,10 +1040,10 @@ Depending on the enclosing object, subresources might not be allowed. Required.< - - + + - + @@ -1128,6 +1128,61 @@ Depending on the enclosing object, subresources might not be allowed. Required.<

    externalAdmissionHooks

    ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.

    Webhooks

    Webhooks is a list of webhooks and the affected resources and operations.

    false

    v1alpha1.ExternalAdmissionHook array

    v1alpha1.Webhook array

    +
    +
    +

    v1alpha1.ValidatingWebhookConfigurationList

    +
    +

    ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    v1.ListMeta

    items

    List of ValidatingWebhookConfiguration.

    true

    v1alpha1.ValidatingWebhookConfiguration array

    +

    v1.StatusDetails

    @@ -1656,61 +1711,6 @@ Examples:
    -
    -
    -

    v1alpha1.ExternalAdmissionHookConfigurationList

    -
    -

    ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    v1.ListMeta

    items

    List of ExternalAdmissionHookConfiguration.

    true

    v1alpha1.ExternalAdmissionHookConfiguration array

    -

    v1alpha1.InitializerConfigurationList

    diff --git a/docs/api-reference/admissionregistration.k8s.io/v1alpha1/operations.html b/docs/api-reference/admissionregistration.k8s.io/v1alpha1/operations.html index 0d0ae0d776..4a11b98652 100755 --- a/docs/api-reference/admissionregistration.k8s.io/v1alpha1/operations.html +++ b/docs/api-reference/admissionregistration.k8s.io/v1alpha1/operations.html @@ -443,7 +443,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    list or watch objects of kind ExternalAdmissionHookConfiguration

    +

    list or watch objects of kind ValidatingWebhookConfiguration

    GET /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations
    @@ -567,7 +567,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1alpha1.ExternalAdmissionHookConfigurationList

    +

    v1alpha1.ValidatingWebhookConfigurationList

    @@ -617,7 +617,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    delete collection of ExternalAdmissionHookConfiguration

    +

    delete collection of ValidatingWebhookConfiguration

    DELETE /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations
    @@ -785,7 +785,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    create an ExternalAdmissionHookConfiguration

    +

    create a ValidatingWebhookConfiguration

    POST /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations
    @@ -826,7 +826,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    body

    true

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    @@ -852,17 +852,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    202

    Accepted

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    200

    success

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    201

    Created

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    @@ -906,7 +906,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    read the specified ExternalAdmissionHookConfiguration

    +

    read the specified ValidatingWebhookConfiguration

    GET /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}
    @@ -961,7 +961,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    PathParameter

    name

    -

    name of the ExternalAdmissionHookConfiguration

    +

    name of the ValidatingWebhookConfiguration

    true

    string

    @@ -989,7 +989,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    @@ -1033,7 +1033,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    replace the specified ExternalAdmissionHookConfiguration

    +

    replace the specified ValidatingWebhookConfiguration

    PUT /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}
    @@ -1074,13 +1074,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    body

    true

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    PathParameter

    name

    -

    name of the ExternalAdmissionHookConfiguration

    +

    name of the ValidatingWebhookConfiguration

    true

    string

    @@ -1108,12 +1108,12 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    201

    Created

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    @@ -1157,7 +1157,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    delete an ExternalAdmissionHookConfiguration

    +

    delete a ValidatingWebhookConfiguration

    DELETE /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}
    @@ -1228,7 +1228,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    PathParameter

    name

    -

    name of the ExternalAdmissionHookConfiguration

    +

    name of the ValidatingWebhookConfiguration

    true

    string

    @@ -1300,7 +1300,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    partially update the specified ExternalAdmissionHookConfiguration

    +

    partially update the specified ValidatingWebhookConfiguration

    PATCH /apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}
    @@ -1347,7 +1347,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    PathParameter

    name

    -

    name of the ExternalAdmissionHookConfiguration

    +

    name of the ValidatingWebhookConfiguration

    true

    string

    @@ -1375,7 +1375,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1alpha1.ExternalAdmissionHookConfiguration

    +

    v1alpha1.ValidatingWebhookConfiguration

    @@ -2407,7 +2407,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of ExternalAdmissionHookConfiguration

    +

    watch individual changes to a list of ValidatingWebhookConfiguration

    GET /apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations
    @@ -2581,7 +2581,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch changes to an object of kind ExternalAdmissionHookConfiguration

    +

    watch changes to an object of kind ValidatingWebhookConfiguration

    GET /apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations/{name}
    @@ -2685,7 +2685,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    PathParameter

    name

    -

    name of the ExternalAdmissionHookConfiguration

    +

    name of the ValidatingWebhookConfiguration

    true

    string

    diff --git a/pkg/BUILD b/pkg/BUILD index 3419a56f65..ccf13ccf24 100644 --- a/pkg/BUILD +++ b/pkg/BUILD @@ -54,9 +54,11 @@ filegroup( "//pkg/client/chaosclient:all-srcs", "//pkg/client/clientset_generated/internalclientset:all-srcs", "//pkg/client/conditions:all-srcs", + "//pkg/client/informers/informers_generated/externalversions:all-srcs", "//pkg/client/informers/informers_generated/internalversion:all-srcs", "//pkg/client/leaderelectionconfig:all-srcs", "//pkg/client/listers/admissionregistration/internalversion:all-srcs", + "//pkg/client/listers/apis/admissionregistration:all-srcs", "//pkg/client/listers/apps/internalversion:all-srcs", "//pkg/client/listers/authentication/internalversion:all-srcs", "//pkg/client/listers/authorization/internalversion:all-srcs", diff --git a/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go b/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go index 792254ba65..5072d1f0ec 100644 --- a/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go @@ -36,14 +36,6 @@ func init() { // Public to allow building arbitrary schemes. func RegisterConversions(scheme *runtime.Scheme) error { return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig, - Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig, - Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook, - Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook, - Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration, - Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration, - Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList, - Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList, Convert_v1alpha1_Initializer_To_admissionregistration_Initializer, Convert_admissionregistration_Initializer_To_v1alpha1_Initializer, Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration, @@ -56,111 +48,17 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations, Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference, Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference, + Convert_v1alpha1_ValidatingWebhookConfiguration_To_admissionregistration_ValidatingWebhookConfiguration, + Convert_admissionregistration_ValidatingWebhookConfiguration_To_v1alpha1_ValidatingWebhookConfiguration, + Convert_v1alpha1_ValidatingWebhookConfigurationList_To_admissionregistration_ValidatingWebhookConfigurationList, + Convert_admissionregistration_ValidatingWebhookConfigurationList_To_v1alpha1_ValidatingWebhookConfigurationList, + Convert_v1alpha1_Webhook_To_admissionregistration_Webhook, + Convert_admissionregistration_Webhook_To_v1alpha1_Webhook, + Convert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig, + Convert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig, ) } -func autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *v1alpha1.AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error { - if err := Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(&in.Service, &out.Service, s); err != nil { - return err - } - out.URLPath = in.URLPath - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig is an autogenerated conversion function. -func Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *v1alpha1.AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in, out, s) -} - -func autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *v1alpha1.AdmissionHookClientConfig, s conversion.Scope) error { - if err := Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil { - return err - } - out.URLPath = in.URLPath - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig is an autogenerated conversion function. -func Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *v1alpha1.AdmissionHookClientConfig, s conversion.Scope) error { - return autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in, out, s) -} - -func autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *v1alpha1.ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { - return err - } - out.Rules = *(*[]admissionregistration.RuleWithOperations)(unsafe.Pointer(&in.Rules)) - out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy)) - return nil -} - -// Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook is an autogenerated conversion function. -func Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *v1alpha1.ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error { - return autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in, out, s) -} - -func autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *v1alpha1.ExternalAdmissionHook, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { - return err - } - out.Rules = *(*[]v1alpha1.RuleWithOperations)(unsafe.Pointer(&in.Rules)) - out.FailurePolicy = (*v1alpha1.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy)) - return nil -} - -// Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook is an autogenerated conversion function. -func Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *v1alpha1.ExternalAdmissionHook, s conversion.Scope) error { - return autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in, out, s) -} - -func autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *v1alpha1.ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.ExternalAdmissionHooks = *(*[]admissionregistration.ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks)) - return nil -} - -// Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration is an autogenerated conversion function. -func Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *v1alpha1.ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in, out, s) -} - -func autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *v1alpha1.ExternalAdmissionHookConfiguration, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.ExternalAdmissionHooks = *(*[]v1alpha1.ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks)) - return nil -} - -// Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration is an autogenerated conversion function. -func Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *v1alpha1.ExternalAdmissionHookConfiguration, s conversion.Scope) error { - return autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in, out, s) -} - -func autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *v1alpha1.ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]admissionregistration.ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList is an autogenerated conversion function. -func Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *v1alpha1.ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error { - return autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in, out, s) -} - -func autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *v1alpha1.ExternalAdmissionHookConfigurationList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha1.ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList is an autogenerated conversion function. -func Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *v1alpha1.ExternalAdmissionHookConfigurationList, s conversion.Scope) error { - return autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in, out, s) -} - func autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *v1alpha1.Initializer, out *admissionregistration.Initializer, s conversion.Scope) error { out.Name = in.Name out.Rules = *(*[]admissionregistration.Rule)(unsafe.Pointer(&in.Rules)) @@ -298,3 +196,105 @@ func autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceRefer func Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in *admissionregistration.ServiceReference, out *v1alpha1.ServiceReference, s conversion.Scope) error { return autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s) } + +func autoConvert_v1alpha1_ValidatingWebhookConfiguration_To_admissionregistration_ValidatingWebhookConfiguration(in *v1alpha1.ValidatingWebhookConfiguration, out *admissionregistration.ValidatingWebhookConfiguration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Webhooks = *(*[]admissionregistration.Webhook)(unsafe.Pointer(&in.Webhooks)) + return nil +} + +// Convert_v1alpha1_ValidatingWebhookConfiguration_To_admissionregistration_ValidatingWebhookConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_ValidatingWebhookConfiguration_To_admissionregistration_ValidatingWebhookConfiguration(in *v1alpha1.ValidatingWebhookConfiguration, out *admissionregistration.ValidatingWebhookConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ValidatingWebhookConfiguration_To_admissionregistration_ValidatingWebhookConfiguration(in, out, s) +} + +func autoConvert_admissionregistration_ValidatingWebhookConfiguration_To_v1alpha1_ValidatingWebhookConfiguration(in *admissionregistration.ValidatingWebhookConfiguration, out *v1alpha1.ValidatingWebhookConfiguration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Webhooks = *(*[]v1alpha1.Webhook)(unsafe.Pointer(&in.Webhooks)) + return nil +} + +// Convert_admissionregistration_ValidatingWebhookConfiguration_To_v1alpha1_ValidatingWebhookConfiguration is an autogenerated conversion function. +func Convert_admissionregistration_ValidatingWebhookConfiguration_To_v1alpha1_ValidatingWebhookConfiguration(in *admissionregistration.ValidatingWebhookConfiguration, out *v1alpha1.ValidatingWebhookConfiguration, s conversion.Scope) error { + return autoConvert_admissionregistration_ValidatingWebhookConfiguration_To_v1alpha1_ValidatingWebhookConfiguration(in, out, s) +} + +func autoConvert_v1alpha1_ValidatingWebhookConfigurationList_To_admissionregistration_ValidatingWebhookConfigurationList(in *v1alpha1.ValidatingWebhookConfigurationList, out *admissionregistration.ValidatingWebhookConfigurationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]admissionregistration.ValidatingWebhookConfiguration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_ValidatingWebhookConfigurationList_To_admissionregistration_ValidatingWebhookConfigurationList is an autogenerated conversion function. +func Convert_v1alpha1_ValidatingWebhookConfigurationList_To_admissionregistration_ValidatingWebhookConfigurationList(in *v1alpha1.ValidatingWebhookConfigurationList, out *admissionregistration.ValidatingWebhookConfigurationList, s conversion.Scope) error { + return autoConvert_v1alpha1_ValidatingWebhookConfigurationList_To_admissionregistration_ValidatingWebhookConfigurationList(in, out, s) +} + +func autoConvert_admissionregistration_ValidatingWebhookConfigurationList_To_v1alpha1_ValidatingWebhookConfigurationList(in *admissionregistration.ValidatingWebhookConfigurationList, out *v1alpha1.ValidatingWebhookConfigurationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha1.ValidatingWebhookConfiguration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_admissionregistration_ValidatingWebhookConfigurationList_To_v1alpha1_ValidatingWebhookConfigurationList is an autogenerated conversion function. +func Convert_admissionregistration_ValidatingWebhookConfigurationList_To_v1alpha1_ValidatingWebhookConfigurationList(in *admissionregistration.ValidatingWebhookConfigurationList, out *v1alpha1.ValidatingWebhookConfigurationList, s conversion.Scope) error { + return autoConvert_admissionregistration_ValidatingWebhookConfigurationList_To_v1alpha1_ValidatingWebhookConfigurationList(in, out, s) +} + +func autoConvert_v1alpha1_Webhook_To_admissionregistration_Webhook(in *v1alpha1.Webhook, out *admissionregistration.Webhook, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { + return err + } + out.Rules = *(*[]admissionregistration.RuleWithOperations)(unsafe.Pointer(&in.Rules)) + out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy)) + return nil +} + +// Convert_v1alpha1_Webhook_To_admissionregistration_Webhook is an autogenerated conversion function. +func Convert_v1alpha1_Webhook_To_admissionregistration_Webhook(in *v1alpha1.Webhook, out *admissionregistration.Webhook, s conversion.Scope) error { + return autoConvert_v1alpha1_Webhook_To_admissionregistration_Webhook(in, out, s) +} + +func autoConvert_admissionregistration_Webhook_To_v1alpha1_Webhook(in *admissionregistration.Webhook, out *v1alpha1.Webhook, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { + return err + } + out.Rules = *(*[]v1alpha1.RuleWithOperations)(unsafe.Pointer(&in.Rules)) + out.FailurePolicy = (*v1alpha1.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy)) + return nil +} + +// Convert_admissionregistration_Webhook_To_v1alpha1_Webhook is an autogenerated conversion function. +func Convert_admissionregistration_Webhook_To_v1alpha1_Webhook(in *admissionregistration.Webhook, out *v1alpha1.Webhook, s conversion.Scope) error { + return autoConvert_admissionregistration_Webhook_To_v1alpha1_Webhook(in, out, s) +} + +func autoConvert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig(in *v1alpha1.WebhookClientConfig, out *admissionregistration.WebhookClientConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(&in.Service, &out.Service, s); err != nil { + return err + } + out.URLPath = in.URLPath + out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) + return nil +} + +// Convert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig is an autogenerated conversion function. +func Convert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig(in *v1alpha1.WebhookClientConfig, out *admissionregistration.WebhookClientConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_WebhookClientConfig_To_admissionregistration_WebhookClientConfig(in, out, s) +} + +func autoConvert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in *admissionregistration.WebhookClientConfig, out *v1alpha1.WebhookClientConfig, s conversion.Scope) error { + if err := Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil { + return err + } + out.URLPath = in.URLPath + out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) + return nil +} + +// Convert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig is an autogenerated conversion function. +func Convert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in *admissionregistration.WebhookClientConfig, out *v1alpha1.WebhookClientConfig, s conversion.Scope) error { + return autoConvert_admissionregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in, out, s) +} diff --git a/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go b/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go index da214c5d95..f6b2ad44f9 100644 --- a/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go @@ -29,25 +29,25 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v1alpha1.ExternalAdmissionHookConfiguration{}, func(obj interface{}) { - SetObjectDefaults_ExternalAdmissionHookConfiguration(obj.(*v1alpha1.ExternalAdmissionHookConfiguration)) + scheme.AddTypeDefaultingFunc(&v1alpha1.ValidatingWebhookConfiguration{}, func(obj interface{}) { + SetObjectDefaults_ValidatingWebhookConfiguration(obj.(*v1alpha1.ValidatingWebhookConfiguration)) }) - scheme.AddTypeDefaultingFunc(&v1alpha1.ExternalAdmissionHookConfigurationList{}, func(obj interface{}) { - SetObjectDefaults_ExternalAdmissionHookConfigurationList(obj.(*v1alpha1.ExternalAdmissionHookConfigurationList)) + scheme.AddTypeDefaultingFunc(&v1alpha1.ValidatingWebhookConfigurationList{}, func(obj interface{}) { + SetObjectDefaults_ValidatingWebhookConfigurationList(obj.(*v1alpha1.ValidatingWebhookConfigurationList)) }) return nil } -func SetObjectDefaults_ExternalAdmissionHookConfiguration(in *v1alpha1.ExternalAdmissionHookConfiguration) { - for i := range in.ExternalAdmissionHooks { - a := &in.ExternalAdmissionHooks[i] - SetDefaults_ExternalAdmissionHook(a) +func SetObjectDefaults_ValidatingWebhookConfiguration(in *v1alpha1.ValidatingWebhookConfiguration) { + for i := range in.Webhooks { + a := &in.Webhooks[i] + SetDefaults_Webhook(a) } } -func SetObjectDefaults_ExternalAdmissionHookConfigurationList(in *v1alpha1.ExternalAdmissionHookConfigurationList) { +func SetObjectDefaults_ValidatingWebhookConfigurationList(in *v1alpha1.ValidatingWebhookConfigurationList) { for i := range in.Items { a := &in.Items[i] - SetObjectDefaults_ExternalAdmissionHookConfiguration(a) + SetObjectDefaults_ValidatingWebhookConfiguration(a) } } diff --git a/pkg/apis/admissionregistration/zz_generated.deepcopy.go b/pkg/apis/admissionregistration/zz_generated.deepcopy.go index 4952a75f79..89943d70f4 100644 --- a/pkg/apis/admissionregistration/zz_generated.deepcopy.go +++ b/pkg/apis/admissionregistration/zz_generated.deepcopy.go @@ -36,22 +36,6 @@ func init() { // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*AdmissionHookClientConfig).DeepCopyInto(out.(*AdmissionHookClientConfig)) - return nil - }, InType: reflect.TypeOf(&AdmissionHookClientConfig{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHook).DeepCopyInto(out.(*ExternalAdmissionHook)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHook{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHookConfiguration).DeepCopyInto(out.(*ExternalAdmissionHookConfiguration)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHookConfigurationList).DeepCopyInto(out.(*ExternalAdmissionHookConfigurationList)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*Initializer).DeepCopyInto(out.(*Initializer)) return nil @@ -76,132 +60,25 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*ServiceReference).DeepCopyInto(out.(*ServiceReference)) return nil }, InType: reflect.TypeOf(&ServiceReference{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ValidatingWebhookConfiguration).DeepCopyInto(out.(*ValidatingWebhookConfiguration)) + return nil + }, InType: reflect.TypeOf(&ValidatingWebhookConfiguration{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ValidatingWebhookConfigurationList).DeepCopyInto(out.(*ValidatingWebhookConfigurationList)) + return nil + }, InType: reflect.TypeOf(&ValidatingWebhookConfigurationList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Webhook).DeepCopyInto(out.(*Webhook)) + return nil + }, InType: reflect.TypeOf(&Webhook{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*WebhookClientConfig).DeepCopyInto(out.(*WebhookClientConfig)) + return nil + }, InType: reflect.TypeOf(&WebhookClientConfig{})}, ) } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionHookClientConfig) DeepCopyInto(out *AdmissionHookClientConfig) { - *out = *in - out.Service = in.Service - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionHookClientConfig. -func (in *AdmissionHookClientConfig) DeepCopy() *AdmissionHookClientConfig { - if in == nil { - return nil - } - out := new(AdmissionHookClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHook) DeepCopyInto(out *ExternalAdmissionHook) { - *out = *in - in.ClientConfig.DeepCopyInto(&out.ClientConfig) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]RuleWithOperations, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailurePolicy != nil { - in, out := &in.FailurePolicy, &out.FailurePolicy - if *in == nil { - *out = nil - } else { - *out = new(FailurePolicyType) - **out = **in - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHook. -func (in *ExternalAdmissionHook) DeepCopy() *ExternalAdmissionHook { - if in == nil { - return nil - } - out := new(ExternalAdmissionHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHookConfiguration) DeepCopyInto(out *ExternalAdmissionHookConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ExternalAdmissionHooks != nil { - in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks - *out = make([]ExternalAdmissionHook, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfiguration. -func (in *ExternalAdmissionHookConfiguration) DeepCopy() *ExternalAdmissionHookConfiguration { - if in == nil { - return nil - } - out := new(ExternalAdmissionHookConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ExternalAdmissionHookConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHookConfigurationList) DeepCopyInto(out *ExternalAdmissionHookConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ExternalAdmissionHookConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfigurationList. -func (in *ExternalAdmissionHookConfigurationList) DeepCopy() *ExternalAdmissionHookConfigurationList { - if in == nil { - return nil - } - out := new(ExternalAdmissionHookConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ExternalAdmissionHookConfigurationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Initializer) DeepCopyInto(out *Initializer) { *out = *in @@ -361,3 +238,126 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Webhooks != nil { + in, out := &in.Webhooks, &out.Webhooks + *out = make([]Webhook, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration. +func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { + if in == nil { + return nil + } + out := new(ValidatingWebhookConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingWebhookConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList. +func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { + if in == nil { + return nil + } + out := new(ValidatingWebhookConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webhook) DeepCopyInto(out *Webhook) { + *out = *in + in.ClientConfig.DeepCopyInto(&out.ClientConfig) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]RuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + if *in == nil { + *out = nil + } else { + *out = new(FailurePolicyType) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook. +func (in *Webhook) DeepCopy() *Webhook { + if in == nil { + return nil + } + out := new(Webhook) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { + *out = *in + out.Service = in.Service + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. +func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { + if in == nil { + return nil + } + out := new(WebhookClientConfig) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD index 6d1e815c9e..46cb9d7639 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD @@ -10,9 +10,9 @@ go_library( srcs = [ "admissionregistration_client.go", "doc.go", - "externaladmissionhookconfiguration.go", "generated_expansion.go", "initializerconfiguration.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion", deps = [ diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go index e64ad0d137..d423f8f860 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go @@ -23,8 +23,8 @@ import ( type AdmissionregistrationInterface interface { RESTClient() rest.Interface - ExternalAdmissionHookConfigurationsGetter InitializerConfigurationsGetter + ValidatingWebhookConfigurationsGetter } // AdmissionregistrationClient is used to interact with features provided by the admissionregistration.k8s.io group. @@ -32,14 +32,14 @@ type AdmissionregistrationClient struct { restClient rest.Interface } -func (c *AdmissionregistrationClient) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface { - return newExternalAdmissionHookConfigurations(c) -} - func (c *AdmissionregistrationClient) InitializerConfigurations() InitializerConfigurationInterface { return newInitializerConfigurations(c) } +func (c *AdmissionregistrationClient) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface { + return newValidatingWebhookConfigurations(c) +} + // NewForConfig creates a new AdmissionregistrationClient for the given config. func NewForConfig(c *rest.Config) (*AdmissionregistrationClient, error) { config := *c diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/externaladmissionhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/externaladmissionhookconfiguration.go deleted file mode 100644 index 09b2b383aa..0000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/externaladmissionhookconfiguration.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package internalversion - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ExternalAdmissionHookConfigurationsGetter has a method to return a ExternalAdmissionHookConfigurationInterface. -// A group's client should implement this interface. -type ExternalAdmissionHookConfigurationsGetter interface { - ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface -} - -// ExternalAdmissionHookConfigurationInterface has methods to work with ExternalAdmissionHookConfiguration resources. -type ExternalAdmissionHookConfigurationInterface interface { - Create(*admissionregistration.ExternalAdmissionHookConfiguration) (*admissionregistration.ExternalAdmissionHookConfiguration, error) - Update(*admissionregistration.ExternalAdmissionHookConfiguration) (*admissionregistration.ExternalAdmissionHookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*admissionregistration.ExternalAdmissionHookConfiguration, error) - List(opts v1.ListOptions) (*admissionregistration.ExternalAdmissionHookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) - ExternalAdmissionHookConfigurationExpansion -} - -// externalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface -type externalAdmissionHookConfigurations struct { - client rest.Interface -} - -// newExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurations -func newExternalAdmissionHookConfigurations(c *AdmissionregistrationClient) *externalAdmissionHookConfigurations { - return &externalAdmissionHookConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any. -func (c *externalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - result = &admissionregistration.ExternalAdmissionHookConfiguration{} - err = c.client.Get(). - Resource("externaladmissionhookconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors. -func (c *externalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ExternalAdmissionHookConfigurationList, err error) { - result = &admissionregistration.ExternalAdmissionHookConfigurationList{} - err = c.client.Get(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations. -func (c *externalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *externalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *admissionregistration.ExternalAdmissionHookConfiguration) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - result = &admissionregistration.ExternalAdmissionHookConfiguration{} - err = c.client.Post(). - Resource("externaladmissionhookconfigurations"). - Body(externalAdmissionHookConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *externalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *admissionregistration.ExternalAdmissionHookConfiguration) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - result = &admissionregistration.ExternalAdmissionHookConfiguration{} - err = c.client.Put(). - Resource("externaladmissionhookconfigurations"). - Name(externalAdmissionHookConfiguration.Name). - Body(externalAdmissionHookConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs. -func (c *externalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("externaladmissionhookconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *externalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched externalAdmissionHookConfiguration. -func (c *externalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - result = &admissionregistration.ExternalAdmissionHookConfiguration{} - err = c.client.Patch(pt). - Resource("externaladmissionhookconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD index 8d32bc2496..fab68374e6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD @@ -10,8 +10,8 @@ go_library( srcs = [ "doc.go", "fake_admissionregistration_client.go", - "fake_externaladmissionhookconfiguration.go", "fake_initializerconfiguration.go", + "fake_validatingwebhookconfiguration.go", ], importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake", deps = [ diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go index b0e7b83572..e22058f4a3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go @@ -26,14 +26,14 @@ type FakeAdmissionregistration struct { *testing.Fake } -func (c *FakeAdmissionregistration) ExternalAdmissionHookConfigurations() internalversion.ExternalAdmissionHookConfigurationInterface { - return &FakeExternalAdmissionHookConfigurations{c} -} - func (c *FakeAdmissionregistration) InitializerConfigurations() internalversion.InitializerConfigurationInterface { return &FakeInitializerConfigurations{c} } +func (c *FakeAdmissionregistration) ValidatingWebhookConfigurations() internalversion.ValidatingWebhookConfigurationInterface { + return &FakeValidatingWebhookConfigurations{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeAdmissionregistration) RESTClient() rest.Interface { diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_externaladmissionhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_externaladmissionhookconfiguration.go deleted file mode 100644 index be6b42e2ed..0000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_externaladmissionhookconfiguration.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -// FakeExternalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface -type FakeExternalAdmissionHookConfigurations struct { - Fake *FakeAdmissionregistration -} - -var externaladmissionhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "", Resource: "externaladmissionhookconfigurations"} - -var externaladmissionhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "", Kind: "ExternalAdmissionHookConfiguration"} - -// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(externaladmissionhookconfigurationsResource, name), &admissionregistration.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ExternalAdmissionHookConfiguration), err -} - -// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors. -func (c *FakeExternalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ExternalAdmissionHookConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(externaladmissionhookconfigurationsResource, externaladmissionhookconfigurationsKind, opts), &admissionregistration.ExternalAdmissionHookConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &admissionregistration.ExternalAdmissionHookConfigurationList{} - for _, item := range obj.(*admissionregistration.ExternalAdmissionHookConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations. -func (c *FakeExternalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(externaladmissionhookconfigurationsResource, opts)) -} - -// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *admissionregistration.ExternalAdmissionHookConfiguration) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &admissionregistration.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ExternalAdmissionHookConfiguration), err -} - -// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *admissionregistration.ExternalAdmissionHookConfiguration) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &admissionregistration.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ExternalAdmissionHookConfiguration), err -} - -// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeExternalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(externaladmissionhookconfigurationsResource, name), &admissionregistration.ExternalAdmissionHookConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeExternalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(externaladmissionhookconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &admissionregistration.ExternalAdmissionHookConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched externalAdmissionHookConfiguration. -func (c *FakeExternalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(externaladmissionhookconfigurationsResource, name, data, subresources...), &admissionregistration.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ExternalAdmissionHookConfiguration), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go new file mode 100644 index 0000000000..4056e54b75 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go @@ -0,0 +1,118 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" +) + +// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type FakeValidatingWebhookConfigurations struct { + Fake *FakeAdmissionregistration +} + +var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "", Resource: "validatingwebhookconfigurations"} + +var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "", Kind: "ValidatingWebhookConfiguration"} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &admissionregistration.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistration.ValidatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ValidatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &admissionregistration.ValidatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistration.ValidatingWebhookConfigurationList{} + for _, item := range obj.(*admissionregistration.ValidatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistration.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistration.ValidatingWebhookConfiguration), err +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistration.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistration.ValidatingWebhookConfiguration), err +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistration.ValidatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) + + _, err := c.Fake.Invokes(action, &admissionregistration.ValidatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, data, subresources...), &admissionregistration.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistration.ValidatingWebhookConfiguration), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go index 631817dea3..65b5bb7879 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go @@ -16,6 +16,6 @@ limitations under the License. package internalversion -type ExternalAdmissionHookConfigurationExpansion interface{} - type InitializerConfigurationExpansion interface{} + +type ValidatingWebhookConfigurationExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go new file mode 100644 index 0000000000..090cd6f674 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" + scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" +) + +// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface. +// A group's client should implement this interface. +type ValidatingWebhookConfigurationsGetter interface { + ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface +} + +// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. +type ValidatingWebhookConfigurationInterface interface { + Create(*admissionregistration.ValidatingWebhookConfiguration) (*admissionregistration.ValidatingWebhookConfiguration, error) + Update(*admissionregistration.ValidatingWebhookConfiguration) (*admissionregistration.ValidatingWebhookConfiguration, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*admissionregistration.ValidatingWebhookConfiguration, error) + List(opts v1.ListOptions) (*admissionregistration.ValidatingWebhookConfigurationList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) + ValidatingWebhookConfigurationExpansion +} + +// validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type validatingWebhookConfigurations struct { + client rest.Interface +} + +// newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations +func newValidatingWebhookConfigurations(c *AdmissionregistrationClient) *validatingWebhookConfigurations { + return &validatingWebhookConfigurations{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + result = &admissionregistration.ValidatingWebhookConfiguration{} + err = c.client.Get(). + Resource("validatingwebhookconfigurations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ValidatingWebhookConfigurationList, err error) { + result = &admissionregistration.ValidatingWebhookConfigurationList{} + err = c.client.Get(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + result = &admissionregistration.ValidatingWebhookConfiguration{} + err = c.client.Post(). + Resource("validatingwebhookconfigurations"). + Body(validatingWebhookConfiguration). + Do(). + Into(result) + return +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + result = &admissionregistration.ValidatingWebhookConfiguration{} + err = c.client.Put(). + Resource("validatingwebhookconfigurations"). + Name(validatingWebhookConfiguration.Name). + Body(validatingWebhookConfiguration). + Do(). + Into(result) + return +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingwebhookconfigurations"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { + result = &admissionregistration.ValidatingWebhookConfiguration{} + err = c.client.Patch(pt). + Resource("validatingwebhookconfigurations"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/BUILD b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/BUILD index 19467f1ed5..5f312eb9fc 100644 --- a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/BUILD +++ b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/BUILD @@ -8,9 +8,9 @@ load( go_library( name = "go_default_library", srcs = [ - "externaladmissionhookconfiguration.go", "initializerconfiguration.go", "interface.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion", deps = [ diff --git a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/interface.go b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/interface.go index f5d2e5e4ec..fe0f655abc 100644 --- a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/interface.go +++ b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/interface.go @@ -24,10 +24,10 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { - // ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer. - ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer // InitializerConfigurations returns a InitializerConfigurationInformer. InitializerConfigurations() InitializerConfigurationInformer + // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. + ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer } type version struct { @@ -41,12 +41,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer. -func (v *version) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer { - return &externalAdmissionHookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - // InitializerConfigurations returns a InitializerConfigurationInformer. func (v *version) InitializerConfigurations() InitializerConfigurationInformer { return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. +func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer { + return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/externaladmissionhookconfiguration.go b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/validatingwebhookconfiguration.go similarity index 50% rename from pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/externaladmissionhookconfiguration.go rename to pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/validatingwebhookconfiguration.go index fea9fcc698..3242e317f5 100644 --- a/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/externaladmissionhookconfiguration.go +++ b/pkg/client/informers/informers_generated/internalversion/admissionregistration/internalversion/validatingwebhookconfiguration.go @@ -30,58 +30,58 @@ import ( time "time" ) -// ExternalAdmissionHookConfigurationInformer provides access to a shared informer and lister for -// ExternalAdmissionHookConfigurations. -type ExternalAdmissionHookConfigurationInformer interface { +// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for +// ValidatingWebhookConfigurations. +type ValidatingWebhookConfigurationInformer interface { Informer() cache.SharedIndexInformer - Lister() internalversion.ExternalAdmissionHookConfigurationLister + Lister() internalversion.ValidatingWebhookConfigurationLister } -type externalAdmissionHookConfigurationInformer struct { +type validatingWebhookConfigurationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration type. +// NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewExternalAdmissionHookConfigurationInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, indexers, nil) +func NewValidatingWebhookConfigurationInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration type. +// NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredExternalAdmissionHookConfigurationInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredValidatingWebhookConfigurationInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.Admissionregistration().ExternalAdmissionHookConfigurations().List(options) + return client.Admissionregistration().ValidatingWebhookConfigurations().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.Admissionregistration().ExternalAdmissionHookConfigurations().Watch(options) + return client.Admissionregistration().ValidatingWebhookConfigurations().Watch(options) }, }, - &admissionregistration.ExternalAdmissionHookConfiguration{}, + &admissionregistration.ValidatingWebhookConfiguration{}, resyncPeriod, indexers, ) } -func (f *externalAdmissionHookConfigurationInformer) defaultInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +func (f *validatingWebhookConfigurationInformer) defaultInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } -func (f *externalAdmissionHookConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistration.ExternalAdmissionHookConfiguration{}, f.defaultInformer) +func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&admissionregistration.ValidatingWebhookConfiguration{}, f.defaultInformer) } -func (f *externalAdmissionHookConfigurationInformer) Lister() internalversion.ExternalAdmissionHookConfigurationLister { - return internalversion.NewExternalAdmissionHookConfigurationLister(f.Informer().GetIndexer()) +func (f *validatingWebhookConfigurationInformer) Lister() internalversion.ValidatingWebhookConfigurationLister { + return internalversion.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/informers_generated/internalversion/generic.go b/pkg/client/informers/informers_generated/internalversion/generic.go index e6564e0934..82881e9718 100644 --- a/pkg/client/informers/informers_generated/internalversion/generic.go +++ b/pkg/client/informers/informers_generated/internalversion/generic.go @@ -64,10 +64,10 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=admissionregistration.k8s.io, Version=internalVersion - case admissionregistration.SchemeGroupVersion.WithResource("externaladmissionhookconfigurations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().InternalVersion().ExternalAdmissionHookConfigurations().Informer()}, nil case admissionregistration.SchemeGroupVersion.WithResource("initializerconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().InternalVersion().InitializerConfigurations().Informer()}, nil + case admissionregistration.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().InternalVersion().ValidatingWebhookConfigurations().Informer()}, nil // Group=apps, Version=internalVersion case apps.SchemeGroupVersion.WithResource("controllerrevisions"): diff --git a/pkg/client/listers/admissionregistration/internalversion/BUILD b/pkg/client/listers/admissionregistration/internalversion/BUILD index 455a1cff69..6dc274e381 100644 --- a/pkg/client/listers/admissionregistration/internalversion/BUILD +++ b/pkg/client/listers/admissionregistration/internalversion/BUILD @@ -9,8 +9,8 @@ go_library( name = "go_default_library", srcs = [ "expansion_generated.go", - "externaladmissionhookconfiguration.go", "initializerconfiguration.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/kubernetes/pkg/client/listers/admissionregistration/internalversion", deps = [ diff --git a/pkg/client/listers/admissionregistration/internalversion/expansion_generated.go b/pkg/client/listers/admissionregistration/internalversion/expansion_generated.go index 278e929fb4..bac58f9dd2 100644 --- a/pkg/client/listers/admissionregistration/internalversion/expansion_generated.go +++ b/pkg/client/listers/admissionregistration/internalversion/expansion_generated.go @@ -18,10 +18,10 @@ limitations under the License. package internalversion -// ExternalAdmissionHookConfigurationListerExpansion allows custom methods to be added to -// ExternalAdmissionHookConfigurationLister. -type ExternalAdmissionHookConfigurationListerExpansion interface{} - // InitializerConfigurationListerExpansion allows custom methods to be added to // InitializerConfigurationLister. type InitializerConfigurationListerExpansion interface{} + +// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to +// ValidatingWebhookConfigurationLister. +type ValidatingWebhookConfigurationListerExpansion interface{} diff --git a/pkg/client/listers/admissionregistration/internalversion/externaladmissionhookconfiguration.go b/pkg/client/listers/admissionregistration/internalversion/externaladmissionhookconfiguration.go deleted file mode 100644 index b9145988d9..0000000000 --- a/pkg/client/listers/admissionregistration/internalversion/externaladmissionhookconfiguration.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package internalversion - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -// ExternalAdmissionHookConfigurationLister helps list ExternalAdmissionHookConfigurations. -type ExternalAdmissionHookConfigurationLister interface { - // List lists all ExternalAdmissionHookConfigurations in the indexer. - List(selector labels.Selector) (ret []*admissionregistration.ExternalAdmissionHookConfiguration, err error) - // Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name. - Get(name string) (*admissionregistration.ExternalAdmissionHookConfiguration, error) - ExternalAdmissionHookConfigurationListerExpansion -} - -// externalAdmissionHookConfigurationLister implements the ExternalAdmissionHookConfigurationLister interface. -type externalAdmissionHookConfigurationLister struct { - indexer cache.Indexer -} - -// NewExternalAdmissionHookConfigurationLister returns a new ExternalAdmissionHookConfigurationLister. -func NewExternalAdmissionHookConfigurationLister(indexer cache.Indexer) ExternalAdmissionHookConfigurationLister { - return &externalAdmissionHookConfigurationLister{indexer: indexer} -} - -// List lists all ExternalAdmissionHookConfigurations in the indexer. -func (s *externalAdmissionHookConfigurationLister) List(selector labels.Selector) (ret []*admissionregistration.ExternalAdmissionHookConfiguration, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*admissionregistration.ExternalAdmissionHookConfiguration)) - }) - return ret, err -} - -// Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name. -func (s *externalAdmissionHookConfigurationLister) Get(name string) (*admissionregistration.ExternalAdmissionHookConfiguration, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(admissionregistration.Resource("externaladmissionhookconfiguration"), name) - } - return obj.(*admissionregistration.ExternalAdmissionHookConfiguration), nil -} diff --git a/pkg/client/listers/admissionregistration/internalversion/validatingwebhookconfiguration.go b/pkg/client/listers/admissionregistration/internalversion/validatingwebhookconfiguration.go new file mode 100644 index 0000000000..9b4693584f --- /dev/null +++ b/pkg/client/listers/admissionregistration/internalversion/validatingwebhookconfiguration.go @@ -0,0 +1,65 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package internalversion + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" +) + +// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations. +type ValidatingWebhookConfigurationLister interface { + // List lists all ValidatingWebhookConfigurations in the indexer. + List(selector labels.Selector) (ret []*admissionregistration.ValidatingWebhookConfiguration, err error) + // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. + Get(name string) (*admissionregistration.ValidatingWebhookConfiguration, error) + ValidatingWebhookConfigurationListerExpansion +} + +// validatingWebhookConfigurationLister implements the ValidatingWebhookConfigurationLister interface. +type validatingWebhookConfigurationLister struct { + indexer cache.Indexer +} + +// NewValidatingWebhookConfigurationLister returns a new ValidatingWebhookConfigurationLister. +func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWebhookConfigurationLister { + return &validatingWebhookConfigurationLister{indexer: indexer} +} + +// List lists all ValidatingWebhookConfigurations in the indexer. +func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*admissionregistration.ValidatingWebhookConfiguration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*admissionregistration.ValidatingWebhookConfiguration)) + }) + return ret, err +} + +// Get retrieves the ValidatingWebhookConfiguration from the index for a given name. +func (s *validatingWebhookConfigurationLister) Get(name string) (*admissionregistration.ValidatingWebhookConfiguration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(admissionregistration.Resource("validatingwebhookconfiguration"), name) + } + return obj.(*admissionregistration.ValidatingWebhookConfiguration), nil +} diff --git a/pkg/client/listers/apis/admissionregistration/BUILD b/pkg/client/listers/apis/admissionregistration/BUILD new file mode 100644 index 0000000000..37db2ebd0c --- /dev/null +++ b/pkg/client/listers/apis/admissionregistration/BUILD @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "expansion_generated.go", + "initializerconfiguration.go", + "validatingwebhookconfiguration.go", + ], + importpath = "k8s.io/kubernetes/pkg/client/listers/apis/admissionregistration", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/admissionregistration:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/client-go/tools/cache: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"], +) diff --git a/pkg/client/listers/apis/admissionregistration/expansion_generated.go b/pkg/client/listers/apis/admissionregistration/expansion_generated.go new file mode 100644 index 0000000000..8142f2712b --- /dev/null +++ b/pkg/client/listers/apis/admissionregistration/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package admissionregistration + +// InitializerConfigurationListerExpansion allows custom methods to be added to +// InitializerConfigurationLister. +type InitializerConfigurationListerExpansion interface{} + +// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to +// ValidatingWebhookConfigurationLister. +type ValidatingWebhookConfigurationListerExpansion interface{} diff --git a/pkg/client/listers/apis/admissionregistration/initializerconfiguration.go b/pkg/client/listers/apis/admissionregistration/initializerconfiguration.go new file mode 100644 index 0000000000..a935f624ef --- /dev/null +++ b/pkg/client/listers/apis/admissionregistration/initializerconfiguration.go @@ -0,0 +1,65 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package admissionregistration + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" +) + +// InitializerConfigurationLister helps list InitializerConfigurations. +type InitializerConfigurationLister interface { + // List lists all InitializerConfigurations in the indexer. + List(selector labels.Selector) (ret []*admissionregistration.InitializerConfiguration, err error) + // Get retrieves the InitializerConfiguration from the index for a given name. + Get(name string) (*admissionregistration.InitializerConfiguration, error) + InitializerConfigurationListerExpansion +} + +// initializerConfigurationLister implements the InitializerConfigurationLister interface. +type initializerConfigurationLister struct { + indexer cache.Indexer +} + +// NewInitializerConfigurationLister returns a new InitializerConfigurationLister. +func NewInitializerConfigurationLister(indexer cache.Indexer) InitializerConfigurationLister { + return &initializerConfigurationLister{indexer: indexer} +} + +// List lists all InitializerConfigurations in the indexer. +func (s *initializerConfigurationLister) List(selector labels.Selector) (ret []*admissionregistration.InitializerConfiguration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*admissionregistration.InitializerConfiguration)) + }) + return ret, err +} + +// Get retrieves the InitializerConfiguration from the index for a given name. +func (s *initializerConfigurationLister) Get(name string) (*admissionregistration.InitializerConfiguration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(admissionregistration.Resource("initializerconfiguration"), name) + } + return obj.(*admissionregistration.InitializerConfiguration), nil +} diff --git a/pkg/registry/BUILD b/pkg/registry/BUILD index 317340e016..6fcef7216b 100644 --- a/pkg/registry/BUILD +++ b/pkg/registry/BUILD @@ -22,9 +22,9 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/registry/admissionregistration/externaladmissionhookconfiguration:all-srcs", "//pkg/registry/admissionregistration/initializerconfiguration:all-srcs", "//pkg/registry/admissionregistration/rest:all-srcs", + "//pkg/registry/admissionregistration/validatingwebhookconfiguration:all-srcs", "//pkg/registry/apps/controllerrevision:all-srcs", "//pkg/registry/apps/rest:all-srcs", "//pkg/registry/apps/statefulset:all-srcs", diff --git a/pkg/registry/admissionregistration/rest/BUILD b/pkg/registry/admissionregistration/rest/BUILD index 2bc6b9d341..dd55cc1cbd 100644 --- a/pkg/registry/admissionregistration/rest/BUILD +++ b/pkg/registry/admissionregistration/rest/BUILD @@ -12,8 +12,8 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/admissionregistration:go_default_library", - "//pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage:go_default_library", "//pkg/registry/admissionregistration/initializerconfiguration/storage:go_default_library", + "//pkg/registry/admissionregistration/validatingwebhookconfiguration/storage:go_default_library", "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", diff --git a/pkg/registry/admissionregistration/externaladmissionhookconfiguration/BUILD b/pkg/registry/admissionregistration/validatingwebhookconfiguration/BUILD similarity index 88% rename from pkg/registry/admissionregistration/externaladmissionhookconfiguration/BUILD rename to pkg/registry/admissionregistration/validatingwebhookconfiguration/BUILD index eb78808029..0b07d30286 100644 --- a/pkg/registry/admissionregistration/externaladmissionhookconfiguration/BUILD +++ b/pkg/registry/admissionregistration/validatingwebhookconfiguration/BUILD @@ -11,7 +11,7 @@ go_library( "doc.go", "strategy.go", ], - importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/externaladmissionhookconfiguration", + importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/validatingwebhookconfiguration", deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/admissionregistration:go_default_library", @@ -34,7 +34,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage:all-srcs", + "//pkg/registry/admissionregistration/validatingwebhookconfiguration/storage:all-srcs", ], tags = ["automanaged"], ) diff --git a/pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage/BUILD b/pkg/registry/admissionregistration/validatingwebhookconfiguration/storage/BUILD similarity index 83% rename from pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage/BUILD rename to pkg/registry/admissionregistration/validatingwebhookconfiguration/storage/BUILD index 14c2bdc1be..30da94ee1a 100644 --- a/pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage/BUILD +++ b/pkg/registry/admissionregistration/validatingwebhookconfiguration/storage/BUILD @@ -8,10 +8,10 @@ load( go_library( name = "go_default_library", srcs = ["storage.go"], - importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/externaladmissionhookconfiguration/storage", + importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/validatingwebhookconfiguration/storage", deps = [ "//pkg/apis/admissionregistration:go_default_library", - "//pkg/registry/admissionregistration/externaladmissionhookconfiguration:go_default_library", + "//pkg/registry/admissionregistration/validatingwebhookconfiguration:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index 4c66de146c..9002b8e9a4 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -25,16 +25,16 @@ limitations under the License. k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto It has these top-level messages: - AdmissionHookClientConfig - ExternalAdmissionHook - ExternalAdmissionHookConfiguration - ExternalAdmissionHookConfigurationList Initializer InitializerConfiguration InitializerConfigurationList Rule RuleWithOperations ServiceReference + ValidatingWebhookConfiguration + ValidatingWebhookConfigurationList + Webhook + WebhookClientConfig */ package v1alpha1 @@ -58,230 +58,66 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -func (m *AdmissionHookClientConfig) Reset() { *m = AdmissionHookClientConfig{} } -func (*AdmissionHookClientConfig) ProtoMessage() {} -func (*AdmissionHookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{0} -} - -func (m *ExternalAdmissionHook) Reset() { *m = ExternalAdmissionHook{} } -func (*ExternalAdmissionHook) ProtoMessage() {} -func (*ExternalAdmissionHook) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - -func (m *ExternalAdmissionHookConfiguration) Reset() { *m = ExternalAdmissionHookConfiguration{} } -func (*ExternalAdmissionHookConfiguration) ProtoMessage() {} -func (*ExternalAdmissionHookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} -} - -func (m *ExternalAdmissionHookConfigurationList) Reset() { - *m = ExternalAdmissionHookConfigurationList{} -} -func (*ExternalAdmissionHookConfigurationList) ProtoMessage() {} -func (*ExternalAdmissionHookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} -} - func (m *Initializer) Reset() { *m = Initializer{} } func (*Initializer) ProtoMessage() {} -func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } func (m *InitializerConfiguration) Reset() { *m = InitializerConfiguration{} } func (*InitializerConfiguration) ProtoMessage() {} func (*InitializerConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{5} + return fileDescriptorGenerated, []int{1} } func (m *InitializerConfigurationList) Reset() { *m = InitializerConfigurationList{} } func (*InitializerConfigurationList) ProtoMessage() {} func (*InitializerConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{6} + return fileDescriptorGenerated, []int{2} } func (m *Rule) Reset() { *m = Rule{} } func (*Rule) ProtoMessage() {} -func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } func (*RuleWithOperations) ProtoMessage() {} -func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } +func (*ValidatingWebhookConfiguration) ProtoMessage() {} +func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{6} +} + +func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } +func (*ValidatingWebhookConfigurationList) ProtoMessage() {} +func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{7} +} + +func (m *Webhook) Reset() { *m = Webhook{} } +func (*Webhook) ProtoMessage() {} +func (*Webhook) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } +func (*WebhookClientConfig) ProtoMessage() {} +func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func init() { - proto.RegisterType((*AdmissionHookClientConfig)(nil), "k8s.io.api.admissionregistration.v1alpha1.AdmissionHookClientConfig") - proto.RegisterType((*ExternalAdmissionHook)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExternalAdmissionHook") - proto.RegisterType((*ExternalAdmissionHookConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration") - proto.RegisterType((*ExternalAdmissionHookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList") proto.RegisterType((*Initializer)(nil), "k8s.io.api.admissionregistration.v1alpha1.Initializer") proto.RegisterType((*InitializerConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfiguration") proto.RegisterType((*InitializerConfigurationList)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfigurationList") proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1alpha1.Rule") proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1alpha1.RuleWithOperations") proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1alpha1.ServiceReference") + proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingWebhookConfiguration") + proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingWebhookConfigurationList") + proto.RegisterType((*Webhook)(nil), "k8s.io.api.admissionregistration.v1alpha1.Webhook") + proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1alpha1.WebhookClientConfig") } -func (m *AdmissionHookClientConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionHookClientConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size())) - n1, err := m.Service.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.CABundle != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i += copy(dAtA[i:], m.CABundle) - } - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URLPath))) - i += copy(dAtA[i:], m.URLPath) - return i, nil -} - -func (m *ExternalAdmissionHook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExternalAdmissionHook) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ClientConfig.Size())) - n2, err := m.ClientConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.Rules) > 0 { - for _, msg := range m.Rules { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FailurePolicy != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) - i += copy(dAtA[i:], *m.FailurePolicy) - } - return i, nil -} - -func (m *ExternalAdmissionHookConfiguration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExternalAdmissionHookConfiguration) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n3, err := m.ObjectMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if len(m.ExternalAdmissionHooks) > 0 { - for _, msg := range m.ExternalAdmissionHooks { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *ExternalAdmissionHookConfigurationList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExternalAdmissionHookConfigurationList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n4, err := m.ListMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - func (m *Initializer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -334,11 +170,11 @@ func (m *InitializerConfiguration) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n5, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n1 if len(m.Initializers) > 0 { for _, msg := range m.Initializers { dAtA[i] = 0x12 @@ -372,11 +208,11 @@ func (m *InitializerConfigurationList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n6, err := m.ListMeta.MarshalTo(dAtA[i:]) + n2, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n2 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -488,11 +324,11 @@ func (m *RuleWithOperations) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Rule.Size())) - n7, err := m.Rule.MarshalTo(dAtA[i:]) + n3, err := m.Rule.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n3 return i, nil } @@ -522,6 +358,166 @@ func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n4, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + if len(m.Webhooks) > 0 { + for _, msg := range m.Webhooks { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Webhook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Webhook) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ClientConfig.Size())) + n6, err := m.ClientConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FailurePolicy != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) + i += copy(dAtA[i:], *m.FailurePolicy) + } + return i, nil +} + +func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size())) + n7, err := m.Service.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + if m.CABundle != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + i += copy(dAtA[i:], m.CABundle) + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.URLPath))) + i += copy(dAtA[i:], m.URLPath) + return i, nil +} + func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) dAtA[offset+1] = uint8(v >> 8) @@ -549,68 +545,6 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *AdmissionHookClientConfig) Size() (n int) { - var l int - _ = l - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.URLPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ExternalAdmissionHook) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.ClientConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.FailurePolicy != nil { - l = len(*m.FailurePolicy) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ExternalAdmissionHookConfiguration) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ExternalAdmissionHooks) > 0 { - for _, e := range m.ExternalAdmissionHooks { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ExternalAdmissionHookConfigurationList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *Initializer) Size() (n int) { var l int _ = l @@ -701,6 +635,68 @@ func (m *ServiceReference) Size() (n int) { return n } +func (m *ValidatingWebhookConfiguration) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Webhooks) > 0 { + for _, e := range m.Webhooks { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingWebhookConfigurationList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *Webhook) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ClientConfig.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.FailurePolicy != nil { + l = len(*m.FailurePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *WebhookClientConfig) Size() (n int) { + var l int + _ = l + l = m.Service.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.CABundle != nil { + l = len(m.CABundle) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.URLPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func sovGenerated(x uint64) (n int) { for { n++ @@ -714,53 +710,6 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *AdmissionHookClientConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AdmissionHookClientConfig{`, - `Service:` + strings.Replace(strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1), `&`, ``, 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `URLPath:` + fmt.Sprintf("%v", this.URLPath) + `,`, - `}`, - }, "") - return s -} -func (this *ExternalAdmissionHook) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExternalAdmissionHook{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "AdmissionHookClientConfig", "AdmissionHookClientConfig", 1), `&`, ``, 1) + `,`, - `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `}`, - }, "") - return s -} -func (this *ExternalAdmissionHookConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExternalAdmissionHookConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ExternalAdmissionHooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExternalAdmissionHooks), "ExternalAdmissionHook", "ExternalAdmissionHook", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ExternalAdmissionHookConfigurationList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExternalAdmissionHookConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ExternalAdmissionHookConfiguration", "ExternalAdmissionHookConfiguration", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} func (this *Initializer) String() string { if this == nil { return "nil" @@ -828,6 +777,53 @@ func (this *ServiceReference) String() string { }, "") return s } +func (this *ValidatingWebhookConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingWebhookConfiguration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Webhooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Webhooks), "Webhook", "Webhook", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhookConfigurationList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Webhook) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Webhook{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `}`, + }, "") + return s +} +func (this *WebhookClientConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WebhookClientConfig{`, + `Service:` + strings.Replace(strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1), `&`, ``, 1) + `,`, + `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, + `URLPath:` + fmt.Sprintf("%v", this.URLPath) + `,`, + `}`, + }, "") + return s +} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -836,538 +832,6 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *AdmissionHookClientConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionHookClientConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionHookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URLPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URLPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExternalAdmissionHook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExternalAdmissionHook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalAdmissionHook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, RuleWithOperations{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := FailurePolicyType(dAtA[iNdEx:postIndex]) - m.FailurePolicy = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExternalAdmissionHookConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalAdmissionHooks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExternalAdmissionHooks = append(m.ExternalAdmissionHooks, ExternalAdmissionHook{}) - if err := m.ExternalAdmissionHooks[len(m.ExternalAdmissionHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExternalAdmissionHookConfigurationList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ExternalAdmissionHookConfiguration{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Initializer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2054,6 +1518,538 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } return nil } +func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingWebhookConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Webhooks = append(m.Webhooks, Webhook{}) + if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingWebhookConfigurationList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ValidatingWebhookConfiguration{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Webhook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Webhook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Webhook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, RuleWithOperations{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := FailurePolicyType(dAtA[iNdEx:postIndex]) + m.FailurePolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WebhookClientConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WebhookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) + if m.CABundle == nil { + m.CABundle = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URLPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URLPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -2164,61 +2160,60 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x8b, 0x23, 0x45, - 0x14, 0x4e, 0x65, 0x32, 0x4c, 0x52, 0x49, 0xd8, 0xdd, 0x42, 0x97, 0x38, 0x48, 0x27, 0xf4, 0x61, - 0xc9, 0x22, 0x76, 0x3b, 0xa3, 0x2c, 0x82, 0x88, 0x4e, 0x8f, 0xbf, 0x06, 0x66, 0x77, 0xc7, 0x72, - 0x55, 0x10, 0x0f, 0x56, 0x3a, 0x2f, 0x49, 0x99, 0xfe, 0x45, 0x55, 0x75, 0x70, 0x3c, 0x88, 0x17, - 0xef, 0x82, 0x17, 0xaf, 0xde, 0xfc, 0x53, 0xe6, 0xb8, 0xc7, 0x39, 0x05, 0xa7, 0x05, 0x2f, 0x82, - 0x7f, 0xc0, 0x9c, 0xa4, 0x7f, 0xa5, 0x3b, 0x9b, 0x84, 0x9d, 0x28, 0xec, 0x2d, 0xf5, 0xbd, 0xfa, - 0xde, 0xfb, 0xde, 0x97, 0xf7, 0xaa, 0x31, 0x9d, 0xbe, 0x2d, 0x0d, 0xee, 0x9b, 0xd3, 0x70, 0x00, - 0xc2, 0x03, 0x05, 0xd2, 0x9c, 0x81, 0x37, 0xf4, 0x85, 0x99, 0x05, 0x58, 0xc0, 0x4d, 0x36, 0x74, - 0xb9, 0x94, 0xdc, 0xf7, 0x04, 0x8c, 0xb9, 0x54, 0x82, 0x29, 0xee, 0x7b, 0xe6, 0xec, 0x80, 0x39, - 0xc1, 0x84, 0x1d, 0x98, 0x63, 0xf0, 0x40, 0x30, 0x05, 0x43, 0x23, 0x10, 0xbe, 0xf2, 0xc9, 0xfd, - 0x94, 0x6a, 0xb0, 0x80, 0x1b, 0x6b, 0xa9, 0x46, 0x4e, 0xdd, 0x7f, 0x7d, 0xcc, 0xd5, 0x24, 0x1c, - 0x18, 0xb6, 0xef, 0x9a, 0x63, 0x7f, 0xec, 0x9b, 0x49, 0x86, 0x41, 0x38, 0x4a, 0x4e, 0xc9, 0x21, - 0xf9, 0x95, 0x66, 0xde, 0x7f, 0xab, 0x10, 0xe5, 0x32, 0x7b, 0xc2, 0x3d, 0x10, 0xe7, 0x66, 0x30, - 0x1d, 0xc7, 0x80, 0x34, 0x5d, 0x50, 0xcc, 0x9c, 0xad, 0xe8, 0xd9, 0x37, 0x37, 0xb1, 0x44, 0xe8, - 0x29, 0xee, 0xc2, 0x0a, 0xe1, 0xc1, 0xf3, 0x08, 0xd2, 0x9e, 0x80, 0xcb, 0x56, 0x78, 0x6f, 0x6e, - 0xe2, 0x85, 0x8a, 0x3b, 0x26, 0xf7, 0x94, 0x54, 0xe2, 0x59, 0x92, 0x7e, 0x89, 0xf0, 0x2b, 0x47, - 0xb9, 0x4b, 0x9f, 0xf8, 0xfe, 0xf4, 0xd8, 0xe1, 0xe0, 0xa9, 0x63, 0xdf, 0x1b, 0xf1, 0x31, 0x19, - 0xe1, 0x3d, 0x09, 0x62, 0xc6, 0x6d, 0xe8, 0xa0, 0x1e, 0xea, 0x37, 0x0f, 0xdf, 0x31, 0x6e, 0xec, - 0xae, 0xf1, 0x59, 0xca, 0xa4, 0x30, 0x02, 0x01, 0x9e, 0x0d, 0xd6, 0xad, 0x8b, 0x79, 0xb7, 0x12, - 0xcd, 0xbb, 0x7b, 0x79, 0x24, 0x4f, 0x4e, 0xfa, 0xb8, 0x6e, 0x33, 0x2b, 0xf4, 0x86, 0x0e, 0x74, - 0xaa, 0x3d, 0xd4, 0x6f, 0x59, 0xad, 0x68, 0xde, 0xad, 0x1f, 0x1f, 0xa5, 0x18, 0x5d, 0x44, 0xc9, - 0x7d, 0xbc, 0x17, 0x0a, 0xe7, 0x8c, 0xa9, 0x49, 0x67, 0xa7, 0x87, 0xfa, 0x8d, 0x22, 0xe9, 0xe7, - 0xf4, 0x34, 0x86, 0x69, 0x1e, 0xd7, 0xff, 0xae, 0xe2, 0x97, 0x3f, 0xfc, 0x4e, 0x81, 0xf0, 0x98, - 0xb3, 0xd4, 0x22, 0xe9, 0xe1, 0x9a, 0xc7, 0xdc, 0xb4, 0xa7, 0x86, 0xd5, 0xca, 0x32, 0xd4, 0x1e, - 0x31, 0x17, 0x68, 0x12, 0x21, 0x3f, 0xe0, 0x96, 0x5d, 0x32, 0x22, 0x11, 0xd5, 0x3c, 0xfc, 0x60, - 0x8b, 0xee, 0x37, 0x9a, 0x6a, 0xbd, 0x94, 0xd5, 0x6b, 0x95, 0x51, 0xba, 0x54, 0x8f, 0x0c, 0xf0, - 0xae, 0x08, 0x1d, 0x90, 0x9d, 0x9d, 0xde, 0x4e, 0xbf, 0x79, 0xf8, 0xee, 0x16, 0x85, 0x69, 0xe8, - 0xc0, 0x97, 0x5c, 0x4d, 0x1e, 0x07, 0x90, 0x86, 0xa4, 0xd5, 0xce, 0x2a, 0xee, 0xc6, 0x31, 0x49, - 0xd3, 0xd4, 0xe4, 0x14, 0xb7, 0x47, 0x8c, 0x3b, 0xa1, 0x80, 0x33, 0xdf, 0xe1, 0xf6, 0x79, 0xa7, - 0x96, 0xd8, 0x71, 0x2f, 0x9a, 0x77, 0xdb, 0x1f, 0x95, 0x03, 0xd7, 0xf3, 0xee, 0x9d, 0x25, 0xe0, - 0xc9, 0x79, 0x00, 0x74, 0x99, 0xac, 0xff, 0x56, 0xc5, 0xfa, 0x5a, 0xb7, 0xd3, 0x8e, 0xc2, 0x54, - 0x0b, 0xf9, 0x06, 0xd7, 0xe3, 0x45, 0x19, 0x32, 0xc5, 0xb2, 0x91, 0x7a, 0xa3, 0xd4, 0xdb, 0x62, - 0x6e, 0x8d, 0x60, 0x3a, 0x8e, 0x01, 0x69, 0xc4, 0xb7, 0x8d, 0xd9, 0x81, 0xf1, 0x78, 0xf0, 0x2d, - 0xd8, 0xea, 0x21, 0x28, 0x66, 0x91, 0xac, 0x1d, 0x5c, 0x60, 0x74, 0x91, 0x95, 0xfc, 0x8a, 0xf0, - 0x5d, 0x58, 0x27, 0x44, 0x76, 0xaa, 0x89, 0x99, 0xef, 0x6f, 0x61, 0xe6, 0xda, 0x8e, 0x2c, 0x2d, - 0x13, 0x70, 0x77, 0x6d, 0x58, 0xd2, 0x0d, 0xf5, 0xf5, 0x6b, 0x84, 0xef, 0x3d, 0xdf, 0xa3, 0x53, - 0x2e, 0x15, 0xf9, 0x7a, 0xc5, 0x27, 0xe3, 0x66, 0x3e, 0xc5, 0xec, 0xc4, 0xa5, 0xdb, 0x99, 0xc8, - 0x7a, 0x8e, 0x94, 0x3c, 0x12, 0x78, 0x97, 0x2b, 0x70, 0x73, 0x47, 0x1e, 0xfe, 0x5f, 0x47, 0x96, - 0xf4, 0x17, 0xe3, 0x76, 0x12, 0xd7, 0xa0, 0x69, 0x29, 0xfd, 0x27, 0x84, 0x9b, 0x27, 0x1e, 0x57, - 0x9c, 0x39, 0xfc, 0x7b, 0x10, 0x37, 0x58, 0xc2, 0x27, 0xf9, 0x12, 0xa4, 0x2a, 0xcd, 0x2d, 0x97, - 0x60, 0xfd, 0xd8, 0xeb, 0xff, 0x20, 0xdc, 0x29, 0xe9, 0x78, 0xd1, 0xe3, 0x19, 0xe0, 0x16, 0x2f, - 0xaa, 0xe7, 0xbd, 0x3d, 0xd8, 0xa2, 0xb7, 0x92, 0xf8, 0xe2, 0x2d, 0x29, 0x81, 0x92, 0x2e, 0x55, - 0xd0, 0xff, 0x42, 0xf8, 0xd5, 0x4d, 0x0d, 0xbf, 0x80, 0x59, 0x9b, 0x2c, 0xcf, 0xda, 0xf1, 0x7f, - 0xeb, 0xf4, 0x26, 0x13, 0xf6, 0x0b, 0xc2, 0xb5, 0xf8, 0xaf, 0x26, 0xaf, 0xe1, 0x06, 0x0b, 0xf8, - 0xc7, 0xc2, 0x0f, 0x03, 0xd9, 0x41, 0xbd, 0x9d, 0x7e, 0xc3, 0x6a, 0x47, 0xf3, 0x6e, 0xe3, 0xe8, - 0xec, 0x24, 0x05, 0x69, 0x11, 0x27, 0x07, 0xb8, 0xc9, 0x02, 0xfe, 0x05, 0x88, 0x58, 0x47, 0xaa, - 0xb2, 0x61, 0xdd, 0x8a, 0xe6, 0xdd, 0xe6, 0xd1, 0xd9, 0x49, 0x0e, 0xd3, 0xf2, 0x9d, 0x38, 0xbf, - 0x00, 0xe9, 0x87, 0xc2, 0xce, 0x5e, 0xe8, 0x2c, 0x3f, 0xcd, 0x41, 0x5a, 0xc4, 0xf5, 0xdf, 0x11, - 0x26, 0xab, 0x6f, 0x32, 0x79, 0x0f, 0x63, 0x7f, 0x71, 0xca, 0x44, 0x76, 0x93, 0xa9, 0x59, 0xa0, - 0xd7, 0xf3, 0x6e, 0x7b, 0x71, 0x4a, 0xde, 0xdc, 0x12, 0x85, 0x7c, 0x8a, 0x6b, 0xf1, 0x40, 0x67, - 0x9f, 0xa6, 0xad, 0x97, 0x63, 0xb1, 0x70, 0xf1, 0x89, 0x26, 0xa9, 0x74, 0xc0, 0xb7, 0x9f, 0xfd, - 0x68, 0x13, 0x13, 0x37, 0xe2, 0x65, 0x94, 0x01, 0xb3, 0xf3, 0x5d, 0xbd, 0x93, 0x51, 0x1b, 0x8f, - 0xf2, 0x00, 0x2d, 0xee, 0x2c, 0xf6, 0xba, 0xba, 0x69, 0xaf, 0x2d, 0xe3, 0xe2, 0x4a, 0xab, 0x3c, - 0xbd, 0xd2, 0x2a, 0x97, 0x57, 0x5a, 0xe5, 0xc7, 0x48, 0x43, 0x17, 0x91, 0x86, 0x9e, 0x46, 0x1a, - 0xba, 0x8c, 0x34, 0xf4, 0x47, 0xa4, 0xa1, 0x9f, 0xff, 0xd4, 0x2a, 0x5f, 0xd5, 0x73, 0xbd, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x01, 0xf7, 0xd5, 0xa0, 0x26, 0x0a, 0x00, 0x00, + // 878 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xbf, 0x6f, 0x23, 0x45, + 0x18, 0xf5, 0xc6, 0x8e, 0x62, 0x8f, 0x6d, 0xdd, 0xdd, 0x40, 0x61, 0x45, 0x68, 0x1d, 0x6d, 0x81, + 0x72, 0x42, 0xec, 0x92, 0x80, 0x4e, 0x48, 0x08, 0x50, 0x36, 0x12, 0xc8, 0x52, 0xb8, 0x0b, 0x43, + 0xb8, 0x93, 0x10, 0x05, 0xe3, 0xf5, 0xe7, 0xf5, 0xe0, 0xfd, 0xa5, 0x99, 0x59, 0x43, 0xa8, 0x68, + 0xe8, 0x91, 0xf8, 0x27, 0xf8, 0x53, 0x52, 0x9e, 0x68, 0x48, 0x65, 0x91, 0x45, 0xa2, 0xa4, 0xa0, + 0xbc, 0x0a, 0xcd, 0xfe, 0xf6, 0x25, 0x3e, 0x62, 0x8a, 0x74, 0x9e, 0xef, 0x9b, 0xf7, 0xbe, 0xf7, + 0x66, 0xe7, 0x8d, 0x11, 0x99, 0xbf, 0x2f, 0x4c, 0x16, 0x5a, 0xf3, 0x78, 0x0c, 0x3c, 0x00, 0x09, + 0xc2, 0x5a, 0x40, 0x30, 0x09, 0xb9, 0x95, 0x37, 0x68, 0xc4, 0x2c, 0x3a, 0xf1, 0x99, 0x10, 0x2c, + 0x0c, 0x38, 0xb8, 0x4c, 0x48, 0x4e, 0x25, 0x0b, 0x03, 0x6b, 0x71, 0x40, 0xbd, 0x68, 0x46, 0x0f, + 0x2c, 0x17, 0x02, 0xe0, 0x54, 0xc2, 0xc4, 0x8c, 0x78, 0x28, 0x43, 0xfc, 0x30, 0x83, 0x9a, 0x34, + 0x62, 0xe6, 0x8d, 0x50, 0xb3, 0x80, 0xee, 0xbe, 0xed, 0x32, 0x39, 0x8b, 0xc7, 0xa6, 0x13, 0xfa, + 0x96, 0x1b, 0xba, 0xa1, 0x95, 0x32, 0x8c, 0xe3, 0x69, 0xba, 0x4a, 0x17, 0xe9, 0xaf, 0x8c, 0x79, + 0xf7, 0xbd, 0x4a, 0x94, 0x4f, 0x9d, 0x19, 0x0b, 0x80, 0x9f, 0x5b, 0xd1, 0xdc, 0x55, 0x05, 0x61, + 0xf9, 0x20, 0xa9, 0xb5, 0xb8, 0xa6, 0x67, 0xd7, 0x5a, 0x87, 0xe2, 0x71, 0x20, 0x99, 0x0f, 0xd7, + 0x00, 0x8f, 0xfe, 0x0b, 0x20, 0x9c, 0x19, 0xf8, 0xf4, 0x1a, 0xee, 0xdd, 0x75, 0xb8, 0x58, 0x32, + 0xcf, 0x62, 0x81, 0x14, 0x92, 0xbf, 0x0c, 0x32, 0x7e, 0xd2, 0x50, 0x77, 0x14, 0x30, 0xc9, 0xa8, + 0xc7, 0x7e, 0x00, 0x8e, 0xf7, 0x50, 0x2b, 0xa0, 0x3e, 0x0c, 0xb4, 0x3d, 0x6d, 0xbf, 0x63, 0xf7, + 0x2e, 0x96, 0xc3, 0x46, 0xb2, 0x1c, 0xb6, 0x1e, 0x53, 0x1f, 0x48, 0xda, 0xc1, 0x67, 0x68, 0x9b, + 0xc7, 0x1e, 0x88, 0xc1, 0xd6, 0x5e, 0x73, 0xbf, 0x7b, 0x68, 0x99, 0xb7, 0x3e, 0x6f, 0x93, 0xc4, + 0x1e, 0xd8, 0xfd, 0x9c, 0x73, 0x5b, 0xad, 0x04, 0xc9, 0xc8, 0x8c, 0xbf, 0x35, 0x34, 0xa8, 0xe9, + 0x38, 0x0e, 0x83, 0x29, 0x73, 0xe3, 0x8c, 0x00, 0x7f, 0x83, 0xda, 0xea, 0x74, 0x27, 0x54, 0xd2, + 0x54, 0x58, 0xf7, 0xf0, 0x9d, 0xda, 0xd4, 0xd2, 0xac, 0x19, 0xcd, 0x5d, 0x55, 0x10, 0xa6, 0xda, + 0x6d, 0x2e, 0x0e, 0xcc, 0x27, 0xe3, 0x6f, 0xc1, 0x91, 0x9f, 0x81, 0xa4, 0x36, 0xce, 0xc7, 0xa2, + 0xaa, 0x46, 0x4a, 0x56, 0x1c, 0xa1, 0x1e, 0xab, 0xa6, 0x17, 0xde, 0x1e, 0x6d, 0xe0, 0xad, 0x26, + 0xde, 0x7e, 0x3d, 0x9f, 0xd5, 0xab, 0x15, 0x05, 0x59, 0x99, 0x60, 0xfc, 0xa5, 0xa1, 0x37, 0xd6, + 0x19, 0x3e, 0x61, 0x42, 0xe2, 0xaf, 0xaf, 0x99, 0x36, 0x6f, 0x67, 0x5a, 0xa1, 0x53, 0xcb, 0xf7, + 0x73, 0x19, 0xed, 0xa2, 0x52, 0x33, 0x3c, 0x43, 0xdb, 0x4c, 0x82, 0x5f, 0x38, 0x3d, 0xfe, 0x7f, + 0x4e, 0x57, 0x54, 0x57, 0x5f, 0x76, 0xa4, 0x98, 0x49, 0x36, 0xc0, 0xf8, 0x45, 0x43, 0x2d, 0xf5, + 0xa9, 0xf1, 0x5b, 0xa8, 0x43, 0x23, 0xf6, 0x29, 0x0f, 0xe3, 0x48, 0x0c, 0xb4, 0xbd, 0xe6, 0x7e, + 0xc7, 0xee, 0x27, 0xcb, 0x61, 0xe7, 0xe8, 0x74, 0x94, 0x15, 0x49, 0xd5, 0xc7, 0x07, 0xa8, 0x4b, + 0x23, 0xf6, 0x14, 0xb8, 0xd2, 0x91, 0xa9, 0xec, 0xd8, 0xf7, 0x92, 0xe5, 0xb0, 0x7b, 0x74, 0x3a, + 0x2a, 0xca, 0xa4, 0xbe, 0x47, 0xf1, 0x73, 0x10, 0x61, 0xcc, 0x1d, 0x10, 0x83, 0x66, 0xc5, 0x4f, + 0x8a, 0x22, 0xa9, 0xfa, 0xc6, 0xaf, 0x1a, 0xc2, 0x4a, 0xd5, 0x33, 0x26, 0x67, 0x4f, 0x22, 0xc8, + 0x1c, 0x08, 0xfc, 0x31, 0x42, 0x61, 0xb9, 0xca, 0x45, 0x0e, 0xd3, 0x5b, 0x53, 0x56, 0x5f, 0x2c, + 0x87, 0xfd, 0x72, 0x75, 0x76, 0x1e, 0x01, 0xa9, 0x41, 0xf0, 0xe7, 0xa8, 0xa5, 0x2e, 0xf4, 0x60, + 0x2b, 0xfd, 0x62, 0x1b, 0x87, 0xa3, 0x0c, 0x9c, 0x5a, 0x91, 0x94, 0xca, 0x00, 0x74, 0xff, 0x0b, + 0xe0, 0x0b, 0xe6, 0x00, 0x81, 0x29, 0x70, 0x08, 0x1c, 0xc0, 0x16, 0xea, 0xa8, 0x30, 0x8a, 0x88, + 0x3a, 0x45, 0x56, 0x1f, 0xe4, 0xd0, 0xce, 0xe3, 0xa2, 0x41, 0xaa, 0x3d, 0x65, 0xae, 0xb7, 0xd6, + 0xe5, 0xda, 0xb8, 0xd4, 0x90, 0xfe, 0x94, 0x7a, 0x6c, 0x42, 0x25, 0x0b, 0xdc, 0x67, 0x30, 0x9e, + 0x85, 0xe1, 0xfc, 0xae, 0x73, 0x78, 0x86, 0xda, 0xf9, 0xe4, 0xe2, 0x66, 0x1e, 0x6e, 0x70, 0x84, + 0x39, 0xd4, 0x6e, 0xa9, 0x19, 0xa4, 0xfd, 0x5d, 0xce, 0x64, 0xfc, 0xa3, 0x21, 0xe3, 0xd5, 0xd6, + 0xee, 0x20, 0x71, 0xc1, 0x6a, 0xe2, 0x46, 0x1b, 0xf8, 0x7a, 0xb5, 0xf6, 0x35, 0xb9, 0xfb, 0x7d, + 0x0b, 0xed, 0xe4, 0xdb, 0x6f, 0xf1, 0xaa, 0x7f, 0x8f, 0x7a, 0x8e, 0xc7, 0x20, 0x90, 0x19, 0x75, + 0x7e, 0x7f, 0x3f, 0xda, 0xfc, 0xf0, 0x8f, 0x6b, 0x2c, 0xd5, 0x43, 0x58, 0xaf, 0x92, 0x95, 0x49, + 0x78, 0x5c, 0xfc, 0x9f, 0x34, 0xd3, 0x73, 0xf9, 0x70, 0xc3, 0xc8, 0xac, 0x06, 0xf8, 0xe6, 0x7f, + 0x17, 0x7c, 0x82, 0xfa, 0x53, 0xca, 0xbc, 0x98, 0xc3, 0x69, 0xe8, 0x31, 0xe7, 0x7c, 0xd0, 0x4a, + 0x0f, 0xe2, 0xcd, 0x64, 0x39, 0xec, 0x7f, 0x52, 0x6f, 0xbc, 0x58, 0x0e, 0x1f, 0xac, 0x14, 0xd2, + 0x80, 0xaf, 0x82, 0x8d, 0xdf, 0x34, 0xf4, 0xda, 0x0d, 0x6e, 0xf1, 0x14, 0xed, 0x88, 0x2c, 0xa8, + 0xf9, 0xf5, 0xf9, 0x60, 0x03, 0x2f, 0x2f, 0x47, 0xdc, 0xbe, 0x97, 0x3b, 0xd9, 0x29, 0x3a, 0x05, + 0x39, 0xde, 0x47, 0x6d, 0x87, 0xda, 0x71, 0x30, 0xc9, 0xdf, 0x99, 0x9e, 0xdd, 0x53, 0x77, 0xee, + 0xf8, 0x28, 0xab, 0x91, 0xb2, 0x8b, 0x1f, 0xa2, 0x9d, 0x98, 0x7b, 0xa7, 0x54, 0xce, 0x06, 0xcd, + 0xd4, 0x71, 0x49, 0xfa, 0x25, 0x39, 0x51, 0x65, 0x52, 0xf4, 0x6d, 0xf3, 0xe2, 0x4a, 0x6f, 0x3c, + 0xbf, 0xd2, 0x1b, 0x97, 0x57, 0x7a, 0xe3, 0xc7, 0x44, 0xd7, 0x2e, 0x12, 0x5d, 0x7b, 0x9e, 0xe8, + 0xda, 0x65, 0xa2, 0x6b, 0x7f, 0x24, 0xba, 0xf6, 0xf3, 0x9f, 0x7a, 0xe3, 0xab, 0x76, 0xa1, 0xf7, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x7f, 0x7f, 0x23, 0xbb, 0x09, 0x00, 0x00, } diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto index b5ad69cd78..9b1ede6fdd 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto @@ -29,72 +29,6 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; -// AdmissionHookClientConfig contains the information to make a TLS -// connection with the webhook -message AdmissionHookClientConfig { - // Service is a reference to the service for this webhook. If there is only - // one port open for the service, that port will be used. If there are multiple - // ports open, port 443 will be used if it is open, otherwise it is an error. - // Required - optional ServiceReference service = 1; - - // URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object. - optional string urlPath = 3; - - // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. - // Required - optional bytes caBundle = 2; -} - -// ExternalAdmissionHook describes an external admission webhook and the -// resources and operations it applies to. -message ExternalAdmissionHook { - // The name of the external admission webhook. - // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where - // "imagepolicy" is the name of the webhook, and kubernetes.io is the name - // of the organization. - // Required. - optional string name = 1; - - // ClientConfig defines how to communicate with the hook. - // Required - optional AdmissionHookClientConfig clientConfig = 2; - - // Rules describes what operations on what resources/subresources the webhook cares about. - // The webhook cares about an operation if it matches _any_ Rule. - repeated RuleWithOperations rules = 3; - - // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - - // allowed values are Ignore or Fail. Defaults to Ignore. - // +optional - optional string failurePolicy = 4; -} - -// ExternalAdmissionHookConfiguration describes the configuration of initializers. -message ExternalAdmissionHookConfiguration { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // ExternalAdmissionHooks is a list of external admission webhooks and the - // affected resources and operations. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated ExternalAdmissionHook externalAdmissionHooks = 2; -} - -// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. -message ExternalAdmissionHookConfigurationList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ExternalAdmissionHookConfiguration. - repeated ExternalAdmissionHookConfiguration items = 2; -} - // Initializer describes the name and the failure policy of an initializer, and // what resources it applies to. message Initializer { @@ -197,3 +131,67 @@ message ServiceReference { optional string name = 2; } +// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +message ValidatingWebhookConfiguration { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Webhooks is a list of webhooks and the affected resources and operations. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + repeated Webhook Webhooks = 2; +} + +// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. +message ValidatingWebhookConfigurationList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of ValidatingWebhookConfiguration. + repeated ValidatingWebhookConfiguration items = 2; +} + +// Webhook describes an admission webhook and the resources and operations it applies to. +message Webhook { + // The name of the admission webhook. + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where + // "imagepolicy" is the name of the webhook, and kubernetes.io is the name + // of the organization. + // Required. + optional string name = 1; + + // ClientConfig defines how to communicate with the hook. + // Required + optional WebhookClientConfig clientConfig = 2; + + // Rules describes what operations on what resources/subresources the webhook cares about. + // The webhook cares about an operation if it matches _any_ Rule. + repeated RuleWithOperations rules = 3; + + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - + // allowed values are Ignore or Fail. Defaults to Ignore. + // +optional + optional string failurePolicy = 4; +} + +// WebhookClientConfig contains the information to make a TLS +// connection with the webhook +message WebhookClientConfig { + // Service is a reference to the service for this webhook. If there is only + // one port open for the service, that port will be used. If there are multiple + // ports open, port 443 will be used if it is open, otherwise it is an error. + // Required + optional ServiceReference service = 1; + + // URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object. + optional string urlPath = 3; + + // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. + // Required + optional bytes caBundle = 2; +} + diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go index 77a8a5197b..9f09cf00d5 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go @@ -27,49 +27,6 @@ package v1alpha1 // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE -var map_AdmissionHookClientConfig = map[string]string{ - "": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook", - "service": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", - "urlPath": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.", - "caBundle": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", -} - -func (AdmissionHookClientConfig) SwaggerDoc() map[string]string { - return map_AdmissionHookClientConfig -} - -var map_ExternalAdmissionHook = map[string]string{ - "": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.", - "name": "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", - "clientConfig": "ClientConfig defines how to communicate with the hook. Required", - "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", - "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", -} - -func (ExternalAdmissionHook) SwaggerDoc() map[string]string { - return map_ExternalAdmissionHook -} - -var map_ExternalAdmissionHookConfiguration = map[string]string{ - "": "ExternalAdmissionHookConfiguration describes the configuration of initializers.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "externalAdmissionHooks": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.", -} - -func (ExternalAdmissionHookConfiguration) SwaggerDoc() map[string]string { - return map_ExternalAdmissionHookConfiguration -} - -var map_ExternalAdmissionHookConfigurationList = map[string]string{ - "": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "items": "List of ExternalAdmissionHookConfiguration.", -} - -func (ExternalAdmissionHookConfigurationList) SwaggerDoc() map[string]string { - return map_ExternalAdmissionHookConfigurationList -} - var map_Initializer = map[string]string{ "": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", "name": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required", @@ -130,4 +87,47 @@ func (ServiceReference) SwaggerDoc() map[string]string { return map_ServiceReference } +var map_ValidatingWebhookConfiguration = map[string]string{ + "": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "Webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", +} + +func (ValidatingWebhookConfiguration) SwaggerDoc() map[string]string { + return map_ValidatingWebhookConfiguration +} + +var map_ValidatingWebhookConfigurationList = map[string]string{ + "": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "items": "List of ValidatingWebhookConfiguration.", +} + +func (ValidatingWebhookConfigurationList) SwaggerDoc() map[string]string { + return map_ValidatingWebhookConfigurationList +} + +var map_Webhook = map[string]string{ + "": "Webhook describes an admission webhook and the resources and operations it applies to.", + "name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "clientConfig": "ClientConfig defines how to communicate with the hook. Required", + "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", + "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", +} + +func (Webhook) SwaggerDoc() map[string]string { + return map_Webhook +} + +var map_WebhookClientConfig = map[string]string{ + "": "WebhookClientConfig contains the information to make a TLS connection with the webhook", + "service": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", + "urlPath": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.", + "caBundle": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", +} + +func (WebhookClientConfig) SwaggerDoc() map[string]string { + return map_WebhookClientConfig +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go index 118fed7503..30a2db80b9 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go @@ -36,22 +36,6 @@ func init() { // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*AdmissionHookClientConfig).DeepCopyInto(out.(*AdmissionHookClientConfig)) - return nil - }, InType: reflect.TypeOf(&AdmissionHookClientConfig{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHook).DeepCopyInto(out.(*ExternalAdmissionHook)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHook{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHookConfiguration).DeepCopyInto(out.(*ExternalAdmissionHookConfiguration)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ExternalAdmissionHookConfigurationList).DeepCopyInto(out.(*ExternalAdmissionHookConfigurationList)) - return nil - }, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*Initializer).DeepCopyInto(out.(*Initializer)) return nil @@ -76,132 +60,25 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*ServiceReference).DeepCopyInto(out.(*ServiceReference)) return nil }, InType: reflect.TypeOf(&ServiceReference{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ValidatingWebhookConfiguration).DeepCopyInto(out.(*ValidatingWebhookConfiguration)) + return nil + }, InType: reflect.TypeOf(&ValidatingWebhookConfiguration{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ValidatingWebhookConfigurationList).DeepCopyInto(out.(*ValidatingWebhookConfigurationList)) + return nil + }, InType: reflect.TypeOf(&ValidatingWebhookConfigurationList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Webhook).DeepCopyInto(out.(*Webhook)) + return nil + }, InType: reflect.TypeOf(&Webhook{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*WebhookClientConfig).DeepCopyInto(out.(*WebhookClientConfig)) + return nil + }, InType: reflect.TypeOf(&WebhookClientConfig{})}, ) } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionHookClientConfig) DeepCopyInto(out *AdmissionHookClientConfig) { - *out = *in - out.Service = in.Service - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionHookClientConfig. -func (in *AdmissionHookClientConfig) DeepCopy() *AdmissionHookClientConfig { - if in == nil { - return nil - } - out := new(AdmissionHookClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHook) DeepCopyInto(out *ExternalAdmissionHook) { - *out = *in - in.ClientConfig.DeepCopyInto(&out.ClientConfig) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]RuleWithOperations, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailurePolicy != nil { - in, out := &in.FailurePolicy, &out.FailurePolicy - if *in == nil { - *out = nil - } else { - *out = new(FailurePolicyType) - **out = **in - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHook. -func (in *ExternalAdmissionHook) DeepCopy() *ExternalAdmissionHook { - if in == nil { - return nil - } - out := new(ExternalAdmissionHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHookConfiguration) DeepCopyInto(out *ExternalAdmissionHookConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ExternalAdmissionHooks != nil { - in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks - *out = make([]ExternalAdmissionHook, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfiguration. -func (in *ExternalAdmissionHookConfiguration) DeepCopy() *ExternalAdmissionHookConfiguration { - if in == nil { - return nil - } - out := new(ExternalAdmissionHookConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ExternalAdmissionHookConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalAdmissionHookConfigurationList) DeepCopyInto(out *ExternalAdmissionHookConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ExternalAdmissionHookConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfigurationList. -func (in *ExternalAdmissionHookConfigurationList) DeepCopy() *ExternalAdmissionHookConfigurationList { - if in == nil { - return nil - } - out := new(ExternalAdmissionHookConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ExternalAdmissionHookConfigurationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Initializer) DeepCopyInto(out *Initializer) { *out = *in @@ -361,3 +238,126 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Webhooks != nil { + in, out := &in.Webhooks, &out.Webhooks + *out = make([]Webhook, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration. +func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { + if in == nil { + return nil + } + out := new(ValidatingWebhookConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingWebhookConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList. +func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { + if in == nil { + return nil + } + out := new(ValidatingWebhookConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Webhook) DeepCopyInto(out *Webhook) { + *out = *in + in.ClientConfig.DeepCopyInto(&out.ClientConfig) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]RuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + if *in == nil { + *out = nil + } else { + *out = new(FailurePolicyType) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook. +func (in *Webhook) DeepCopy() *Webhook { + if in == nil { + return nil + } + out := new(Webhook) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { + *out = *in + out.Service = in.Service + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. +func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { + if in == nil { + return nil + } + out := new(WebhookClientConfig) + in.DeepCopyInto(out) + return out +} diff --git a/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD b/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD index d2cb75d9f9..e7702b9b0f 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD @@ -10,8 +10,8 @@ go_test( name = "go_default_test", srcs = [ "configuration_manager_test.go", - "external_admission_hook_manager_test.go", "initializer_manager_test.go", + "validating_webhook_manager_test.go", ], importpath = "k8s.io/apiserver/pkg/admission/configuration", library = ":go_default_library", @@ -29,8 +29,8 @@ go_library( name = "go_default_library", srcs = [ "configuration_manager.go", - "external_admission_hook_manager.go", "initializer_manager.go", + "validating_webhook_manager.go", ], importpath = "k8s.io/apiserver/pkg/admission/configuration", deps = [ diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD index 8684c3e6e3..6f48bbfb33 100644 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD +++ b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD @@ -8,9 +8,9 @@ load( go_library( name = "go_default_library", srcs = [ - "externaladmissionhookconfiguration.go", "initializerconfiguration.go", "interface.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1", deps = [ diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go deleted file mode 100644 index a0c2ba48c7..0000000000 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ExternalAdmissionHookConfigurationInformer provides access to a shared informer and lister for -// ExternalAdmissionHookConfigurations. -type ExternalAdmissionHookConfigurationInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.ExternalAdmissionHookConfigurationLister -} - -type externalAdmissionHookConfigurationInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewExternalAdmissionHookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredExternalAdmissionHookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AdmissionregistrationV1alpha1().ExternalAdmissionHookConfigurations().List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AdmissionregistrationV1alpha1().ExternalAdmissionHookConfigurations().Watch(options) - }, - }, - &admissionregistration_v1alpha1.ExternalAdmissionHookConfiguration{}, - resyncPeriod, - indexers, - ) -} - -func (f *externalAdmissionHookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *externalAdmissionHookConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistration_v1alpha1.ExternalAdmissionHookConfiguration{}, f.defaultInformer) -} - -func (f *externalAdmissionHookConfigurationInformer) Lister() v1alpha1.ExternalAdmissionHookConfigurationLister { - return v1alpha1.NewExternalAdmissionHookConfigurationLister(f.Informer().GetIndexer()) -} diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go index b082c0a0bb..3192d0a488 100644 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go +++ b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go @@ -24,10 +24,10 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { - // ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer. - ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer // InitializerConfigurations returns a InitializerConfigurationInformer. InitializerConfigurations() InitializerConfigurationInformer + // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. + ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer } type version struct { @@ -41,12 +41,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer. -func (v *version) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer { - return &externalAdmissionHookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - // InitializerConfigurations returns a InitializerConfigurationInformer. func (v *version) InitializerConfigurations() InitializerConfigurationInformer { return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. +func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer { + return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go new file mode 100644 index 0000000000..2a2172eedc --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go @@ -0,0 +1,87 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" + cache "k8s.io/client-go/tools/cache" + time "time" +) + +// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for +// ValidatingWebhookConfigurations. +type ValidatingWebhookConfigurationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ValidatingWebhookConfigurationLister +} + +type validatingWebhookConfigurationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1alpha1().ValidatingWebhookConfigurations().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1alpha1().ValidatingWebhookConfigurations().Watch(options) + }, + }, + &admissionregistration_v1alpha1.ValidatingWebhookConfiguration{}, + resyncPeriod, + indexers, + ) +} + +func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&admissionregistration_v1alpha1.ValidatingWebhookConfiguration{}, f.defaultInformer) +} + +func (f *validatingWebhookConfigurationInformer) Lister() v1alpha1.ValidatingWebhookConfigurationLister { + return v1alpha1.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index f8ef310be2..79a8fb81d6 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -72,10 +72,10 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=admissionregistration.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("externaladmissionhookconfigurations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ExternalAdmissionHookConfigurations().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingWebhookConfigurations().Informer()}, nil // Group=apps, Version=v1 case v1.SchemeGroupVersion.WithResource("controllerrevisions"): diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD index 2b27133640..8cb97c09a4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD @@ -10,9 +10,9 @@ go_library( srcs = [ "admissionregistration_client.go", "doc.go", - "externaladmissionhookconfiguration.go", "generated_expansion.go", "initializerconfiguration.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", deps = [ diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go index 95d5339197..b521f2acc0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go @@ -25,8 +25,8 @@ import ( type AdmissionregistrationV1alpha1Interface interface { RESTClient() rest.Interface - ExternalAdmissionHookConfigurationsGetter InitializerConfigurationsGetter + ValidatingWebhookConfigurationsGetter } // AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group. @@ -34,14 +34,14 @@ type AdmissionregistrationV1alpha1Client struct { restClient rest.Interface } -func (c *AdmissionregistrationV1alpha1Client) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface { - return newExternalAdmissionHookConfigurations(c) -} - func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface { return newInitializerConfigurations(c) } +func (c *AdmissionregistrationV1alpha1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface { + return newValidatingWebhookConfigurations(c) +} + // NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) { config := *c diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go deleted file mode 100644 index 1ddc6eb48c..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - scheme "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -// ExternalAdmissionHookConfigurationsGetter has a method to return a ExternalAdmissionHookConfigurationInterface. -// A group's client should implement this interface. -type ExternalAdmissionHookConfigurationsGetter interface { - ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface -} - -// ExternalAdmissionHookConfigurationInterface has methods to work with ExternalAdmissionHookConfiguration resources. -type ExternalAdmissionHookConfigurationInterface interface { - Create(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error) - Update(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.ExternalAdmissionHookConfiguration, error) - List(opts v1.ListOptions) (*v1alpha1.ExternalAdmissionHookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) - ExternalAdmissionHookConfigurationExpansion -} - -// externalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface -type externalAdmissionHookConfigurations struct { - client rest.Interface -} - -// newExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurations -func newExternalAdmissionHookConfigurations(c *AdmissionregistrationV1alpha1Client) *externalAdmissionHookConfigurations { - return &externalAdmissionHookConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any. -func (c *externalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - result = &v1alpha1.ExternalAdmissionHookConfiguration{} - err = c.client.Get(). - Resource("externaladmissionhookconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors. -func (c *externalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) { - result = &v1alpha1.ExternalAdmissionHookConfigurationList{} - err = c.client.Get(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations. -func (c *externalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *externalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - result = &v1alpha1.ExternalAdmissionHookConfiguration{} - err = c.client.Post(). - Resource("externaladmissionhookconfigurations"). - Body(externalAdmissionHookConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *externalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - result = &v1alpha1.ExternalAdmissionHookConfiguration{} - err = c.client.Put(). - Resource("externaladmissionhookconfigurations"). - Name(externalAdmissionHookConfiguration.Name). - Body(externalAdmissionHookConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs. -func (c *externalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("externaladmissionhookconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *externalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Resource("externaladmissionhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched externalAdmissionHookConfiguration. -func (c *externalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - result = &v1alpha1.ExternalAdmissionHookConfiguration{} - err = c.client.Patch(pt). - Resource("externaladmissionhookconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD index a567ec24ec..07b9ccb6d9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD @@ -10,8 +10,8 @@ go_library( srcs = [ "doc.go", "fake_admissionregistration_client.go", - "fake_externaladmissionhookconfiguration.go", "fake_initializerconfiguration.go", + "fake_validatingwebhookconfiguration.go", ], importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", deps = [ diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go index 8c370a9f70..e329fd8e15 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go @@ -26,14 +26,14 @@ type FakeAdmissionregistrationV1alpha1 struct { *testing.Fake } -func (c *FakeAdmissionregistrationV1alpha1) ExternalAdmissionHookConfigurations() v1alpha1.ExternalAdmissionHookConfigurationInterface { - return &FakeExternalAdmissionHookConfigurations{c} -} - func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1.InitializerConfigurationInterface { return &FakeInitializerConfigurations{c} } +func (c *FakeAdmissionregistrationV1alpha1) ValidatingWebhookConfigurations() v1alpha1.ValidatingWebhookConfigurationInterface { + return &FakeValidatingWebhookConfigurations{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeAdmissionregistrationV1alpha1) RESTClient() rest.Interface { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_externaladmissionhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_externaladmissionhookconfiguration.go deleted file mode 100644 index a0143db3b7..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_externaladmissionhookconfiguration.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeExternalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface -type FakeExternalAdmissionHookConfigurations struct { - Fake *FakeAdmissionregistrationV1alpha1 -} - -var externaladmissionhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "externaladmissionhookconfigurations"} - -var externaladmissionhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ExternalAdmissionHookConfiguration"} - -// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(externaladmissionhookconfigurationsResource, name), &v1alpha1.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err -} - -// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors. -func (c *FakeExternalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(externaladmissionhookconfigurationsResource, externaladmissionhookconfigurationsKind, opts), &v1alpha1.ExternalAdmissionHookConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ExternalAdmissionHookConfigurationList{} - for _, item := range obj.(*v1alpha1.ExternalAdmissionHookConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations. -func (c *FakeExternalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(externaladmissionhookconfigurationsResource, opts)) -} - -// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &v1alpha1.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err -} - -// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any. -func (c *FakeExternalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &v1alpha1.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err -} - -// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeExternalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(externaladmissionhookconfigurationsResource, name), &v1alpha1.ExternalAdmissionHookConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeExternalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(externaladmissionhookconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.ExternalAdmissionHookConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched externalAdmissionHookConfiguration. -func (c *FakeExternalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(externaladmissionhookconfigurationsResource, name, data, subresources...), &v1alpha1.ExternalAdmissionHookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingwebhookconfiguration.go new file mode 100644 index 0000000000..f3067525ea --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingwebhookconfiguration.go @@ -0,0 +1,118 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type FakeValidatingWebhookConfigurations struct { + Fake *FakeAdmissionregistrationV1alpha1 +} + +var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "validatingwebhookconfigurations"} + +var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingWebhookConfiguration"} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1alpha1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ValidatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1alpha1.ValidatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ValidatingWebhookConfigurationList{} + for _, item := range obj.(*v1alpha1.ValidatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1alpha1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingWebhookConfiguration), err +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1alpha1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingWebhookConfiguration), err +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1alpha1.ValidatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.ValidatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, data, subresources...), &v1alpha1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingWebhookConfiguration), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go index eef439ab47..5444ce2626 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go @@ -16,6 +16,6 @@ limitations under the License. package v1alpha1 -type ExternalAdmissionHookConfigurationExpansion interface{} - type InitializerConfigurationExpansion interface{} + +type ValidatingWebhookConfigurationExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingwebhookconfiguration.go new file mode 100644 index 0000000000..99096b7512 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingwebhookconfiguration.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface. +// A group's client should implement this interface. +type ValidatingWebhookConfigurationsGetter interface { + ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface +} + +// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. +type ValidatingWebhookConfigurationInterface interface { + Create(*v1alpha1.ValidatingWebhookConfiguration) (*v1alpha1.ValidatingWebhookConfiguration, error) + Update(*v1alpha1.ValidatingWebhookConfiguration) (*v1alpha1.ValidatingWebhookConfiguration, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ValidatingWebhookConfiguration, error) + List(opts v1.ListOptions) (*v1alpha1.ValidatingWebhookConfigurationList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error) + ValidatingWebhookConfigurationExpansion +} + +// validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type validatingWebhookConfigurations struct { + client rest.Interface +} + +// newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations +func newValidatingWebhookConfigurations(c *AdmissionregistrationV1alpha1Client) *validatingWebhookConfigurations { + return &validatingWebhookConfigurations{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + result = &v1alpha1.ValidatingWebhookConfiguration{} + err = c.client.Get(). + Resource("validatingwebhookconfigurations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ValidatingWebhookConfigurationList, err error) { + result = &v1alpha1.ValidatingWebhookConfigurationList{} + err = c.client.Get(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + result = &v1alpha1.ValidatingWebhookConfiguration{} + err = c.client.Post(). + Resource("validatingwebhookconfigurations"). + Body(validatingWebhookConfiguration). + Do(). + Into(result) + return +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + result = &v1alpha1.ValidatingWebhookConfiguration{} + err = c.client.Put(). + Resource("validatingwebhookconfigurations"). + Name(validatingWebhookConfiguration.Name). + Body(validatingWebhookConfiguration). + Do(). + Into(result) + return +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingwebhookconfigurations"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("validatingwebhookconfigurations"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error) { + result = &v1alpha1.ValidatingWebhookConfiguration{} + err = c.client.Patch(pt). + Resource("validatingwebhookconfigurations"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD index 1322950313..8e82474716 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD @@ -9,8 +9,8 @@ go_library( name = "go_default_library", srcs = [ "expansion_generated.go", - "externaladmissionhookconfiguration.go", "initializerconfiguration.go", + "validatingwebhookconfiguration.go", ], importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1", deps = [ diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go index 5d9f14708f..910b046a08 100644 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 -// ExternalAdmissionHookConfigurationListerExpansion allows custom methods to be added to -// ExternalAdmissionHookConfigurationLister. -type ExternalAdmissionHookConfigurationListerExpansion interface{} - // InitializerConfigurationListerExpansion allows custom methods to be added to // InitializerConfigurationLister. type InitializerConfigurationListerExpansion interface{} + +// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to +// ValidatingWebhookConfigurationLister. +type ValidatingWebhookConfigurationListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go deleted file mode 100644 index 490fc4155e..0000000000 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ExternalAdmissionHookConfigurationLister helps list ExternalAdmissionHookConfigurations. -type ExternalAdmissionHookConfigurationLister interface { - // List lists all ExternalAdmissionHookConfigurations in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.ExternalAdmissionHookConfiguration, err error) - // Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name. - Get(name string) (*v1alpha1.ExternalAdmissionHookConfiguration, error) - ExternalAdmissionHookConfigurationListerExpansion -} - -// externalAdmissionHookConfigurationLister implements the ExternalAdmissionHookConfigurationLister interface. -type externalAdmissionHookConfigurationLister struct { - indexer cache.Indexer -} - -// NewExternalAdmissionHookConfigurationLister returns a new ExternalAdmissionHookConfigurationLister. -func NewExternalAdmissionHookConfigurationLister(indexer cache.Indexer) ExternalAdmissionHookConfigurationLister { - return &externalAdmissionHookConfigurationLister{indexer: indexer} -} - -// List lists all ExternalAdmissionHookConfigurations in the indexer. -func (s *externalAdmissionHookConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.ExternalAdmissionHookConfiguration, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.ExternalAdmissionHookConfiguration)) - }) - return ret, err -} - -// Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name. -func (s *externalAdmissionHookConfigurationLister) Get(name string) (*v1alpha1.ExternalAdmissionHookConfiguration, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("externaladmissionhookconfiguration"), name) - } - return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), nil -} diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go new file mode 100644 index 0000000000..5a57c2e5a8 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/validatingwebhookconfiguration.go @@ -0,0 +1,65 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations. +type ValidatingWebhookConfigurationLister interface { + // List lists all ValidatingWebhookConfigurations in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ValidatingWebhookConfiguration, err error) + // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. + Get(name string) (*v1alpha1.ValidatingWebhookConfiguration, error) + ValidatingWebhookConfigurationListerExpansion +} + +// validatingWebhookConfigurationLister implements the ValidatingWebhookConfigurationLister interface. +type validatingWebhookConfigurationLister struct { + indexer cache.Indexer +} + +// NewValidatingWebhookConfigurationLister returns a new ValidatingWebhookConfigurationLister. +func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWebhookConfigurationLister { + return &validatingWebhookConfigurationLister{indexer: indexer} +} + +// List lists all ValidatingWebhookConfigurations in the indexer. +func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.ValidatingWebhookConfiguration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ValidatingWebhookConfiguration)) + }) + return ret, err +} + +// Get retrieves the ValidatingWebhookConfiguration from the index for a given name. +func (s *validatingWebhookConfigurationLister) Get(name string) (*v1alpha1.ValidatingWebhookConfiguration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("validatingwebhookconfiguration"), name) + } + return obj.(*v1alpha1.ValidatingWebhookConfiguration), nil +}