Documentation
¶
Index ¶
Constants ¶
const GroupName = "generic.kyverno.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Authorization ¶
type Authorization struct {
// Expression represents the expression which will be evaluated by CEL.
// ref: https://github.com/google/cel-spec
// CEL expressions have access to CEL variables as well as some other useful variables:
//
// - 'object' - The incoming request.
//
// CEL expressions are expected to return an model Response.
// +required
Expression string `json:"expression"`
}
Authorization defines an authorization policy rule
func (*Authorization) DeepCopy ¶
func (in *Authorization) DeepCopy() *Authorization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authorization.
func (*Authorization) DeepCopyInto ¶
func (in *Authorization) DeepCopyInto(out *Authorization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuthorizationPolicy ¶
type AuthorizationPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AuthorizationPolicySpec `json:"spec"`
}
AuthorizationPolicy defines an authorization policy resource
func (*AuthorizationPolicy) DeepCopy ¶
func (in *AuthorizationPolicy) DeepCopy() *AuthorizationPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy.
func (*AuthorizationPolicy) DeepCopyInto ¶
func (in *AuthorizationPolicy) DeepCopyInto(out *AuthorizationPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuthorizationPolicy) DeepCopyObject ¶
func (in *AuthorizationPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuthorizationPolicyList ¶
type AuthorizationPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []AuthorizationPolicy `json:"items"`
}
AuthorizationPolicyList defines a list of authorization policies
func (*AuthorizationPolicyList) DeepCopy ¶
func (in *AuthorizationPolicyList) DeepCopy() *AuthorizationPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicyList.
func (*AuthorizationPolicyList) DeepCopyInto ¶
func (in *AuthorizationPolicyList) DeepCopyInto(out *AuthorizationPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuthorizationPolicyList) DeepCopyObject ¶
func (in *AuthorizationPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuthorizationPolicySpec ¶
type AuthorizationPolicySpec struct {
// FailurePolicy defines how to handle failures for the policy. Failures can
// occur from CEL expression parse errors, type check errors, runtime errors and invalid
// or mis-configured policy definitions.
//
// FailurePolicy does not define how validations that evaluate to false are handled.
//
// Allowed values are Ignore or Fail. Defaults to Fail.
// +optional
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
// Variables contain definitions of variables that can be used in composition of other expressions.
// Each variable is defined as a named CEL expression.
// The variables defined here will be available under `variables` in other expressions of the policy
// except MatchConditions because MatchConditions are evaluated before the rest of the policy.
//
// The expression of a variable can refer to other variables defined earlier in the list but not those after.
// Thus, Variables must be sorted by the order of first appearance and acyclic.
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
// +optional
Variables []admissionregistrationv1.Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// Authorizations contain CEL expressions which is used to apply the authorization.
// +listType=atomic
// +optional
Authorizations []Authorization `json:"authorizations,omitempty"`
}
AuthorizationPolicySpec defines the spec of an authorization policy
func (*AuthorizationPolicySpec) DeepCopy ¶
func (in *AuthorizationPolicySpec) DeepCopy() *AuthorizationPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicySpec.
func (*AuthorizationPolicySpec) DeepCopyInto ¶
func (in *AuthorizationPolicySpec) DeepCopyInto(out *AuthorizationPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuthorizationPolicySpec) GetFailurePolicy ¶
func (s *AuthorizationPolicySpec) GetFailurePolicy() admissionregistrationv1.FailurePolicyType