Documentation ¶
Index ¶
Constants ¶
const SyncAnnotationName = "metadata.gatekeeper.sh/requires-sync-data"
syncAnnotationName is the name of the annotation that stores GVKS that are required to be synced.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactGVKEquivalenceSet ¶
type CompactGVKEquivalenceSet struct { Groups []string `json:"groups"` Versions []string `json:"versions"` Kinds []string `json:"kinds"` }
compactGVKEquivalenceSet contains a set of equivalent GVKs, expressed in the compact form [groups, versions, kinds] where any combination of items from these three fields can be considered a valid equivalent. Used for unmarshalling as this is the form used in requiressync annotations.
type CompactSyncRequirements ¶
type CompactSyncRequirements [][]CompactGVKEquivalenceSet
CompactSyncRequirements contains a list of ANDed requirements, each of which contains a list of equivalent (ORed) GVKs in compact form.
type GVKEquivalenceSet ¶
type GVKEquivalenceSet map[schema.GroupVersionKind]struct{}
GVKEquivalenceSet is a set of GVKs that a template can use interchangeably in its referential policy implementation.
func ExpandCompactEquivalenceSet ¶
func ExpandCompactEquivalenceSet(compactEquivalenceSet CompactGVKEquivalenceSet) GVKEquivalenceSet
Takes a compactGVKSet and expands it into a GVKEquivalenceSet.
type SyncRequirements ¶
type SyncRequirements []GVKEquivalenceSet
SyncRequirements contains a list of ANDed requirements, each of which contains an expanded set of equivalent (ORed) GVKs.
func ExpandCompactRequirements ¶
func ExpandCompactRequirements(compactSyncRequirements CompactSyncRequirements) (SyncRequirements, error)
Takes a CompactSyncRequirements (the json form provided in the template annotation) and expands it into a SyncRequirements.
func ReadSyncRequirements ¶
func ReadSyncRequirements(t *templates.ConstraintTemplate) (SyncRequirements, error)
ReadSyncRequirements parses the sync requirements from a constraint template.