parser

package
v3.19.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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 CompactSyncRequirements

type CompactSyncRequirements [][]GVKClause

CompactSyncRequirements contains a list of ANDed requirements, each of which contains a list of GVK clauses.

type GVKClause added in v3.18.1

type GVKClause struct {
	Groups   []string `json:"groups"`
	Versions []string `json:"versions"`
	Kinds    []string `json:"kinds"`
}

GVKClause contains a set of equivalent GVKs, expressed in the form [groups, versions, kinds] where any combination of items from these three fields can be considered a valid option. Used for unmarshalling as this is the form used in requiressync annotations.

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 ExpandGVKClause added in v3.18.1

func ExpandGVKClause(clause GVKClause) GVKEquivalenceSet

Takes a GVK Clause and expands it into a GVKEquivalenceSet (to be unioned with the GVKEquivalenceSet expansions of the other clauses).

func (GVKEquivalenceSet) String added in v3.18.1

func (s GVKEquivalenceSet) String() string

type SyncRequirements

type SyncRequirements []GVKEquivalenceSet

SyncRequirements contains a list of ANDed requirements, each of which contains a GVK equivalence set.

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.

func (SyncRequirements) String added in v3.18.1

func (s SyncRequirements) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL