Documentation ¶
Index ¶
- Variables
- type AdmissionRequestDie
- func (d *AdmissionRequestDie) DeepCopy() *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieDiff(opts ...cmp.Option) string
- func (d *AdmissionRequestDie) DieFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedJSON(j []byte) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedYAML(y []byte) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedYAMLFile(name string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieImmutable(immutable bool) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *AdmissionRequestDie) DieRelease() admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieReleaseJSON() []byte
- func (d *AdmissionRequestDie) DieReleasePtr() *admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionRequestDie) DieReleaseYAML() []byte
- func (d *AdmissionRequestDie) DieSeal() *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieSealFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieSealFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieSealRelease() admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieSealReleasePtr() *admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieStamp(fn func(r *admissionv1.AdmissionRequest)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieStampAt(jp string, fn interface{}) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieWith(fns ...func(d *AdmissionRequestDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DryRun(v *bool) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Kind(v apismetav1.GroupVersionKind) *AdmissionRequestDie
- func (d *AdmissionRequestDie) KindDie(fn func(d *metav1.GroupVersionKindDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Name(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Namespace(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Object(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) OldObject(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Operation(v admissionv1.Operation) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Options(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestKind(v *apismetav1.GroupVersionKind) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestKindDie(fn func(d *metav1.GroupVersionKindDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestResource(v *apismetav1.GroupVersionResource) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestResourceDie(fn func(d *metav1.GroupVersionResourceDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestSubResource(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Resource(v apismetav1.GroupVersionResource) *AdmissionRequestDie
- func (d *AdmissionRequestDie) ResourceDie(fn func(d *metav1.GroupVersionResourceDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) SubResource(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UID(v types.UID) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UserInfo(v apiauthenticationv1.UserInfo) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UserInfoDie(fn func(d *authenticationv1.UserInfoDie)) *AdmissionRequestDie
- type AdmissionResponseDie
- func (d *AdmissionResponseDie) AddAuditAnnotation(key, value string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Allowed(v bool) *AdmissionResponseDie
- func (d *AdmissionResponseDie) AuditAnnotations(v map[string]string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DeepCopy() *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieDiff(opts ...cmp.Option) string
- func (d *AdmissionResponseDie) DieFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedJSON(j []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedYAML(y []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedYAMLFile(name string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieImmutable(immutable bool) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *AdmissionResponseDie) DieRelease() admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieReleaseJSON() []byte
- func (d *AdmissionResponseDie) DieReleasePtr() *admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionResponseDie) DieReleaseYAML() []byte
- func (d *AdmissionResponseDie) DieSeal() *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieSealFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieSealFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieSealRelease() admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieSealReleasePtr() *admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieStamp(fn func(r *admissionv1.AdmissionResponse)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieStampAt(jp string, fn interface{}) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieWith(fns ...func(d *AdmissionResponseDie)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Patch(v []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) PatchType(v *admissionv1.PatchType) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Result(v *apismetav1.Status) *AdmissionResponseDie
- func (d *AdmissionResponseDie) ResultDie(fn func(d *metav1.StatusDie)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) UID(v types.UID) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Warnings(v ...string) *AdmissionResponseDie
- type AdmissionReviewDie
- func (d *AdmissionReviewDie) DeepCopy() *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieDiff(opts ...cmp.Option) string
- func (d *AdmissionReviewDie) DieFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedJSON(j []byte) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedYAML(y []byte) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedYAMLFile(name string) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieImmutable(immutable bool) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *AdmissionReviewDie) DieRelease() admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieReleaseJSON() []byte
- func (d *AdmissionReviewDie) DieReleasePtr() *admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionReviewDie) DieReleaseYAML() []byte
- func (d *AdmissionReviewDie) DieSeal() *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieSealFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieSealFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieSealRelease() admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieSealReleasePtr() *admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieStamp(fn func(r *admissionv1.AdmissionReview)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieStampAt(jp string, fn interface{}) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieWith(fns ...func(d *AdmissionReviewDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) Request(v *admissionv1.AdmissionRequest) *AdmissionReviewDie
- func (d *AdmissionReviewDie) RequestDie(fn func(d *AdmissionRequestDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) Response(v *admissionv1.AdmissionResponse) *AdmissionReviewDie
- func (d *AdmissionReviewDie) ResponseDie(fn func(d *AdmissionResponseDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) TypeMeta(v apismetav1.TypeMeta) *AdmissionReviewDie
Constants ¶
This section is empty.
Variables ¶
var AdmissionRequestBlank = (&AdmissionRequestDie{}).DieFeed(admissionv1.AdmissionRequest{})
var AdmissionResponseBlank = (&AdmissionResponseDie{}).DieFeed(admissionv1.AdmissionResponse{})
var AdmissionReviewBlank = (&AdmissionReviewDie{}).DieFeed(admissionv1.AdmissionReview{})
Functions ¶
This section is empty.
Types ¶
type AdmissionRequestDie ¶
type AdmissionRequestDie struct {
// contains filtered or unexported fields
}
func (*AdmissionRequestDie) DeepCopy ¶
func (d *AdmissionRequestDie) DeepCopy() *AdmissionRequestDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionRequestDie) DieDiff ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieDiff(opts ...cmp.Option) string
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*AdmissionRequestDie) DieFeed ¶
func (d *AdmissionRequestDie) DieFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
DieFeed returns a new die with the provided resource.
func (*AdmissionRequestDie) DieFeedJSON ¶
func (d *AdmissionRequestDie) DieFeedJSON(j []byte) *AdmissionRequestDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionRequestDie) DieFeedPtr ¶
func (d *AdmissionRequestDie) DieFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionRequestDie) DieFeedRawExtension ¶
func (d *AdmissionRequestDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionRequestDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionRequestDie) DieFeedYAML ¶
func (d *AdmissionRequestDie) DieFeedYAML(y []byte) *AdmissionRequestDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionRequestDie) DieFeedYAMLFile ¶
func (d *AdmissionRequestDie) DieFeedYAMLFile(name string) *AdmissionRequestDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionRequestDie) DieImmutable ¶
func (d *AdmissionRequestDie) DieImmutable(immutable bool) *AdmissionRequestDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionRequestDie) DiePatch ¶ added in v0.13.0
func (d *AdmissionRequestDie) DiePatch(patchType types.PatchType) ([]byte, error)
DiePatch generates a patch between the current value of the die and the sealed value.
func (*AdmissionRequestDie) DieRelease ¶
func (d *AdmissionRequestDie) DieRelease() admissionv1.AdmissionRequest
DieRelease returns the resource managed by the die.
func (*AdmissionRequestDie) DieReleaseJSON ¶
func (d *AdmissionRequestDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionRequestDie) DieReleasePtr ¶
func (d *AdmissionRequestDie) DieReleasePtr() *admissionv1.AdmissionRequest
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionRequestDie) DieReleaseRawExtension ¶
func (d *AdmissionRequestDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionRequestDie) DieReleaseYAML ¶
func (d *AdmissionRequestDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionRequestDie) DieSeal ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieSeal() *AdmissionRequestDie
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*AdmissionRequestDie) DieSealFeed ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieSealFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*AdmissionRequestDie) DieSealFeedPtr ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieSealFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*AdmissionRequestDie) DieSealRelease ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieSealRelease() admissionv1.AdmissionRequest
DieSealRelease returns the sealed resource managed by the die.
func (*AdmissionRequestDie) DieSealReleasePtr ¶ added in v0.13.0
func (d *AdmissionRequestDie) DieSealReleasePtr() *admissionv1.AdmissionRequest
DieSealReleasePtr returns the sealed resource pointer managed by the die.
func (*AdmissionRequestDie) DieStamp ¶
func (d *AdmissionRequestDie) DieStamp(fn func(r *admissionv1.AdmissionRequest)) *AdmissionRequestDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionRequestDie) DieStampAt ¶
func (d *AdmissionRequestDie) DieStampAt(jp string, fn interface{}) *AdmissionRequestDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionRequestDie) DieWith ¶
func (d *AdmissionRequestDie) DieWith(fns ...func(d *AdmissionRequestDie)) *AdmissionRequestDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionRequestDie) DryRun ¶
func (d *AdmissionRequestDie) DryRun(v *bool) *AdmissionRequestDie
DryRun indicates that modifications will definitely not be persisted for this request.
Defaults to false.
func (*AdmissionRequestDie) Kind ¶
func (d *AdmissionRequestDie) Kind(v apismetav1.GroupVersionKind) *AdmissionRequestDie
Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
func (*AdmissionRequestDie) KindDie ¶
func (d *AdmissionRequestDie) KindDie(fn func(d *metav1.GroupVersionKindDie)) *AdmissionRequestDie
KindDie mutates Kind as a die.
Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
func (*AdmissionRequestDie) Name ¶
func (d *AdmissionRequestDie) Name(v string) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) Namespace ¶
func (d *AdmissionRequestDie) Namespace(v string) *AdmissionRequestDie
Namespace is the namespace associated with the request (if any).
func (*AdmissionRequestDie) Object ¶
func (d *AdmissionRequestDie) Object(v runtime.RawExtension) *AdmissionRequestDie
Object is the object from the incoming request.
func (*AdmissionRequestDie) OldObject ¶
func (d *AdmissionRequestDie) OldObject(v runtime.RawExtension) *AdmissionRequestDie
OldObject is the existing object. Only populated for DELETE and UPDATE requests.
func (*AdmissionRequestDie) Operation ¶
func (d *AdmissionRequestDie) Operation(v admissionv1.Operation) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) Options ¶
func (d *AdmissionRequestDie) Options(v runtime.RawExtension) *AdmissionRequestDie
Options is the operation option structure of the operation being performed.
e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
different than the options the caller provided. e.g. for a patch request the performed
Operation might be a CREATE, in which case the Options will a ¶
`meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
func (*AdmissionRequestDie) RequestKind ¶
func (d *AdmissionRequestDie) RequestKind(v *apismetav1.GroupVersionKind) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) RequestKindDie ¶
func (d *AdmissionRequestDie) RequestKindDie(fn func(d *metav1.GroupVersionKindDie)) *AdmissionRequestDie
RequestKindDie mutates RequestKind as a die.
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.
func (*AdmissionRequestDie) RequestResource ¶
func (d *AdmissionRequestDie) RequestResource(v *apismetav1.GroupVersionResource) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) RequestResourceDie ¶
func (d *AdmissionRequestDie) RequestResourceDie(fn func(d *metav1.GroupVersionResourceDie)) *AdmissionRequestDie
RequestResourceDie mutates RequestResource as a die.
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.
func (*AdmissionRequestDie) RequestSubResource ¶
func (d *AdmissionRequestDie) RequestSubResource(v string) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) Resource ¶
func (d *AdmissionRequestDie) Resource(v apismetav1.GroupVersionResource) *AdmissionRequestDie
Resource is the fully-qualified resource being requested (for example, v1.pods)
func (*AdmissionRequestDie) ResourceDie ¶
func (d *AdmissionRequestDie) ResourceDie(fn func(d *metav1.GroupVersionResourceDie)) *AdmissionRequestDie
ResourceDie mutates Resource as a die.
Resource is the fully-qualified resource being requested (for example, v1.pods)
func (*AdmissionRequestDie) SubResource ¶
func (d *AdmissionRequestDie) SubResource(v string) *AdmissionRequestDie
SubResource is the subresource being requested, if any (for example, "status" or "scale")
func (*AdmissionRequestDie) UID ¶
func (d *AdmissionRequestDie) UID(v types.UID) *AdmissionRequestDie
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.
func (*AdmissionRequestDie) UserInfo ¶
func (d *AdmissionRequestDie) UserInfo(v apiauthenticationv1.UserInfo) *AdmissionRequestDie
UserInfo is information about the requesting user
func (*AdmissionRequestDie) UserInfoDie ¶
func (d *AdmissionRequestDie) UserInfoDie(fn func(d *authenticationv1.UserInfoDie)) *AdmissionRequestDie
UserInfoDie mutates UserInfo as a die.
UserInfo is information about the requesting user
type AdmissionResponseDie ¶
type AdmissionResponseDie struct {
// contains filtered or unexported fields
}
func (*AdmissionResponseDie) AddAuditAnnotation ¶
func (d *AdmissionResponseDie) AddAuditAnnotation(key, value string) *AdmissionResponseDie
func (*AdmissionResponseDie) Allowed ¶
func (d *AdmissionResponseDie) Allowed(v bool) *AdmissionResponseDie
Allowed indicates whether or not the admission request was permitted.
func (*AdmissionResponseDie) AuditAnnotations ¶
func (d *AdmissionResponseDie) AuditAnnotations(v map[string]string) *AdmissionResponseDie
AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with ¶
admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
the admission webhook to add additional context to the audit log for this request.
func (*AdmissionResponseDie) DeepCopy ¶
func (d *AdmissionResponseDie) DeepCopy() *AdmissionResponseDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionResponseDie) DieDiff ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieDiff(opts ...cmp.Option) string
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*AdmissionResponseDie) DieFeed ¶
func (d *AdmissionResponseDie) DieFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
DieFeed returns a new die with the provided resource.
func (*AdmissionResponseDie) DieFeedJSON ¶
func (d *AdmissionResponseDie) DieFeedJSON(j []byte) *AdmissionResponseDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionResponseDie) DieFeedPtr ¶
func (d *AdmissionResponseDie) DieFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionResponseDie) DieFeedRawExtension ¶
func (d *AdmissionResponseDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionResponseDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionResponseDie) DieFeedYAML ¶
func (d *AdmissionResponseDie) DieFeedYAML(y []byte) *AdmissionResponseDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionResponseDie) DieFeedYAMLFile ¶
func (d *AdmissionResponseDie) DieFeedYAMLFile(name string) *AdmissionResponseDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionResponseDie) DieImmutable ¶
func (d *AdmissionResponseDie) DieImmutable(immutable bool) *AdmissionResponseDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionResponseDie) DiePatch ¶ added in v0.13.0
func (d *AdmissionResponseDie) DiePatch(patchType types.PatchType) ([]byte, error)
DiePatch generates a patch between the current value of the die and the sealed value.
func (*AdmissionResponseDie) DieRelease ¶
func (d *AdmissionResponseDie) DieRelease() admissionv1.AdmissionResponse
DieRelease returns the resource managed by the die.
func (*AdmissionResponseDie) DieReleaseJSON ¶
func (d *AdmissionResponseDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionResponseDie) DieReleasePtr ¶
func (d *AdmissionResponseDie) DieReleasePtr() *admissionv1.AdmissionResponse
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionResponseDie) DieReleaseRawExtension ¶
func (d *AdmissionResponseDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionResponseDie) DieReleaseYAML ¶
func (d *AdmissionResponseDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionResponseDie) DieSeal ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieSeal() *AdmissionResponseDie
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*AdmissionResponseDie) DieSealFeed ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieSealFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*AdmissionResponseDie) DieSealFeedPtr ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieSealFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*AdmissionResponseDie) DieSealRelease ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieSealRelease() admissionv1.AdmissionResponse
DieSealRelease returns the sealed resource managed by the die.
func (*AdmissionResponseDie) DieSealReleasePtr ¶ added in v0.13.0
func (d *AdmissionResponseDie) DieSealReleasePtr() *admissionv1.AdmissionResponse
DieSealReleasePtr returns the sealed resource pointer managed by the die.
func (*AdmissionResponseDie) DieStamp ¶
func (d *AdmissionResponseDie) DieStamp(fn func(r *admissionv1.AdmissionResponse)) *AdmissionResponseDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionResponseDie) DieStampAt ¶
func (d *AdmissionResponseDie) DieStampAt(jp string, fn interface{}) *AdmissionResponseDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionResponseDie) DieWith ¶
func (d *AdmissionResponseDie) DieWith(fns ...func(d *AdmissionResponseDie)) *AdmissionResponseDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionResponseDie) Patch ¶
func (d *AdmissionResponseDie) Patch(v []byte) *AdmissionResponseDie
The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
func (*AdmissionResponseDie) PatchType ¶
func (d *AdmissionResponseDie) PatchType(v *admissionv1.PatchType) *AdmissionResponseDie
The type of Patch. Currently we only allow "JSONPatch".
func (*AdmissionResponseDie) Result ¶
func (d *AdmissionResponseDie) Result(v *apismetav1.Status) *AdmissionResponseDie
Result contains extra details into why an admission request was denied.
This field IS NOT consulted in any way if "Allowed" is "true".
func (*AdmissionResponseDie) ResultDie ¶
func (d *AdmissionResponseDie) ResultDie(fn func(d *metav1.StatusDie)) *AdmissionResponseDie
ResultDie mutates Result as a die.
Result contains extra details into why an admission request was denied.
This field IS NOT consulted in any way if "Allowed" is "true".
func (*AdmissionResponseDie) UID ¶
func (d *AdmissionResponseDie) UID(v types.UID) *AdmissionResponseDie
UID is an identifier for the individual request/response.
This must be copied over from the corresponding AdmissionRequest.
func (*AdmissionResponseDie) Warnings ¶
func (d *AdmissionResponseDie) Warnings(v ...string) *AdmissionResponseDie
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.
type AdmissionReviewDie ¶
type AdmissionReviewDie struct {
// contains filtered or unexported fields
}
func (*AdmissionReviewDie) DeepCopy ¶
func (d *AdmissionReviewDie) DeepCopy() *AdmissionReviewDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionReviewDie) DieDiff ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieDiff(opts ...cmp.Option) string
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*AdmissionReviewDie) DieFeed ¶
func (d *AdmissionReviewDie) DieFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
DieFeed returns a new die with the provided resource.
func (*AdmissionReviewDie) DieFeedJSON ¶
func (d *AdmissionReviewDie) DieFeedJSON(j []byte) *AdmissionReviewDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionReviewDie) DieFeedPtr ¶
func (d *AdmissionReviewDie) DieFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionReviewDie) DieFeedRawExtension ¶
func (d *AdmissionReviewDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionReviewDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionReviewDie) DieFeedYAML ¶
func (d *AdmissionReviewDie) DieFeedYAML(y []byte) *AdmissionReviewDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionReviewDie) DieFeedYAMLFile ¶
func (d *AdmissionReviewDie) DieFeedYAMLFile(name string) *AdmissionReviewDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionReviewDie) DieImmutable ¶
func (d *AdmissionReviewDie) DieImmutable(immutable bool) *AdmissionReviewDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionReviewDie) DiePatch ¶ added in v0.13.0
func (d *AdmissionReviewDie) DiePatch(patchType types.PatchType) ([]byte, error)
DiePatch generates a patch between the current value of the die and the sealed value.
func (*AdmissionReviewDie) DieRelease ¶
func (d *AdmissionReviewDie) DieRelease() admissionv1.AdmissionReview
DieRelease returns the resource managed by the die.
func (*AdmissionReviewDie) DieReleaseJSON ¶
func (d *AdmissionReviewDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionReviewDie) DieReleasePtr ¶
func (d *AdmissionReviewDie) DieReleasePtr() *admissionv1.AdmissionReview
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionReviewDie) DieReleaseRawExtension ¶
func (d *AdmissionReviewDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionReviewDie) DieReleaseYAML ¶
func (d *AdmissionReviewDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionReviewDie) DieSeal ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieSeal() *AdmissionReviewDie
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*AdmissionReviewDie) DieSealFeed ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieSealFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*AdmissionReviewDie) DieSealFeedPtr ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieSealFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*AdmissionReviewDie) DieSealRelease ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieSealRelease() admissionv1.AdmissionReview
DieSealRelease returns the sealed resource managed by the die.
func (*AdmissionReviewDie) DieSealReleasePtr ¶ added in v0.13.0
func (d *AdmissionReviewDie) DieSealReleasePtr() *admissionv1.AdmissionReview
DieSealReleasePtr returns the sealed resource pointer managed by the die.
func (*AdmissionReviewDie) DieStamp ¶
func (d *AdmissionReviewDie) DieStamp(fn func(r *admissionv1.AdmissionReview)) *AdmissionReviewDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionReviewDie) DieStampAt ¶
func (d *AdmissionReviewDie) DieStampAt(jp string, fn interface{}) *AdmissionReviewDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionReviewDie) DieWith ¶
func (d *AdmissionReviewDie) DieWith(fns ...func(d *AdmissionReviewDie)) *AdmissionReviewDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionReviewDie) Request ¶
func (d *AdmissionReviewDie) Request(v *admissionv1.AdmissionRequest) *AdmissionReviewDie
Request describes the attributes for the admission request.
func (*AdmissionReviewDie) RequestDie ¶
func (d *AdmissionReviewDie) RequestDie(fn func(d *AdmissionRequestDie)) *AdmissionReviewDie
RequestDie mutates Request as a die.
Request describes the attributes for the admission request.
func (*AdmissionReviewDie) Response ¶
func (d *AdmissionReviewDie) Response(v *admissionv1.AdmissionResponse) *AdmissionReviewDie
Response describes the attributes for the admission response.
func (*AdmissionReviewDie) ResponseDie ¶
func (d *AdmissionReviewDie) ResponseDie(fn func(d *AdmissionResponseDie)) *AdmissionReviewDie
ResponseDie mutates Response as a die.
Response describes the attributes for the admission response.
func (*AdmissionReviewDie) TypeMeta ¶
func (d *AdmissionReviewDie) TypeMeta(v apismetav1.TypeMeta) *AdmissionReviewDie