Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectReference ¶
func GetObjectReference(u *unstructured.Unstructured) corev1.ObjectReference
Types ¶
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
func New ¶
func New(name string, client resourceclient.Client, cr *unstructured.Unstructured, owns sets.Set[schema.GroupVersionKind], branch string) *Resources
func (*Resources) AddNewResource ¶
func (r *Resources) AddNewResource(ctx context.Context, u *unstructured.Unstructured)
AddNewResource adds a new resource to the inventoru
func (*Resources) Apply ¶
APIApply step 0: get existing resources step 1: remove the exisiting resources from the internal resource list that overlap with the new resources step 2: delete the exisiting resources that are no longer needed step 3: apply the new resources to the api server
func (*Resources) Delete ¶
APIDelete is used to delete the existing resources that are owned by this cr the implementation retrieves the existing resources and deletes them
func (*Resources) GetNewResources ¶
func (r *Resources) GetNewResources() map[corev1.ObjectReference]*unstructured.Unstructured
Click to show internal directories.
Click to hide internal directories.