Documentation ¶
Index ¶
Constants ¶
const ( // Annotation that contains the inventory content. ContentAnnotation = "kustomize.config.k8s.io/Inventory" // Annotation for inventory content hash. HashAnnotation = "kustomize.config.k8s.io/InventoryHash" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct { Current Refs `json:"current,omitempty"` Previous Refs `json:"previous,omitempty"` }
An Inventory allows the Prune method to work.
func (*Inventory) LoadFromAnnotation ¶
LoadFromAnnotation loads the Inventory date from the annotation map
func (*Inventory) Prune ¶
Prune computes the diff of Current refs and Previous refs and returns a list of Items that can be pruned. An item that can be pruned shows up only in Previous refs. Prune also updates the Previous refs with those items removed
func (*Inventory) UpdateAnnotations ¶
UpdateAnnotations update the annotation map
func (*Inventory) UpdateCurrent ¶
UpdateCurrent updates the Inventory given a new current Refs The existing Current refs is merged into the Previous refs
type Refs ¶
References are important in inventory management because one may not delete an object before all objects referencing it have been removed.
func (Refs) RemoveIfContains ¶
removeIfContains removes the reference relationship
a --> b
from the Refs if it exists