Tom Lebreux
d50101289f
[v0.3] Migrate the mocking library to uber's ( #475 )
...
* Migrate the mocking library to uber's (#291 )
* Migrate from golang/mock to uber/mock.
* Update go.mod
* Continue migration to uber/mock.
* Tweaks from running the go.uber.mock's mockgen.
* go generate ./...
---------
Co-authored-by: Eric Promislow <epromislow@suse.com>
2025-02-03 15:16:36 -05:00
Michael Bolot
1464a203c3
Adding changes from code review
2024-08-05 14:47:51 -05:00
Eric Promislow
643002b00f
Add unit tests for schemaless CRDs
2024-08-05 14:47:45 -05:00
Eric Promislow
244a1993e0
Handle schema-less CRDs
2024-08-05 14:47:38 -05:00
Michael Bolot
e7a76d14f0
Adding APIGroups back to the schema
...
Prior schema calculations started with openapiv2 models which included a
model for APIGroups. However, new schema calculations use
ServerGroupsAndResources first, which omitted these values. This
re-adds this type using a static schema.
2024-07-02 13:27:04 -05:00
Tom Lebreux
9ac9be9c0e
Fix missing fields in schema definition endpoint ( #215 )
2024-06-17 10:52:19 -04: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
Michael Bolot
c6b887c1cb
Fixing schema definitions bugs
...
Fixes two bugs with the schema definitions:
- Adds resources that are a part of the baseSchema (but aren't k8s resources).
- Adds logic to handle resources which aren't in a prefered version, but
are still in some version.
2024-05-15 08:43:35 -05:00
Michael Bolot
0e9fde750f
Attempting to fix flaky tests
...
Some tests which relied on timeouts were a bit flaky in CI. This PR
refactors a few of them to work on a more reliable method of receiving
from a channel and raises the timeout of another test.
2024-04-03 15:32:23 -05:00
Michael Bolot
b7618463e6
Fixing bug with preferred versions
...
In the original implementation of the definition handler, the resource
list was checked for preferred version, and this overrode the preferred
version of the overall group. However, this logic was inaccurate and
did not use the group as the source of truth on the preferred version
like it should have.
2024-03-12 13:59:17 -05:00
Michael Bolot
0f32ff22e0
Adding tests for improved schema cache
2024-03-12 13:53:51 -05: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
099ebc509f
Adding tests for schemaDefinitions
2024-02-26 15:42:07 -06: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
Michael Bolot
3f65942a6a
Tests for Reducing number of generated schemas
2024-02-26 15:39:41 -06:00
Michael Bolot
605e74c97a
Reducing number of generated schemas
...
Changes steve to only return top level schema definitions rather
than a full defined schema for every field. Also adds basic docs
and fixes a bug with schema generation on versioned crds
2024-02-26 09:20:42 -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
Kevin Joiner
e0480051d9
Merge pull request #61 from KevinJoiner/schema-wather
...
Updates Schemas watch logic.
2022-12-02 10:29:04 -05:00
Kevin Joiner
72ab913c4c
Updates Schemas watch logic.
...
Updated logic used to decide when and what schema events are sent
during a watch.
2022-10-27 22:12:39 -04: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
Michael Bolot
b449b93643
Adding tests
...
Adds tests for:
- Cache clearing functionality
- Very basic schema generation
2022-08-26 09:28:21 -05:00
Michael Bolot
115eb31f57
Adding logic to limit number of cached schemas
...
Adds logic to ensure that only one schema/access set
is cached for each user. This should improve memory
consumption
2022-08-26 09:27:57 -05:00
Darren Shepherd
d9512c366d
Add ability to disallow methods per a schema attribute
2021-08-13 11:37:57 -07:00
Darren Shepherd
52f86dce9b
Remove noisy logging
2021-05-20 12:10:28 -07:00
Darren Shepherd
a1ef4004f8
Implement generic CanDo against k8s roles
2021-05-18 22:34:46 -07:00
Darren Shepherd
9ddd83c343
Fix openapi schema to steve schema generation
2021-04-27 17:08:38 -07:00
Daishan
28260701a5
Update wrangler to use v1 apiextention
2021-04-21 09:49:03 -07:00
Darren Shepherd
362617a677
Add ability to add multiple schematemplates per type
2021-03-02 07:30:00 -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
00da04b7d5
Force autoscaling to use v2beta2 API
2021-01-25 17:19:43 -07:00
Guangbo Chen
8891a7756b
Presume json type for Open API Arbitrary type
2021-01-11 15:11:04 +08:00
Darren Shepherd
12b7626eda
Don't drop schemas that have existing authorization
2020-10-22 17:03:41 -07:00
Darren Shepherd
09d79b238b
Normalize conditions
2020-09-22 13:46:46 -07:00
Darren Shepherd
8db386d225
If no namespace access at all still include list
2020-09-18 17:19:14 -07:00
Darren Shepherd
d496dd31d1
Convert array/map of native types properly
2020-09-10 21:34:27 -07:00
Darren Shepherd
6ebfa39af8
Metadata field should be create/update=true
2020-08-10 12:43:05 -07:00
Darren Shepherd
a3fbe499d1
testing
2020-07-24 01:42:00 -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
a8e9297258
Fix possible context leaks
2020-05-22 15:34:59 -07:00
Darren Shepherd
c7a5c4f069
Only drop API type if replacement type can be found
2020-03-12 14:01:40 -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
3a8e216ec8
Rename variable
2020-02-10 20:54:33 -07:00
Darren Shepherd
433a39dcab
Deal with namespace bindings to cluster scoped resources
2020-02-10 20:53:45 -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
9f771dcf65
RBAC caching
2020-02-08 13:03:57 -07:00