1
0
mirror of https://github.com/rancher/norman.git synced 2025-05-13 10:44:29 +00:00
Commit Graph

146 Commits

Author SHA1 Message Date
vardhaman22
a528269caf updated wrangler from v2 to v3 2024-06-04 15:32:09 +05:30
Chirayu Kapoor
dd137e4d0b
Update wrangler to wrangler/v2
Signed-off-by: Chirayu Kapoor <chirayu.kapoor@suse.com>
2024-01-19 15:31:34 +05:30
Jiaqi Luo
29dae41a91 remove the checks on some return values, which was added recently by another PR, to make it work when being used in rancher 2022-12-02 20:27:19 -07:00
Jiaqi Luo
c943439888 ignore clusterName when it is not found(the metadata.clusterName field is completely removed in k8s 1.25) 2022-12-02 20:27:02 -07:00
Jiaqi Luo
5d579d3486 bump Go to 1.19 and fix errores golangci-lint reports 2022-12-02 19:55:36 -07:00
Steffan Tucker
1e41884a06
Fix golangci-lint issues
As part of updating dapper files, golangci-lint was set to be used. This
caused a lot of lint issues to crop up, which this fixes.
2022-07-26 10:40:30 -06:00
MATSUMOTO TAKEAKI
e5b9459adb Fix doSchema lock issue 2021-09-22 14:14:50 +09:00
Colleen Murphy
6e4b2bab93 Add norman field attribute "pointer"
Add a new field attribute "pointer" to indicate that the generated
client code for the field must be a pointer. This allows clients to
differentiate between sending nil/leaving the value unset and sending an
empty map or slice.

This change also removes the `nullablestring` norman type introduced in
30f8d18 since schemas that need a pointer to a string can now use this
field attribute. There are no libraries currently using this feature so
it should be safe to remove.

Example usage:

```
Labels map[string]string `json:"labels" norman:"pointer"`
```

Resulting API schema:

```
"labels": {
  "create": true,
  "nullable": true,
  "pointer": true,
  "type": "map[string]",
  "update": true
}
```

Generated client code:

```
Labels *map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
```
2021-06-07 16:33:59 -07:00
Daishan
2ba9d8db33 Use lower name 2021-02-24 17:58:46 -07:00
Daishan
505eca07f2 Fix self link 2021-02-19 10:24:53 -07:00
Daishan
3a2e391048 Add self link mapper 2021-02-18 20:22:11 -07:00
Darren Shepherd
eb176f062b Rename blacklist to skipNames 2020-08-20 10:17:32 -07:00
Darren Shepherd
21a1793bd6 Add programmatic expiration of access control 2020-03-20 16:22:05 -07:00
Sebastiaan van Steenis
5c74e1ee1e Move debug log to trace 2020-03-11 20:37:25 -07:00
Dan Ramich
8d7dd5fb27 Use kubernetes to generate names 2020-01-31 13:51:59 -07:00
kinarashah
e09204b630 NewClientErrorReporter 2019-09-30 09:47:04 -07:00
Darren Shepherd
07c964e242 Move to some wrangler utils and k3s 2019-08-19 10:14:05 -07:00
rmweir
2da1bd2ffc Add enable function and addFeature functions
Added enable function to schemas. This allows filtering of schemas
which is a required part of feature flagging in rancher. Added
addFeature functions to controller template for adding handlers that
can be disabled if their associated feature is disabled.
2019-07-02 12:18:40 -07:00
rmweir
c55b1eed18 Track namespaces in options property
Now, identifies and assigns namespaces. Prior, the
backend listed items belongng to all namespaces in
all projects no matter what because they were not
being tracked. This led to longer request times
for projects that contained a fraction of total
resources. Now, rancher can filter project
resource requests; times are improved and
largely dependent on resource amount for the given
project.
2019-04-05 17:12:04 -07:00
Nathan Jenan
362802224f Adding ability to replace schemas
This change makes it so that schemas can be replaced when they already exist.
This is to support the ability for kontainer drivers to update their dynamic
schemas.

