1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-15 23:08:26 +00:00
Commit Graph

189 Commits

Author SHA1 Message Date
renovate-rancher[bot]
8608905a6a chore(deps): update module github.com/rancher/apiserver to v0.7.2 (#781)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-08-14 17:44:30 -04:00
Chad Roberts
89c4d78ebc Bump apiserver to v0.7.1 (#780) 2025-08-14 15:39:59 -04:00
renovate-rancher[bot]
5e38823e77 chore(deps): update module github.com/rancher/wrangler/v3 to v3.2.3-rc.3 (#771)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-08-11 10:15:44 -04:00
Chad Roberts
ac12e33508 Update to use klog v2. Also turned down the default debug-level to 2 from 7 to avoid the lower level http logs that show up with klog v2 (#764) 2025-08-07 10:40:36 -07:00
Sakala Venkata Krishna Rohit
6946ffe8aa Add an attribute observedgeneration (#714)
* Add an attribute observedgeneration

* add unit tests
2025-08-07 10:30:06 -07:00
Chad Roberts
e92b9cf7ea Revert "Update to use klog v2 (#744)" (#757)
This reverts commit dd64c2d200.
2025-07-30 13:19:25 -04:00
renovate-rancher[bot]
4bf9fcc6ca chore(deps): update module modernc.org/sqlite to v1.38.2 (#753)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-30 11:38:53 -04:00
Chad Roberts
dd64c2d200 Update to use klog v2 (#744) 2025-07-29 15:42:25 -04:00
renovate-rancher[bot]
a344ad448f chore(deps): update module modernc.org/sqlite to v1.38.1 (#747)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-28 13:12:24 -04:00
Tom Lebreux
a368cc241a Update branching version (#734)
* Update branching for new version

* Bump apiserver and norman to v0.7.0
2025-07-21 10:21:53 -04:00
renovate-rancher[bot]
883d2f805a chore(deps): update module github.com/rancher/wrangler/v3 to v3.2.2 (#710)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-09 14:50:04 -04:00
renovate-rancher[bot]
7aea36c8bd chore(deps): update module modernc.org/sqlite to v1.38.0 (#551)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 16:37:31 -07:00
renovate-rancher[bot]
d7ebf18596 chore(deps): update module golang.org/x/sync to v0.15.0 (#534)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 15:39:30 -07:00
renovate-rancher[bot]
e143845323 chore(deps): update module github.com/urfave/cli/v2 to v2.27.7 (#533)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 15:38:03 -07:00
renovate-rancher[bot]
8e9406302d chore(deps): update dependency go to v1.24.4 (#517)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 15:22:11 -07:00
renovate-rancher[bot]
3086ba4bd0 chore(deps): update module github.com/rancher/remotedialer to v0.4.5-rc.3 (#674)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-06-26 06:57:32 -04:00
renovate-rancher[bot]
94228c486d chore(deps): update module github.com/rancher/dynamiclistener to v0.7.0 (#690)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-06-25 07:25:58 -04:00
renovate-rancher[bot]
17511791e1 chore(deps): update module github.com/rancher/wrangler/v3 to v3.2.2-rc.3 (#692)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-06-24 09:08:15 -04:00
Swastik Gour
e17ca28461 Bumped dependencies to be compatible with k8s-v1.33 (#681)
Signed-off-by: swastik959 <Sswastik959@gmail.com>
2025-06-20 17:53:42 +05:30
Eric Promislow
2cd7997e6b Fix non-vai sorting involving string arrays, add tests. (#618)
- Bump wrangler to get fix for 'GetValueFromAny'.
  This adds string arrays to the types it supports.

- Use a newer go library sort function to maintain a stable sort

- Use the map-sort-map pattern to avoid repeatedly calculating the
  same underlying value for `object[arg1][arg2][...]`
2025-06-13 10:18:48 -07:00
Tom Lebreux
39fed09b2e Bump apiserver to v0.6.2 (#665) 2025-06-10 08:18:23 -04:00
Tom Lebreux
97f07399d6 Bump apiserver to v0.6.1 (#650) 2025-05-30 15:16:29 -04:00
Chad Roberts
27ed443fff [main] Use Wrangler defined field for resourcePermissions, bump wrangler (#637)
* Remove custom addition of resourcePermissions in favor of wrangler defined type, bump wrangler
2025-05-13 13:30:27 -04:00
Alejandro Ruiz
ea01a40c8d Refactor HelmData formatter to avoid importing helm dependencies (#607)
* Small refactor in tests

* Small refactor around decoding

* Refactor decodeHelm3 so we can drop the helm dependency

* Vendor helmv2 protobuf types so we can drop the helmv2 old dependency

* go mod tidy

* Add test with sample HelmV2 data
2025-05-09 09:41:26 -07:00
Eric Promislow
e3b881f13a Add context to the remotedialer ping logger - steve side. (#577)
* Add context to the remotedialer ping logger - steve side.

* Use a custom type as a context key instead of a basic string

* Bump remotedialer so it can use the configured context.
2025-04-29 11:24:31 -07:00
renovate-rancher[bot]
392a95f753 chore(deps): update module github.com/rancher/dynamiclistener to v0.6.2 (#495)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-04-23 16:35:55 -07:00
renovate-rancher[bot]
83cf2ac76f chore(deps): update module helm.sh/helm/v3 to v3.17.2 (#337)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-04-22 13:20:22 -07:00
Sakala Venkata Krishna Rohit
da9bc2a114 Update urfave/cli to v2 (#523) 2025-04-08 12:46:32 -07:00
Tom Lebreux
e1061a86cd Update branch (#549)
* Update branch

* Update norman and apiserver to v0.6.0
2025-03-18 11:36:01 -04:00
renovate-rancher[bot]
a85993129e chore(deps): update module modernc.org/sqlite to v1.36.0 (#528)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-27 17:10:58 -05:00
renovate-rancher[bot]
078ddfe47d chore(deps): update module github.com/rancher/saml to v0.4.14 (#496)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-23 10:59:59 -08:00
renovate-rancher[bot]
d7746fd993 chore(deps): update module modernc.org/sqlite to v1.35.0 (#454)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-14 09:05:49 -08:00
Chad Roberts
ccbadbd75f Update to k8s 1.32 libraries (#491)
* Rebase

* Update dynamiclistener to v0.6.2-rc.3
2025-02-12 13:26:58 -05:00
renovate-rancher[bot]
f664022933 chore(deps): update module github.com/rancher/dynamiclistener to v0.6.1 (#334)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:20:45 -08:00
renovate-rancher[bot]
d314442a42 chore(deps): update module github.com/urfave/cli/v2 to v2.27.5 (#336)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:20:20 -08:00
renovate-rancher[bot]
b72a24c0bc chore(deps): update module github.com/google/gnostic-models to v0.6.9 (#372)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:17:27 -08:00
renovate-rancher[bot]
e71f8c455d chore(deps): update module github.com/rancher/wrangler/v3 to v3.1.0 (#344)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 13:04:45 -08:00
renovate-rancher[bot]
b4551c5472 chore(deps): update module go.uber.org/mock to v0.5.0 (#345)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 13:03:15 -08:00
renovate-rancher[bot]
747284103a chore(deps): update module github.com/urfave/cli to v1.22.16 (#335)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:53:19 -08:00
renovate-rancher[bot]
b826f74af2 chore(deps): update module github.com/adrg/xdg to v0.5.3 (#332)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:43 -08:00
renovate-rancher[bot]
8c96897309 chore(deps): update dependency go to v1.23.6 (#331)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:20 -08:00
renovate-rancher[bot]
4768bba63b chore(deps): update module github.com/gorilla/websocket to v1.5.3 (#333)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:00 -08:00
Eric Promislow
d794bfe4e8 Index arbitrary labels (#317)
* Add more fields to index when sql-caching is on.

* Restore the gvkKey helper, add event fields.

The UI team wasn't sure whether the event fields should go in the empty-string group or in 'events.k8s.io',
so let's go with both until/unless specified otherwise.

* More fixes to the fields to index:

- Remove the erroneously added management.cattle.io.nodes fields
- Use the builtin Event class, not events.k8s.io (by looking at the dashboard client code)

* Start on the virtual-field work.

* Map `Event.type` to `Event._type` for indexing.

* Add a unit test for field replacement for Event.type

* Add label processing.

* Don't test for transformation of event objects in the common module.

* Parse metadata.label queries differently.

* Improve a variable name that turned out to not be temporary.

* No need to specifically cache certain labels, as all are now cached.

* Add a test to verify simple label (m.labels.foo=blah) queries work.

* 'addLabelFields' never returns an error.

* Delete superseded function.

* Was calling 'addLabelFields' one time too many.

* Start using k8s ParseToRequirements

* Pull in the k8s parser.

* Successfully test for quotation marks.

* Add quoted strings to the lexer.

* Move to a forked k8s label lexer to include non-label tests.

* Improve and test the way quoted strings in the query are detected.

* Reinstate the original Apache license in the derived code.

Following clause 4.3 of the Apache license:
"You must cause any modified files to carry prominent notices stating that You changed the files..."

* Ignore case for operators.

* Test IN multiple-target-values

* Test the not-in operator.

* Ignore case for operators.

SQL is case-insensitive on field names and values, so this just adds consistency.

* Added tests for parsing EXISTS and NOT-EXISTS queries.

* Parse less-than and greater-than ops

* Lasso's `CacheFor` now takes a `watchable` argument.

* Support 'gt' and 'lt' as synonyms for '<' and '>'.

I see both types of operators being bandied about -- it's easy to support the aliases.

* typo fix

* Have the filter parser allow exist tests only on labels.

Also reduce the case where there's no namespace function.

* Specify hard-wired fields to index alphabetically.

* Remove unused variable.

* Parser: 'metadata.labels[FIELD]' is valid

* Pull in new gvk fields from main (and keep in alpha order).

* Fixed a couple of drops done during the last rebase.

* Add a reminder to keep the entries in alpha order.

* Test TransformLabels

* Remove TransformLabels

* Remove unused/unneeded code.

* Describe diffs between our label-selector parser and upstream's.

* Use the merged lasso 46333 work.

* Drop unused field.

* Tighten up the code.

* Specify which commit the label selector parser is based on.

* Allow both single-quoted and double-quoted value matching, doc difference.

* More review-driven changes:

- Stricter processing of m.l.name keys:
  Require ending close-bracket for a start-bracket

- Comment fix

- Moving sql processing from lasso to steve: some changes missed in rebase

* Drop support for double-quotes for string values.

For now on only single-quotes (or none where possible) are allowed.

* Renaming and dropping an init block.

* Quoted strings are dropped from the filter queries

In particular, label values have a specific syntax: they must
start and end with a letter, and their innards may contain
only alnums '.', '-' and '_'.  So there's no need for quoting.

And that means now that `=` and `==` do exact matches,
and the `~` operator does a partial match.

`!=` and `!~` negate -- note that `!~` is a stricter operation than `!=`,
in that given a set of possible string values, `!=` will accept more
of them than `!~`. Maybe I shouldn't have gone here, but these operators
reminded me of learning about `nicht durfen` and `nicht sollen` in German,
or something like that.

* Move a constant definition to the module level.

* Remove commented-out code.

* Remove unused func and adjacent redundant comment.
2025-01-30 11:57:23 -08:00
Vatsal Parekh
7da1377c89 [main] Upgrade go version to 1.23 (#446)
* Upgrade go version to 1.23

Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>

* Upgrade golangci-lint to 1.63.4

Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>

---------

Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>
2025-01-29 09:05:04 -05:00
Eric Promislow
c1805696ce SQLite backed cache: Support sorting mgmt clusters on value in a specific condition (#447)
* Replace primary/secondary sort fields with an array of sort directives.

* Allow more than 2 sort-params in a search query.

* Add a virtual 'status.ready' field to clusters.

* Rename status.ready -> status.connected

* Set virtual field 'spec.internal' <- spec.displayName == 'local'

* Need to declare all virtual fields to index.

* Ready clusters have condition[type==Ready && status=True]

* Update the README to reflect generalized sorting.

* Bump lasso to get revised sort directives.

* Review-driven changes, mostly comments and drop unneeded code.

* Add unit tests to verify sort-order stringification.

* Ignore empty-string sort components.

* Fix a rebase mishap.

* Drop unneeded commented-out code.

* Clusters have a 'spec.internal' field, no need to synthesize one.

* Added a note on square-brackets for label references.

This should be added to the README for filter queries in the PR for 46333.

* Bump to latest sqlcache-free lasso
2025-01-27 11:55:09 -08: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
Silvio Moioli
58f2264f16 sql: silence informer errors on unwatchable resources (#284)
* bump lasso to include pull #111

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

* Make IsListWatchable public to be reused in other packages

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

* Let lasso know whether a type is watchable upon requesting a cache

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

* Adapt existing tests

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

* Add a test to check watchability is detected correctly

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

---------

Signed-off-by: Silvio Moioli <silvio@moioli.net>
2024-12-19 04:53:10 -05:00
Felipe Gehrke
6ee8201c8d #47483 - Adding NonResourceURLs support to AccessStore (#299)
* adding NonResourceURLs support to access_store

* added tests to AccessSet NonResourceURLs handling

* change on test script suggested by @tomleb + go mod tidy

* added nonresource to ext api authorization

* added NonResourceURLs implementation in Authorizes + test

* removed non-resource-url tests from the main test

* added new tests for non-resource-urls

* removed unused test data

* changed nonResourceKey to point to struct{}

* addressed comments from @tomleb

* addressed more comments

* fixing typo

* check for empty accessSet
2024-11-04 23:47:48 -03:00
Diogo Souza
b2f2bab3c4 Helm data formatter (#305)
* changing secret and configmap formatters to return decoded helm data if includeHelmData query parameter is present

* adding tests for gzip magic header
2024-10-28 15:55:36 -05: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