* More error wrapping for SQL cache
* Use context.Context instead of stopCh
* Move CacheFor to Info log level
* Implement time-based GC
* Set default GC param when running standalone steve
* block UI until we receive requests from kube-apiserver
* satisfy CI
* undo test code
---------
Co-authored-by: joshmeranda <joshua.meranda@gmail.com>
* Add ListOptionIndexerOptions to create ListOptionIndexer
* Remove unused function
* Implement configurable garbage collection on ListOptionIndexer
* Propagate Steve options from Server
Previous SQLite-related code used context.Background() and context.TODO() because it was not developed with context awareness.
This commit propagates the main Steve context so that it can be used when interacting with SQL context-aware functions.
This PR removes all production-code use of context.Background() and context.TODO() and replaces test-code use of TODO with Background.
Contributes to rancher/rancher#47825
The original PR, steve/pull/158 drifted too far from changes
in main, so it's easier to create a new PR:
* Bring in and update DefaultSchemaTemplatesForStore
* Move from based on `master` to `main`
* Update k8s version
This implements the Imperative API that is served at /ext with Steve. The imperative API is compatible with Kubernetes' API server and will be used as an extension API server.
Adds logic which adds virtual fields resources. This allows these fields
to be sorted/filtered on when the SQL cache is enabled. Id and
metadata.state.name were added as the first two fields.
Updates the schema definitions refresh method to use a new debounce
method. Adds a handler which refreshes the definitions every 2
seconds after adding a CRD and every 10 minutes by default.
Add a new query parameter to filter resources by their namespace or
their namespace's project. This parameter is separate from the existing
`filter` parameter.
Filter by a comma-separated list of projects and/or namespaces with:
?projectsornamespaces=p1,n1,n2
The result can be negated with the ! operator:
?projectsornamespaces!=p1,n1,n2
The header defined in RFC 9110[1] is "Accept", not "Accepts". This
change corrects the route filter. Since this API is not documented and
the header was plainly incorrect, no attempt is made at backwards
compatibility.
[1] https://www.rfc-editor.org/rfc/rfc9110.html#name-accept