v1

package
v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_k8s_io_api_admission_v1_generated_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AdmissionRequest

type AdmissionRequest struct {

	// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
	// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
	// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
	// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
	Uid *string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	// Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
	Kind *v1.GroupVersionKind `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"`
	// Resource is the fully-qualified resource being requested (for example, v1.pods)
	Resource *v1.GroupVersionResource `protobuf:"bytes,3,opt,name=resource" json:"resource,omitempty"`
	// SubResource is the subresource being requested, if any (for example, "status" or "scale")
	// +optional
	SubResource *string `protobuf:"bytes,4,opt,name=subResource" json:"subResource,omitempty"`
	// RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
	// If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
	//
	// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
	// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
	// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
	// with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
	// and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
	//
	// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
	// +optional
	RequestKind *v1.GroupVersionKind `protobuf:"bytes,13,opt,name=requestKind" json:"requestKind,omitempty"`
	// RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
	// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
	//
	// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
	// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
	// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
	// with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
	// and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
	//
	// See documentation for the "matchPolicy" field in the webhook configuration type.
	// +optional
	RequestResource *v1.GroupVersionResource `protobuf:"bytes,14,opt,name=requestResource" json:"requestResource,omitempty"`
	// RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
	// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
	// See documentation for the "matchPolicy" field in the webhook configuration type.
	// +optional
	RequestSubResource *string `protobuf:"bytes,15,opt,name=requestSubResource" json:"requestSubResource,omitempty"`
	// Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and
	// rely on the server to generate the name.  If that is the case, this field will contain an empty string.
	// +optional
	Name *string `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"`
	// Namespace is the namespace associated with the request (if any).
	// +optional
	Namespace *string `protobuf:"bytes,6,opt,name=namespace" json:"namespace,omitempty"`
	// Operation is the operation being performed. This may be different than the operation
	// requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
	Operation *string `protobuf:"bytes,7,opt,name=operation" json:"operation,omitempty"`
	// UserInfo is information about the requesting user
	UserInfo *v11.UserInfo `protobuf:"bytes,8,opt,name=userInfo" json:"userInfo,omitempty"`
	// Object is the object from the incoming request.
	// +optional
	Object *runtime.RawExtension `protobuf:"bytes,9,opt,name=object" json:"object,omitempty"`
	// OldObject is the existing object. Only populated for DELETE and UPDATE requests.
	// +optional
	OldObject *runtime.RawExtension `protobuf:"bytes,10,opt,name=oldObject" json:"oldObject,omitempty"`
	// DryRun indicates that modifications will definitely not be persisted for this request.
	// Defaults to false.
	// +optional
	DryRun *bool `protobuf:"varint,11,opt,name=dryRun" json:"dryRun,omitempty"`
	// Options is the operation option structure of the operation being performed.
	// e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
	// different than the options the caller provided. e.g. for a patch request the performed
	// Operation might be a CREATE, in which case the Options will a
	// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
	// +optional
	Options *runtime.RawExtension `protobuf:"bytes,12,opt,name=options" json:"options,omitempty"`
	// contains filtered or unexported fields
}

AdmissionRequest describes the admission.Attributes for the admission request.

func (*AdmissionRequest) Descriptor deprecated

