- Use the client-go ListPager to paginate requests made by the
CachingClusterReader used by the StatusPoller.
- Limit requests to 500 items per response (ListPager default)
- Benefits:
- Reduce the length of blocking etcd operations, allowing for more
responsiveness and higher throughput
- Reduce risk of request timeout
- Reduce size of response for extra large objects
- Rewrite actuation filters to return an error with the reason for
skipping.
- Add explicit error types for most skip errors, to make it easier to catch
and handle them.
- Add Is method to explicit error types to allow use of errors.Is for
recursive unwrapped matching.
- Rename InventoryPolicyFilter to InventoryPolicyPruneFilter for
consistency with InventoryPolicyApplyFilter
- Update deletion prevention inventory-id removal to use errors.As instead
of matching the filter name.
- Convert error structs to use pointers to allow nil errors and avoid
copying contents.
- Update printers to handle skip errors
BREAKING CHANGE: Skipped actuation events now include an error.
BREAKING CHANGE: DeleteEvent.Reason replaced with an error.
BREAKING CHANGE: Unused InventoryNamespaceInSet error removed.
BREAKING CHANGE: InventoryOverlapError replaced with PolicyPreventedActuationError.
BREAKING CHANGE: NeedAdoptionError replaced with PolicyPreventedActuationError.
BREAKING CHANGE: NoInventoryObjError & MultipleInventoryObjError now use pointers.
- Stress test tests 1,000 Namespaces, CofnigMaps, & CronTabs (CR)
- Stress test is a new test suite with its own make entrypoint
- Refactor shared test code so the e2e and stress tests can both use it
- Update test client QPS to 20 (from 5)
- StatusPolicyNone disables inventory status updates.
- StatusPolicyAll fully enables inventory status updates.
- This allows an opt-out feature for working around the problem
that adding status can make the inventory larger than the max
etcd object size, causing the applier to exit without applying
or pruning anything. With StatusPolicyNone, the user can still
safely prune objects to make their inventory smaller, and then
re-enable the status with StatusPolicyAll.
- Note: the default ConfigMap does not currently support status,
so this only affects custom inventory impls.
- Pass TaskContext into TaskBuilder.Build
- Combine dependency graph for apply and prune objects.
This is required to catch dependencies that would have been deleted.
- Replace graph.SortObjs into DependencyGraph + Sort + HydrateSetList
- Replace graph.ReverseSortObjs with ReverseSetList to perform on the
combined (apply + prune) set list.
- Add planned pending applies and prune to the InventoryManager
before executing the task queue.
This allows the DependencyFilter to validate against the planned
actuation strategy of objects that haven't been applied/pruned yet.
- Add the dependency graph to the TaskContext, for the
DependencyFilter to use.
This can be removed in the future if the filters are managed by the
solver.
- Make Graph.Sort non-destructive, so the graph can be re-used by the
DependencyFilter.
- Add Graph.EdgesFrom and EdgesTo for the DependencyFilter to use.
This requires storing the reverse edge list.
- Add an e2e test for the DependencyFilter
- Add an e2e test for the LocalNamespaceFilter
Fixes https://github.com/kubernetes-sigs/cli-utils/issues/526
Fixes https://github.com/kubernetes-sigs/cli-utils/issues/528
- This redesign of the solver moves complexity about deciding which
tasks to use from the applier/destroyer into the solver. This makes
the solver more of a solver and less of a "do what your told"-er.
- One major difference is that the InvAddTask is now skipped if there
are no objects to be applied. This makes logic sense because the
inventory doesn't need to be expanded.
- This change unblocks unification of graph dependency resolution
using both the apploy objects and prune objects, which will help
distinguish between external dependencies and dependencies being
accidentally deleted.
In status.Compute() -> checkGenericProperties() -> checkGeneration(),
we check that metadata.generation is equal to status.observedGeneration
but don't return an InProgress status if either of them is unset.
This may be reasonable for generic resource where we are unsure if these
fields would be set, but for daemonsets, we *know* that these fields get
set by the controller and so we should ensure that.
This addresses https://github.com/kubernetes-sigs/cli-utils/issues/548
If the inventory object supports status field, it is updated
after setting the inventory list at then of one apply process.
BREAKING CHANGE: Update the inventory client and inventory interfaces
to pass the apply/reconcile status.
- Fix FakeDynamicClient to return an object from deletes
- Fix FakeDynamicClient to return DeepCopy to avoid mutation
- Fix InventoryClient to return a DeepCopy of the input when
dry-run is enabled.