Issue:
https://github.com/rancher/rancher/issues/17712
2019-02-13 14:38:22 -07:00
orangedeng
d71b4215d0 Fix embed mapper ignore list not working 2019-01-09 15:22:22 +08:00
Darren Shepherd
77a8edaa99 Allow circular types to be imported 2018-12-17 15:44:50 -07:00
Aiwantaozi
b681b841db Add default value to float type
Problem:
float type default value are convert to string now

Solution:
add default value for float

Issue:
https://github.com/rancher/rancher/issues/16958
2018-12-07 18:58:27 +08:00
Darren Shepherd
c8d4304725 Add support for Uint64 2018-11-19 22:36:39 -07:00
Aiwantaozi
1883e14f29 add float 2018-11-15 10:09:38 +08:00
Darren Shepherd
0363cc24c6 Add pending mapper to set resource state to pending when no conditions 2018-10-09 19:30:07 -07:00
Darren Shepherd
d5ff49f613 Breakout merge that allows changing metadata and status 2018-10-04 14:08:16 -07:00
Darren Shepherd
217609a71c Add NamedResource type 2018-10-04 14:07:55 -07:00
Nathan Jenan
e2fa956b64 Add dynamic field to field struct
This change adds a dynamic field indicator to the field struct.  This is so
we can remove the dynamic fields from an existing schema before merging the
dynamic schema and actual schema to prevent removed dynamic fields form being
incorrectly left behind on the schema.

Issue:
https://github.com/rancher/rancher/issues/12698
2018-09-18 10:14:28 -07:00
Nathan Jenan
915dc06a9d Revert "Revert "Don't strip strings on output""
This reverts commit 4bcc025ae3.
2018-09-10 20:34:17 -07:00
Craig Jellick
4bcc025ae3 Revert "Don't strip strings on output"
This reverts commit 5e344d90cd.
Tested this and it broke more scenarios
2018-08-17 14:28:10 -07:00
Nathan Jenan
316a8acc04 Fixing bug in Norman where references to a schema were improperly deleted.
This is to support pluggable kontainer drivers.

Issue:
https://github.com/rancher/rancher/issues/12698
2018-08-13 10:18:42 -07:00
Darren Shepherd
04c7130e5f Add changed method 2018-08-13 10:00:02 -07:00
Darren Shepherd
5e344d90cd Don't strip strings on output 2018-08-13 10:00:02 -07:00
Darren Shepherd
5a8ca5f1e5 Only set type if id is set 2018-07-31 14:10:23 -07:00
Darren Shepherd
b9de8d4273 More verbose error message when reflection fails 2018-07-31 14:10:23 -07:00
Darren Shepherd
fb7c8a27e9 Support uint32 2018-07-31 14:10:23 -07:00
Darren Shepherd
1459e6f3a5 Support maps and slices of pointers 2018-07-31 14:10:23 -07:00
Darren Shepherd
dde4ff79de Fix merging of fields that are maps of other types 2018-07-31 14:10:23 -07:00
Darren Shepherd
d985e01035 Add type before and after 2018-07-19 23:56:06 -07:00
Darren Shepherd
9324ec8b09 Add Optional to access mapper 2018-07-19 10:23:17 -07:00
Darren Shepherd
dca6c2e43d Add searching to date fields by default 2018-07-19 10:23:17 -07:00
Darren Shepherd
c29825b3db Rename IsEmpty to IsAPIObjectEmpty 2018-07-19 10:23:17 -07:00
Darren Shepherd
c3512e7097 Add yaml formatting for pretty edit mode 2018-07-19 10:23:17 -07:00
Darren Shepherd
843a604715 Fix replace logic 2018-07-19 10:23:17 -07:00
Darren Shepherd
7b6bca9b64 Add util methods to convert to idiomatic json/yaml key formats 2018-07-19 10:23:17 -07:00
Darren Shepherd
64a3b83d23 Add slice.StringsEquals 2018-07-19 10:23:17 -07:00
Darren Shepherd
f33accee7c Add InputFormatter that runs before the builder/validation 2018-07-19 10:23:17 -07:00
Darren Shepherd
c0cece100c Add CodeName to Move Mapper 2018-07-19 10:23:17 -07:00
Darren Shepherd
003c94dd27 Add root mapper 2018-07-19 10:23:17 -07:00