Documentation ¶
Index ¶
- Variables
- func AsListOfUnstructured(lockedResources []LockedResource) []unstructured.Unstructured
- func FilterOutPaths(obj *unstructured.Unstructured, jsonPaths []string) (*unstructured.Unstructured, error)
- func GetResources(lockedResources []LockedResource) []client.Object
- type LockedResource
- func GetLockedResources(resources []apis.LockedResource) ([]LockedResource, error)
- func GetLockedResourcesFromTemplates(resources []apis.LockedResourceTemplate, params interface{}) ([]LockedResource, error)
- func GetLockedResourcesFromTemplatesWithRestConfig(resources []apis.LockedResourceTemplate, config *rest.Config, ...) ([]LockedResource, error)
- type Patch
Constants ¶
This section is empty.
Variables ¶
var DefaultExcludedPaths = []string{".metadata", ".status", ".spec.replicas"}
DefaultExcludedPaths represents paths that are exlcuded by default in all resources
var DefaultExcludedPathsSet = strset.New(DefaultExcludedPaths...)
DefaultExcludedPathsSet represents paths that are exlcuded by default in all resources
Functions ¶
func AsListOfUnstructured ¶
func AsListOfUnstructured(lockedResources []LockedResource) []unstructured.Unstructured
AsListOfUnstructured given a list of LockedResource, returns a list of unstructured.Unstructured
func FilterOutPaths ¶
func FilterOutPaths(obj *unstructured.Unstructured, jsonPaths []string) (*unstructured.Unstructured, error)
func GetResources ¶
func GetResources(lockedResources []LockedResource) []client.Object
GetResources returs an arrays of apis.Resources from an arya of LockedResources, useful for mass operations on the LockedResources
Types ¶
type LockedResource ¶
type LockedResource struct { // unstructured.Unstructured is the resource to be locked unstructured.Unstructured `json:"usntructured,omitempty"` // ExcludedPaths are the jsonPaths to be excluded when consider whether the resource has changed ExcludedPaths []string `json:"excludedPaths,omitempty"` }
LockedResource represents a resource to be locked down by a LockedResourceReconciler within a LockedResourceManager
func GetLockedResources ¶
func GetLockedResources(resources []apis.LockedResource) ([]LockedResource, error)
GetLockedResources turns an array of Resources as read from an API into an array of LockedResources, usable by the LockedResourceManager
func GetLockedResourcesFromTemplates ¶
func GetLockedResourcesFromTemplates(resources []apis.LockedResourceTemplate, params interface{}) ([]LockedResource, error)
GetLockedResourcesFromTemplates Keep backwards compatability with existing consumers
func GetLockedResourcesFromTemplatesWithRestConfig ¶
func GetLockedResourcesFromTemplatesWithRestConfig(resources []apis.LockedResourceTemplate, config *rest.Config, params interface{}) ([]LockedResource, error)
GetLockedResourcesFromTemplatesWithRestConfig turns an array of ResourceTemplates as read from an API into an array of LockedResources using a params to process the templates
func (*LockedResource) GetKey ¶
func (lr *LockedResource) GetKey() string
GetKey returns the marshalled resource