1
0
mirror of https://github.com/rancher/steve.git synced 2025-07-01 17:22:13 +00:00
Commit Graph

47 Commits

Author SHA1 Message Date
Silvio Moioli
3350323f91
sql: propagate and use contexts (#465)
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
2025-02-12 09:46:10 +01:00
Tom Lebreux
9dd9b0f625
Move lasso SQL cache in Steve (#452)
* Copy pkg/cache/sql from lasso to pkg/sqlcache

* Rename import from github.com/rancher/lasso/pkg/cache/sql to github.com/rancher/steve/pkg/sqlcache

* Fix filter.Match -> filter.Matches

* go mod tidy

* Fix lint errors

* Remove lasso SQL cache mentions

* Fix more CI lint errors

* fix goimports

Signed-off-by: Silvio Moioli <silvio@moioli.net>

* fix tests (Match -> Matches)

Signed-off-by: Silvio Moioli <silvio@moioli.net>

* Fix Sort order

---------

Signed-off-by: Silvio Moioli <silvio@moioli.net>
Co-authored-by: Silvio Moioli <silvio@moioli.net>
2025-01-17 09:34:48 -05:00
Eric Promislow
d3269c91eb
Finish the AccessSet changes to the main formatter. (#308)
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
2025-01-07 12:20:26 -08:00
Tom Lebreux
8fc2dd4f74
Fix ExtensionAPIServer interface (#298)
* Fix comments
* Fix ExtensionAPIServer interface
2024-10-15 10:00:27 -04:00
Tom Lebreux
1f21e5e515
Implement /ext in Steve for Imperative API (#287)
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.
2024-10-11 15:19:27 -04:00
Michael Bolot
1149920168 Adding virtual fields
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.
2024-08-28 12:17:53 -05:00
Silvio Moioli
7a84620e8b
SQLite backed cache (#223)
This uses SQLite-backed informers provided by Lasso with https://github.com/rancher/lasso/pull/65 to implement Steve API (/v1/) functionality.

This new functionality is available behind a feature flag to be specified at Steve startup

See https://confluence.suse.com/pages/viewpage.action?pageId=1359086083 

Co-authored-by: Ricardo Weir <ricardo.weir@suse.com>
Co-authored-by: Michael Bolot <michael.bolot@suse.com>
Co-authored-by: Silvio Moioli <silvio@moioli.net>
Signed-off-by: Silvio Moioli <silvio@moioli.net>
2024-06-05 16:17:12 +02:00
Michael Bolot
2f8e64840b Improving Schema Definitions cache/refresh
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.
2024-03-12 13:49:39 -05:00
Michael Bolot
40f6b10fc7 Adding schema definitions endpoint
Introduces new schema definitions endpoint, allowing the caller to get
the fields/types/descriptions for a given kubernetes resource.
2024-02-26 15:42:03 -06:00
Colleen Murphy
84dedac146 Add projectsornamespaces query parameter
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
2023-05-11 14:17:39 -07:00
Michael Bolot
c8fb653ca3 Bump dynamic listener to v0.3.5
Bumps dynamic listener to v0.3.5. Adds a small arg change to
account for this version bump which addresses an issue caused by
the new version
2022-12-13 16:12:33 -06:00
Darren Shepherd
4a34cec914 Add server version to websocket pings 2021-08-10 16:09:19 -07:00
Darren Shepherd
86ca5628f7 Make aggregation start explicitly or on Listen 2021-05-03 15:38:46 -07:00
Daishan
2309fbbd2e Add ability to support registryOverride 2021-04-06 14:50:46 -07:00
Darren Shepherd
376934558c Add ability to aggregate steve servers through remotedialer 2021-03-18 10:13:16 -07:00
Darren Shepherd
df96a3bd4a Add fake cluster object and move apply action to core steve 2021-03-01 17:13:14 -07:00
Guangbo Chen
0edf9c780f Add default api-server option 2021-01-11 15:10:37 +08:00
Darren Shepherd
3df58506a2 Add ability to get dynamic client 2020-10-30 16:08:28 -07:00
Darren Shepherd
92638937df Add state info to relationships 2020-10-23 14:00:11 -07:00
Darren Shepherd
a3fbe499d1 testing 2020-07-24 01:42:00 -07:00
Darren Shepherd
ece0f7bce5 Rename to RESTConfig 2020-07-19 13:56:34 -07:00
Darren Shepherd
d796ed60a7 Show resource relationships 2020-06-22 08:49:49 -07:00
Darren Shepherd
d1a7dbb0b9 Shuffle around code and use rancher/apiserver 2020-06-11 21:51:19 -07:00
Darren Shepherd
2eb87bffc1 Add fields to cluster 2020-06-05 20:45:26 -07:00
Darren Shepherd
445acdc240 Increase security around cluster shell 2020-06-02 08:51:42 -07:00
Darren Shepherd
4d0c8c332c Allow factory options to be passed in 2020-05-16 22:25:31 -07:00
Darren Shepherd
d457428bff Add states to counts 2020-03-12 19:22:37 -07:00
Darren Shepherd
655b7a85ee Add userpreferences 2020-03-12 13:14:47 -07:00
Darren Shepherd
0ad6c2aba1 Drop non-preferred version and version in the schema id 2020-03-10 23:12:04 -07:00
Darren Shepherd
6b6ff53373 Add namespace filtering 2020-02-27 10:34:51 -07:00
Darren Shepherd
82c7877ba3 Add dashboard to steve 2020-02-21 22:18:58 -07:00
Darren Shepherd
e64845dcb9 Full dynamic RBAC and pagination 2020-02-10 10:18:20 -07:00
Darren Shepherd
600f875fce Show server side columns 2020-02-08 13:04:20 -07:00
Darren Shepherd
87a107e23e Remove unused namespace field 2020-02-04 21:31:02 -07:00
Darren Shepherd
b51e14edfb Allow passing in access control impl to the server 2020-02-04 14:11:21 -07:00
Darren Shepherd
c7ac7f35af Add impersonation support 2020-02-03 14:28:25 -07:00
Darren Shepherd
a66ef65fd9 Fix incorrect handler setup 2020-02-01 15:58:24 -07:00
Darren Shepherd
91dde5ead6 Refactor context to be sharable 2020-01-31 15:10:47 -07:00
Darren Shepherd
8b42d0aff8 Refactor 2020-01-30 22:37:59 -07:00
Darren Shepherd
fab677b2ec Steve! 2019-09-11 14:05:00 -07:00
Darren Shepherd
ef235af49c Fix update/patch and add webhook auth 2019-09-11 10:32:01 -07:00
Darren Shepherd
f81721ef93 Improve counts and columns 2019-09-09 14:28:55 -07:00
Darren Shepherd
59a6ee577e Add apigroups 2019-08-14 13:13:26 -07:00
Darren Shepherd
583309b969 Add column support 2019-08-14 11:08:34 -07:00
Darren Shepherd
ad67c46055 Refactor schema IDs and paths 2019-08-13 16:36:03 -07:00
Darren Shepherd
8fe5d55dac Make listen-address configurable 2019-08-07 22:42:15 -07:00
Darren Shepherd
c0299c1506 Initial commit 2019-08-04 10:41:32 -07:00