Documentation ¶
Index ¶
- type PolicyContext
- func (c *PolicyContext) AdmissionInfo() kyvernov1beta1.RequestInfo
- func (c *PolicyContext) AdmissionOperation() bool
- func (c PolicyContext) Copy() engineapi.PolicyContext
- func (c *PolicyContext) Element() unstructured.Unstructured
- func (c *PolicyContext) JSONContext() enginectx.Interface
- func (c *PolicyContext) NamespaceLabels() map[string]string
- func (c *PolicyContext) NewResource() unstructured.Unstructured
- func (c *PolicyContext) OldPolicyContext() (engineapi.PolicyContext, error)
- func (c *PolicyContext) OldResource() unstructured.Unstructured
- func (c *PolicyContext) Operation() kyvernov1.AdmissionOperation
- func (c *PolicyContext) Policy() kyvernov1.PolicyInterface
- func (c *PolicyContext) RequestResource() metav1.GroupVersionResource
- func (c *PolicyContext) ResourceKind() (schema.GroupVersionKind, string)
- func (c *PolicyContext) SetElement(element unstructured.Unstructured)
- func (c *PolicyContext) WithAdmissionInfo(admissionInfo kyvernov1beta1.RequestInfo) *PolicyContext
- func (c *PolicyContext) WithAdmissionOperation(admissionOperation bool) *PolicyContext
- func (c *PolicyContext) WithNamespaceLabels(namespaceLabels map[string]string) *PolicyContext
- func (c *PolicyContext) WithNewResource(resource unstructured.Unstructured) *PolicyContext
- func (c *PolicyContext) WithOldResource(resource unstructured.Unstructured) *PolicyContext
- func (c *PolicyContext) WithPolicy(policy kyvernov1.PolicyInterface) *PolicyContext
- func (c *PolicyContext) WithRequestResource(gvr metav1.GroupVersionResource) *PolicyContext
- func (c *PolicyContext) WithResourceKind(gvk schema.GroupVersionKind, subresource string) *PolicyContext
- func (c *PolicyContext) WithResources(newResource unstructured.Unstructured, oldResource unstructured.Unstructured) *PolicyContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyContext ¶
type PolicyContext struct {
// contains filtered or unexported fields
}
PolicyContext contains the contexts for engine to process
func NewPolicyContext ¶
func NewPolicyContext( jp jmespath.Interface, resource unstructured.Unstructured, operation kyvernov1.AdmissionOperation, admissionInfo *kyvernov1beta1.RequestInfo, configuration config.Configuration, ) (*PolicyContext, error)
func NewPolicyContextFromAdmissionRequest ¶
func NewPolicyContextFromAdmissionRequest( jp jmespath.Interface, request admissionv1.AdmissionRequest, admissionInfo kyvernov1beta1.RequestInfo, gvk schema.GroupVersionKind, configuration config.Configuration, ) (*PolicyContext, error)
func (*PolicyContext) AdmissionInfo ¶
func (c *PolicyContext) AdmissionInfo() kyvernov1beta1.RequestInfo
func (*PolicyContext) AdmissionOperation ¶
func (c *PolicyContext) AdmissionOperation() bool
func (PolicyContext) Copy ¶
func (c PolicyContext) Copy() engineapi.PolicyContext
func (*PolicyContext) Element ¶
func (c *PolicyContext) Element() unstructured.Unstructured
func (*PolicyContext) JSONContext ¶
func (c *PolicyContext) JSONContext() enginectx.Interface
func (*PolicyContext) NamespaceLabels ¶
func (c *PolicyContext) NamespaceLabels() map[string]string
func (*PolicyContext) NewResource ¶
func (c *PolicyContext) NewResource() unstructured.Unstructured
func (*PolicyContext) OldPolicyContext ¶ added in v1.11.2
func (c *PolicyContext) OldPolicyContext() (engineapi.PolicyContext, error)
func (*PolicyContext) OldResource ¶
func (c *PolicyContext) OldResource() unstructured.Unstructured
func (*PolicyContext) Operation ¶
func (c *PolicyContext) Operation() kyvernov1.AdmissionOperation
func (*PolicyContext) Policy ¶
func (c *PolicyContext) Policy() kyvernov1.PolicyInterface
func (*PolicyContext) RequestResource ¶
func (c *PolicyContext) RequestResource() metav1.GroupVersionResource
func (*PolicyContext) ResourceKind ¶
func (c *PolicyContext) ResourceKind() (schema.GroupVersionKind, string)
func (*PolicyContext) SetElement ¶
func (c *PolicyContext) SetElement(element unstructured.Unstructured)
func (*PolicyContext) WithAdmissionInfo ¶
func (c *PolicyContext) WithAdmissionInfo(admissionInfo kyvernov1beta1.RequestInfo) *PolicyContext
func (*PolicyContext) WithAdmissionOperation ¶ added in v1.10.5
func (c *PolicyContext) WithAdmissionOperation(admissionOperation bool) *PolicyContext
func (*PolicyContext) WithNamespaceLabels ¶
func (c *PolicyContext) WithNamespaceLabels(namespaceLabels map[string]string) *PolicyContext
func (*PolicyContext) WithNewResource ¶
func (c *PolicyContext) WithNewResource(resource unstructured.Unstructured) *PolicyContext
func (*PolicyContext) WithOldResource ¶
func (c *PolicyContext) WithOldResource(resource unstructured.Unstructured) *PolicyContext
func (*PolicyContext) WithPolicy ¶
func (c *PolicyContext) WithPolicy(policy kyvernov1.PolicyInterface) *PolicyContext
func (*PolicyContext) WithRequestResource ¶
func (c *PolicyContext) WithRequestResource(gvr metav1.GroupVersionResource) *PolicyContext
func (*PolicyContext) WithResourceKind ¶
func (c *PolicyContext) WithResourceKind(gvk schema.GroupVersionKind, subresource string) *PolicyContext
func (*PolicyContext) WithResources ¶
func (c *PolicyContext) WithResources(newResource unstructured.Unstructured, oldResource unstructured.Unstructured) *PolicyContext
Click to show internal directories.
Click to hide internal directories.