Commit Graph

9 Commits

Author SHA1 Message Date
Mike Spreitzer
008576da07 Improve and simplify maintenance of APF bootstrap objects
Prepare to make deletion of unwanted object conditional on ResourceVersion.

Remove unnecessary split between finding unwanted objects and removing
them.

Remove unnecessary layers of indirection to reach constant logic.

Use interfaces to remove need for type assertions.

Threaded context into APF object maintenance

Note and respect immutability of desired bootstrap objects
2023-05-05 09:36:48 -04:00
Abu Kashem
424b23bb15 apiserver: fix defaulting for apf bootstrap configuration 2022-11-08 13:23:09 -08:00
Abu Kashem
66fc0d7037 rename assuredConcurrencyShares for flowcontrol v1beta3 2022-09-26 15:34:10 -04:00
Abu Kashem
0a99e6ebb1 apiserver: update apf logic to use v1beta3 2022-09-21 18:54:20 -04:00
Abu Kashem
df41fe5d84 apf: clarify with comment 2022-01-19 17:38:31 -05:00
Ben Luddy
3f929b1634 Use a lister for bootstrap flowcontrol config objects.
Instead of listing all flowschemas and prioritylevelconfigurations on
each tick, read from local informer caches.
2021-10-20 11:40:00 -04:00
Abu Kashem
28f2b42a41 apf: update apf logic to use v1beta2 2021-09-09 08:28:58 -04:00
Abu Kashem
f9ee64007e apf: always create missing bootstrap configuration object(s) 2021-05-17 12:08:39 -04:00
Abu Kashem
759a64136b add auto update for apf bootstrap configuration
Take the following approach:
On a fresh install, all bootstrap configuration objects will
have auto update enabled via the following annotation :
`apf.kubernetes.io/autoupdate: 'true'`

The kube-apiserver periodically checks the bootstrap configuration
objects on the cluster and applies update if necessary.

We enforce an 'always auto-update' policy for the mandatory
configuration object(s).

We update the suggested configuration objects when:
- auto update is enabled (`apf.kubernetes.io/autoupdate: 'true'`) or
- auto update annotation key is missing but `generation` is `1`

If the configuration object is missing the annotation key, we add
it appropriately:
it is set to `true` if `generation` is `1`, `false` otherwise.

The above approach ensures that we don't squash changes made by an
operator. Please note, we can't protect the changes made by the
operator in the following scenario:
- the user changes the spec and then deletes and recreates
  the same object. (generation resets to 1)

remove using a marker
2021-05-07 14:23:17 -04:00