Documentation ¶
Index ¶
- func AddObjectsToInventory(inv *cuev1alpha1.ResourceInventory, set *ssa.ChangeSet) error
- func DiffInventory(inv *cuev1alpha1.ResourceInventory, target *cuev1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
- func ListMetaInInventory(inv *cuev1alpha1.ResourceInventory) (object.ObjMetadataSet, error)
- func ListObjectsInInventory(inv *cuev1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
- func NewInventory() *cuev1alpha1.ResourceInventory
- type CueInstanceImpersonation
- type CueInstanceReconciler
- type CueInstanceReconcilerOptions
- type SourceRevisionChangePredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddObjectsToInventory ¶
func AddObjectsToInventory(inv *cuev1alpha1.ResourceInventory, set *ssa.ChangeSet) error
AddObjectsToInventory extracts the metadata from the given objects and adds it to the inventory.
func DiffInventory ¶
func DiffInventory(inv *cuev1alpha1.ResourceInventory, target *cuev1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
DiffInventory returns the slice of objects that do not exist in the target inventory.
func ListMetaInInventory ¶
func ListMetaInInventory(inv *cuev1alpha1.ResourceInventory) (object.ObjMetadataSet, error)
ListMetaInInventory returns the inventory entries as object.ObjMetadata objects.
func ListObjectsInInventory ¶
func ListObjectsInInventory(inv *cuev1alpha1.ResourceInventory) ([]*unstructured.Unstructured, error)
ListObjectsInInventory returns the inventory entries as unstructured.Unstructured objects.
func NewInventory ¶
func NewInventory() *cuev1alpha1.ResourceInventory
Types ¶
type CueInstanceImpersonation ¶
func NewCueInstanceImpersonation ¶
func NewCueInstanceImpersonation( cueInstance cuev1alpha1.CueInstance, kubeClient client.Client, statusPoller *polling.StatusPoller, defaultServiceAccount string) *CueInstanceImpersonation
func (*CueInstanceImpersonation) CanFinalize ¶
func (ci *CueInstanceImpersonation) CanFinalize(ctx context.Context) bool
CanFinalize asserts if the given CueInstance can be finalized using impersonation.
func (*CueInstanceImpersonation) GetClient ¶
func (ci *CueInstanceImpersonation) GetClient(ctx context.Context) (client.Client, *polling.StatusPoller, error)
GetClient creates a controller-runtime client for talcing 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 (*CueInstanceImpersonation) GetServiceAccountToken ¶
func (ci *CueInstanceImpersonation) GetServiceAccountToken(ctx context.Context) (string, error)
type CueInstanceReconciler ¶
type CueInstanceReconciler struct { client.Client Scheme *runtime.Scheme EventRecorder kuberecorder.EventRecorder ExternalEventRecorder *events.Recorder MetricsRecorder *metrics.Recorder StatusPoller *polling.StatusPoller ControllerName string NoCrossNamespaceRefs bool DefaultServiceAccount string // contains filtered or unexported fields }
CueInstanceReconciler reconciles a CueInstance object
func (*CueInstanceReconciler) Reconcile ¶
func (r *CueInstanceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is the main reconciler loop.
func (*CueInstanceReconciler) SetupWithManager ¶
func (r *CueInstanceReconciler) SetupWithManager(mgr ctrl.Manager, opts CueInstanceReconcilerOptions) error
SetupWithManager sets up the controller with the Manager. SetupWithManager sets up the controller with the Manager.
type CueInstanceReconcilerOptions ¶
type CueInstanceReconcilerOptions struct { MaxConcurrentReconciles int HTTPRetry int DependencyRequeueInterval time.Duration }
CueInstanceReconcilerOptions options
type SourceRevisionChangePredicate ¶
func (SourceRevisionChangePredicate) Update ¶
func (SourceRevisionChangePredicate) Update(e event.UpdateEvent) bool