Documentation ¶
Index ¶
- func AddObjectsToInventory(inv *deliveryv1alpha1.ResourceInventory, set *ssa.ChangeSet) error
- func DiffInventory(inv *deliveryv1alpha1.ResourceInventory, ...) ([]*unstructured.Unstructured, error)
- func ListMetaInInventory(inv *deliveryv1alpha1.ResourceInventory) (object.ObjMetadataSet, error)
- func ListObjectsInInventory(inv *deliveryv1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
- func MkdirTempAbs(dir, pattern string) (string, error)
- func NewInventory() *deliveryv1alpha1.ResourceInventory
- type SourceRevisionChangePredicate
- type UnpackerImpersonation
- type UnpackerReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddObjectsToInventory ¶
func AddObjectsToInventory(inv *deliveryv1alpha1.ResourceInventory, set *ssa.ChangeSet) error
AddObjectsToInventory extracts the metadata from the given objects and adds it to the inventory.
func DiffInventory ¶
func DiffInventory(inv *deliveryv1alpha1.ResourceInventory, target *deliveryv1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
DiffInventory returns the slice of objects that do not exist in the target inventory.
func ListMetaInInventory ¶
func ListMetaInInventory(inv *deliveryv1alpha1.ResourceInventory) (object.ObjMetadataSet, error)
ListMetaInInventory returns the inventory entries as object.ObjMetadata objects.
func ListObjectsInInventory ¶
func ListObjectsInInventory(inv *deliveryv1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
ListObjectsInInventory returns the inventory entries as unstructured.Unstructured objects.
func MkdirTempAbs ¶
MkdirTempAbs creates a tmp dir and returns the absolute path to the dir. This is required since certain OSes like MacOS create temporary files in e.g. `/private/var`, to which `/var` is a symlink.
func NewInventory ¶
func NewInventory() *deliveryv1alpha1.ResourceInventory
Types ¶
type SourceRevisionChangePredicate ¶
func (SourceRevisionChangePredicate) Update ¶
func (SourceRevisionChangePredicate) Update(e event.UpdateEvent) bool
type UnpackerImpersonation ¶
func NewUnpackerImpersonation ¶
func NewUnpackerImpersonation( d deliveryv1alpha1.Unpacker, kubeClient client.Client, statusPoller *polling.StatusPoller, defaultServiceAccount string) *UnpackerImpersonation
func (*UnpackerImpersonation) CanFinalize ¶
func (di *UnpackerImpersonation) CanFinalize(ctx context.Context) bool
CanFinalize asserts if the given Unpacker can be finalized using impersonation.
func (*UnpackerImpersonation) GetClient ¶
func (di *UnpackerImpersonation) GetClient(ctx context.Context) (client.Client, *polling.StatusPoller, error)
GetClient creates a controller-runtime client for talding to a Kubernetes API server. If KubeConfig is set, will use the kubeconfig bytes from the Kubernetes secret. If ServiceAccountName is set, will use the cluster provided kubeconfig impersonating the SA. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.
func (*UnpackerImpersonation) GetServiceAccountToken ¶
func (di *UnpackerImpersonation) GetServiceAccountToken(ctx context.Context) (string, error)
type UnpackerReconciler ¶
type UnpackerReconciler struct { client.Client Scheme *runtime.Scheme StatusPoller *polling.StatusPoller DefaultServiceAccount string OCIRegistryAddr string OCMClient ocmcontroller.FetchVerifier // contains filtered or unexported fields }
UnpackerReconciler reconciles an Unpacker object
func (*UnpackerReconciler) SetupWithManager ¶
func (r *UnpackerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.