func (*AdmissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use AdmissionRequest.ProtoReflect.Descriptor instead.

func (*AdmissionRequest) GetDryRun

func (x *AdmissionRequest) GetDryRun() bool

func (*AdmissionRequest) GetKind

func (x *AdmissionRequest) GetKind() *v1.GroupVersionKind

func (*AdmissionRequest) GetName

func (x *AdmissionRequest) GetName() string

func (*AdmissionRequest) GetNamespace

func (x *AdmissionRequest) GetNamespace() string

func (*AdmissionRequest) GetObject

func (x *AdmissionRequest) GetObject() *runtime.RawExtension

func (*AdmissionRequest) GetOldObject

func (x *AdmissionRequest) GetOldObject() *runtime.RawExtension

func (*AdmissionRequest) GetOperation

func (x *AdmissionRequest) GetOperation() string

func (*AdmissionRequest) GetOptions

func (x *AdmissionRequest) GetOptions() *runtime.RawExtension

func (*AdmissionRequest) GetRequestKind

func (x *AdmissionRequest) GetRequestKind() *v1.GroupVersionKind

func (*AdmissionRequest) GetRequestResource

func (x *AdmissionRequest) GetRequestResource() *v1.GroupVersionResource

func (*AdmissionRequest) GetRequestSubResource

func (x *AdmissionRequest) GetRequestSubResource() string

func (*AdmissionRequest) GetResource

func (x *AdmissionRequest) GetResource() *v1.GroupVersionResource

func (*AdmissionRequest) GetSubResource

func (x *AdmissionRequest) GetSubResource() string

func (*AdmissionRequest) GetUid

func (x *AdmissionRequest) GetUid() string

func (*AdmissionRequest) GetUserInfo

func (x *AdmissionRequest) GetUserInfo() *v11.UserInfo

func (*AdmissionRequest) ProtoMessage

func (*AdmissionRequest) ProtoMessage()

func (*AdmissionRequest) ProtoReflect

func (x *AdmissionRequest) ProtoReflect() protoreflect.Message

func (*AdmissionRequest) Reset

func (x *AdmissionRequest) Reset()

func (*AdmissionRequest) String

func (x *AdmissionRequest) String() string

type AdmissionResponse

type AdmissionResponse struct {

	// UID is an identifier for the individual request/response.
	// This must be copied over from the corresponding AdmissionRequest.
	Uid *string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	// Allowed indicates whether or not the admission request was permitted.
	Allowed *bool `protobuf:"varint,2,opt,name=allowed" json:"allowed,omitempty"`
	// Result contains extra details into why an admission request was denied.
	// This field IS NOT consulted in any way if "Allowed" is "true".
	// +optional
	Status *v1.Status `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
	// The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
	// +optional
	Patch []byte `protobuf:"bytes,4,opt,name=patch" json:"patch,omitempty"`
	// The type of Patch. Currently we only allow "JSONPatch".
	// +optional
	PatchType *string `protobuf:"bytes,5,opt,name=patchType" json:"patchType,omitempty"`
	// AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
	// MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
	// admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
	// the admission webhook to add additional context to the audit log for this request.
	// +optional
	AuditAnnotations map[string]string `` /* 152-byte string literal not displayed */
	// warnings is a list of warning messages to return to the requesting API client.
	// Warning messages describe a problem the client making the API request should correct or be aware of.
	// Limit warnings to 120 characters if possible.
	// Warnings over 256 characters and large numbers of warnings may be truncated.
	// +optional
	Warnings []string `protobuf:"bytes,7,rep,name=warnings" json:"warnings,omitempty"`
	// contains filtered or unexported fields
}

AdmissionResponse describes an admission response.

func (*AdmissionResponse) Descriptor deprecated

func (*AdmissionResponse) Descriptor() ([]byte, []int)

Deprecated: Use AdmissionResponse.ProtoReflect.Descriptor instead.

func (*AdmissionResponse) GetAllowed

func (x *AdmissionResponse) GetAllowed() bool

func (*AdmissionResponse) GetAuditAnnotations

func (x *AdmissionResponse) GetAuditAnnotations() map[string]string

func (*AdmissionResponse) GetPatch

func (x *AdmissionResponse) GetPatch() []byte

func (*AdmissionResponse) GetPatchType

func (x *AdmissionResponse) GetPatchType() string

func (*AdmissionResponse) GetStatus

func (x *AdmissionResponse) GetStatus() *v1.Status

func (*AdmissionResponse) GetUid

func (x *AdmissionResponse) GetUid() string

func (*AdmissionResponse) GetWarnings

func (x *AdmissionResponse) GetWarnings() []string

func (*AdmissionResponse) ProtoMessage

func (*AdmissionResponse) ProtoMessage()

func (*AdmissionResponse) ProtoReflect

func (x *AdmissionResponse) ProtoReflect() protoreflect.Message

func (*AdmissionResponse) Reset

func (x *AdmissionResponse) Reset()

func (*AdmissionResponse) String

func (x *AdmissionResponse) String() string

type AdmissionReview

type AdmissionReview struct {

	// Request describes the attributes for the admission request.
	// +optional
	Request *AdmissionRequest `protobuf:"bytes,1,opt,name=request" json:"request,omitempty"`
	// Response describes the attributes for the admission response.
	// +optional
	Response *AdmissionResponse `protobuf:"bytes,2,opt,name=response" json:"response,omitempty"`
	// contains filtered or unexported fields
}

AdmissionReview describes an admission review request/response.

func (*AdmissionReview) Descriptor deprecated

func (*AdmissionReview) Descriptor() ([]byte, []int)

Deprecated: Use AdmissionReview.ProtoReflect.Descriptor instead.

func (*AdmissionReview) GetRequest

func (x *AdmissionReview) GetRequest() *AdmissionRequest

func (*AdmissionReview) GetResponse

func (x *AdmissionReview) GetResponse() *AdmissionResponse

func (*AdmissionReview) ProtoMessage

func (*AdmissionReview) ProtoMessage()

func (*AdmissionReview) ProtoReflect

func (x *AdmissionReview) ProtoReflect() protoreflect.Message

func (*AdmissionReview) Reset

func (x *AdmissionReview) Reset()

func (*AdmissionReview) String

func (x *AdmissionReview) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL