mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
add annotations to admission webhook
This commit is contained in:
parent
b44a768052
commit
b4a71bbd8a
@ -92,6 +92,12 @@ type AdmissionResponse struct {
|
|||||||
// PatchType indicates the form the Patch will take. Currently we only support "JSONPatch".
|
// PatchType indicates the form the Patch will take. Currently we only support "JSONPatch".
|
||||||
// +optional
|
// +optional
|
||||||
PatchType *PatchType
|
PatchType *PatchType
|
||||||
|
// 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
|
||||||
}
|
}
|
||||||
|
|
||||||
// PatchType is the type of patch being used to represent the mutated object
|
// PatchType is the type of patch being used to represent the mutated object
|
||||||
|
@ -94,6 +94,13 @@ type AdmissionResponse struct {
|
|||||||
// The type of Patch. Currently we only allow "JSONPatch".
|
// The type of Patch. Currently we only allow "JSONPatch".
|
||||||
// +optional
|
// +optional
|
||||||
PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"`
|
PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"`
|
||||||
|
|
||||||
|
// 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 `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PatchType is the type of patch being used to represent the mutated object
|
// PatchType is the type of patch being used to represent the mutated object
|
||||||
|
Loading…
Reference in New Issue
Block a user