1
0
mirror of https://github.com/rancher/steve.git synced 2025-07-05 19:16:38 +00:00
Commit Graph

98 Commits

Author SHA1 Message Date
Sakala Venkata Krishna Rohit
da9bc2a114
Update urfave/cli to v2 (#523) 2025-04-08 12:46:32 -07:00
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
vardhaman22
dae842ea98 updated wrangler from v2 to v3
also updated k8s dependencies to v0.30.1
2024-06-05 22:53:08 +05:30
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
Kevin Joiner
e35a044d5a Bumps rancher/wrangler to it's tagged v2 version.
The previous wrangler commit included all of the v2 changes.
Except for the import paths changes.
2024-01-24 10:24:01 -05: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
Colleen Murphy
70ea282861 cleanup: Fix API root header
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
2022-10-27 14:27:13 -07:00
Colleen Murphy
95da447d90 cleanup: remove duplicate apiserver import
Remove duplicate import and make aliasing of other apiserver imports
consistent throughout steve.
2022-10-27 14:27:13 -07:00
Michael Bolot
b73cc57b20 Adding validate phase to the CI
Adds a validate phase to the CI which runs a linter. Also fixes
linter issues discovered during the initial run
2022-10-14 15:21:17 -05: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
28260701a5 Update wrangler to use v1 apiextention 2021-04-21 09:49:03 -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
Darren Shepherd
2cf9f857b0
Merge pull request #14 from guangbochen/harvester-v0.2
Add default api server and fix invalid open-api arbitrary type
2021-02-19 09:21:18 -08:00
Darren Shepherd
e8086b4525 Add UI back to steve 2021-02-18 10:36:27 -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
f4ef308923 Drop rancher auth 2020-07-14 13:27:58 -07:00
Darren Shepherd
33b6924291 Update imports for wranger-api 2020-07-14 13:27:47 -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
2543926f99 Fix missing links on configmaps and secret 2020-06-10 21:18:22 -07:00
Darren Shepherd
8b9bea44c6 Don't cancel context of subscribe on method exit 2020-06-10 15:46:19 -07:00
Darren Shepherd
2eb87bffc1 Add fields to cluster 2020-06-05 20:45:26 -07:00
Darren Shepherd
0849182bdd Ensure that userpreferences always works. 2020-06-05 17:19:07 -07:00
Darren Shepherd
b60484bf2e Add support for listing helm releases 2020-06-05 13:30:33 -07:00
Darren Shepherd
445acdc240 Increase security around cluster shell 2020-06-02 08:51:42 -07:00
Darren Shepherd
3eba71d06b Add kubectl shell support 2020-06-01 15:59:38 -07:00
Darren Shepherd
d3ce9c1739 Add virtual clusters resource 2020-05-30 21:45:11 -07:00
Darren Shepherd
1336014def Add authentication by default 2020-05-30 19:02:49 -07:00
Darren Shepherd
a8e9297258 Fix possible context leaks 2020-05-22 15:34:59 -07:00
Darren Shepherd
9e4ed62a47 Don't return tables for puts 2020-05-18 09:38:24 -07:00
Darren Shepherd
4d0c8c332c Allow factory options to be passed in 2020-05-16 22:25:31 -07:00
Darren Shepherd
ccc92e7b19 Check for nil interface value 2020-03-30 17:17:32 -07:00
Darren Shepherd
420f62f642 Update to k8s 1.18 2020-03-26 13:58:51 -07:00
Darren Shepherd
7b434b1338 Fix panic in counts 2020-03-25 18:15:21 -07:00
Darren Shepherd
8f5ca57628 Set namespace to request namespace on create if namespace is empty 2020-03-24 15:10:17 -07:00