Documentation
¶
Index ¶
Constants ¶
const AttributeNameAnnotationValue = api.AttributeNameAnnotationValue
const AttributeNameLabelValue = api.AttributeNameLabelValue
const AttributeNameMetadataName = api.AttributeName("metadata-name")
const AttributeNameNamespaceNameReference = api.AttributeName("namespace-name-reference")
const (
AttributeNameWorkloadLabels = k8skit.AttributeNameWorkloadLabels
)
The attributes carrying pod labels are declared in k8skit, beside the specs that say where they live. workload-labels is the group standing for both.
Variables ¶
This section is empty.
Functions ¶
func InitSchemaFinder ¶
func InitSchemaFinder() error
func K8sCELEnvOpts ¶ added in v0.2.8
K8sCELEnvOpts returns the additional CEL environment options that provide Kubernetes-specific CEL libraries matching the admission policy environment. This includes quantity(), url(), ip(), cidr(), regex(), and format() functions.
It is exported so that callers evaluating CEL against Kubernetes configuration outside the function executor -- such as a server-side View column read from stored JSON -- get the same environment the get-cel function provides.
func RegisterFunctions ¶
func RegisterFunctions(rp *k8skit.K8sResourceProviderType, fh handler.FunctionRegistry)
RegisterFunctions registers all Kubernetes functions onto the provided FunctionHandler using the given registrar's resource provider.
Types ¶
type ResourceQuantityComparison ¶
type ResourceQuantityComparison struct {
// contains filtered or unexported fields
}
ResourceQuantityComparison implements CustomStringComparator for Kubernetes resource quantities
func NewResourceQuantityComparison ¶
func NewResourceQuantityComparison() *ResourceQuantityComparison
NewResourceQuantityComparison creates a new ResourceQuantityComparison instance
func (*ResourceQuantityComparison) Evaluate ¶
func (r *ResourceQuantityComparison) Evaluate(expr *api.RelationalExpression, value string) (bool, error)
Evaluate implements CustomStringComparator.Evaluate
func (*ResourceQuantityComparison) MatchesPath ¶
func (r *ResourceQuantityComparison) MatchesPath(path string) bool
MatchesPath implements CustomStringComparator.MatchesPath
type SchemaFinder ¶
type SchemaFinder struct {
// contains filtered or unexported fields
}
func NewSchemaFinder ¶
func NewSchemaFinder() (*SchemaFinder, error)
func (*SchemaFinder) LookupPath ¶
func (e *SchemaFinder) LookupPath(gvkString, fieldPath string) (*SchemaInfo, error)
type SchemaInfo ¶
type SchemaInfo struct {
Description string
}
func LookupPath ¶
func LookupPath(gvkString, fieldPath string) (*SchemaInfo, error)