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 []utilsapi.LockedResource) ([]LockedResource, error)
- func GetLockedResourcesFromTemplates(resources []utilsapi.LockedResourceTemplate, params interface{}) ([]LockedResource, error)
- func GetLockedResourcesFromTemplatesWithRestConfig(resources []utilsapi.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 ¶ added in v0.2.5
func FilterOutPaths(obj *unstructured.Unstructured, jsonPaths []string) (*unstructured.Unstructured, error)
func GetResources ¶ added in v0.2.1
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 []utilsapi.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 ¶ added in v0.2.1
func GetLockedResourcesFromTemplates(resources []utilsapi.LockedResourceTemplate, params interface{}) ([]LockedResource, error)
GetLockedResourcesFromTemplates Keep backwards compatability with existing consumers
func GetLockedResourcesFromTemplatesWithRestConfig ¶ added in v0.3.5
func GetLockedResourcesFromTemplatesWithRestConfig(resources []utilsapi.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