Darren Shepherd
7b6bca9b64
Add util methods to convert to idiomatic json/yaml key formats
2018-07-19 10:23:17 -07:00
Darren Shepherd
1d4a52cb31
make type conversion and field validation public util methods
2018-07-19 10:23:17 -07:00
Darren Shepherd
58723a866e
Formatting change for generated client
2018-07-19 10:23:17 -07:00
Darren Shepherd
35d7571228
Improve client debug logging
2018-07-19 10:23:17 -07:00
Darren Shepherd
64a3b83d23
Add slice.StringsEquals
2018-07-19 10:23:17 -07:00
Darren Shepherd
6bab9eed93
Allow API to run through k8s service proxy
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
16ed673d50
Revert collection URL lookup
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
51ea2cd7f6
Rename method
2018-07-19 10:23:17 -07:00
Darren Shepherd
88e3507f72
Change some logging to debug
...
# Conflicts:
# controller/generic_controller.go
# vendor.conf
2018-07-19 10:23:17 -07:00
Darren Shepherd
003c94dd27
Add root mapper
2018-07-19 10:23:17 -07:00
Darren Shepherd
0decad85cb
Drop status field if _export=true is set
2018-07-19 10:23:17 -07:00
Darren Shepherd
23c18792d2
Add replace to client
2018-07-19 10:23:17 -07:00
Darren Shepherd
2706ddc350
Change default timeout to 1 minute
2018-07-19 10:23:17 -07:00
Darren Shepherd
413808be1d
Make debug variable public
2018-07-19 10:23:17 -07:00
Darren Shepherd
fbc49a97af
Make websocket dialer use same TLSClientConfig has http client
2018-07-19 10:23:17 -07:00
Darren Shepherd
875bcf4b2d
Change ToInternal to return error
2018-07-19 10:23:17 -07:00
Darren Shepherd
6db31068a0
Add edit/export modes and drop default resource fields if empty
2018-07-19 10:23:17 -07:00
Darren Shepherd
da330debe9
Export NewAPIError and SetupRequest
2018-07-19 10:23:17 -07:00
Darren Shepherd
07d95eaf3f
Refactor how CRD stores are created
2018-07-19 10:23:17 -07:00
Darren Shepherd
22fc71bcb6
refactor pointer to s
2018-07-19 10:23:17 -07:00
Darren Shepherd
938de659af
For ByID if transformer returns nil and nil that means 404
2018-07-19 10:23:17 -07:00
Darren Shepherd
0e3bc2dfca
Get name/namespace from metadata/name,namespace not name,namespaceId
2018-07-19 10:23:17 -07:00
Darren Shepherd
0d782dfe15
when embedding optional element if schema isn't found ignore
2018-07-19 10:23:17 -07:00
Darren Shepherd
f8f079c3b9
Add Conflict constant
2018-07-19 10:23:17 -07:00
Alena Prokharchyk
57e8282a33
k8s vendor to 1.10.5
2018-07-11 16:44:45 -07:00
Alena Prokharchyk
26d279bce1
Fixes to adapt to 1.10.5
2018-07-11 16:44:45 -07:00
Alena Prokharchyk
d7ac071df7
Include namespace to not found msg
2018-07-11 16:33:48 -07:00
Dan Ramich
aecae32b4a
Fix pagination
...
Problem:
Pagination is not showing up
Solution:
Pagination was being created properly but then dropped in favor of an
empty version. Save the pagination on the context so it can be accessed
later and not reset.
2018-06-25 15:34:52 -07:00
Craig Jellick
388faeb89e
Use logrus to log errors and panics
...
This changes the framework from using glog to using logrus, which is
what the rest of code uses.
2018-06-22 16:19:49 -07:00
Alena Prokharchyk
e03c72e855
DnsLabelRestricted type to validate against RFC 1035
...
k8s uses restricted format for services
dnsLabelRestricted: dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
dnsLabel:dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
2018-06-19 09:47:36 -07:00
Craig Jellick
df1aea6651
Support for backend types
...
Allows users to specify "backend" types that will have kubernetes
controllers and clients generated but no Rancher client generated.
The intended use to allow for creating a CRD and the supporting code
without having to expose the CRD in the Rancher API.
2018-06-19 09:38:20 -07:00
Prachi Damle
d70f95a3d6
Changes to Mapper embed to insert nil value if applicable for a schema field
2018-06-11 10:53:23 -07:00
Daishan Peng
59c4a298e8
add yaml support
2018-06-04 16:44:48 -07:00
zionwu
79b91ea33c
Add hostname tag and fix dnsLabel validation issue
2018-05-18 08:27:25 -07:00
Nathan Jenan
6a363d8e93
Adding error if not a pointer
...
This change adds an early panic if the type of the obj supplied to the
`MustImport` func is a pointer. This is to prevent a later, cryptic,
error that is not as clear to diagnose.
2018-05-16 10:15:49 -07:00
Nathan Jenan
7fed8b17a8
Filter resources on default fields
...
This change gives norman the ability to filter api requests based on the
default value of fields. Before, it would filter on the actual data in
the resource, and then apply default values to the resource before
returning.
Issue:
https://github.com/rancher/rancher/issues/13418
2018-05-16 10:15:34 -07:00
Darren Shepherd
3499440178
Revert "Make leader election have leader callback"
...
This reverts commit 807103dc58
.
2018-05-16 10:13:40 -07:00
Darren Shepherd
d6865df52b
Revert "Use a getID function instead of using hostname"
...
This reverts commit b480586cfc
.
2018-05-16 10:09:49 -07:00
Yuxing
b480586cfc
Use a getID function instead of using hostname
2018-05-12 11:46:57 -07:00
Darren Shepherd
807103dc58
Make leader election have leader callback
2018-05-10 23:35:18 +02:00
Darren Shepherd
8d5d75c7b8
Check namespace for clusterName
2018-04-30 14:36:00 -07:00
Dan Ramich
98500d10f5
Update doAction to not expect a response
...
Problem:
doAction assumes that an action would have a response body which causes
JSON unmarshal errors
Solution:
Only attempt to Unmarshal when a response is expected
2018-04-27 15:27:40 -07:00
Dan Ramich
e6973cb055
Update action generation code
...
Problem:
Action generation code does not account for a resource action that does not
have an output
Solution:
Update template to output all actions
2018-04-27 09:26:01 -07:00
Craig Jellick
719d3af64f
Fix logic for setting annotation based fields
...
- Do not drop a field-to-annotation conversion if the value of the field is
nil. The user is excplicitly trying to set it to nil
- Never delete field annotations, even if they are not in the new map of
annotations sent by the user.
- Prevent the modification of the creatorId field, which is a special case
field that should be considered protected
2018-04-27 09:25:25 -07:00
Darren Shepherd
e501f1f3c5
Move watch sharing to norman
2018-04-27 09:25:11 -07:00
Craig Jellick
d85dfb2d48
make url error logging prettier
2018-04-27 09:25:04 -07:00
Craig Jellick
bde68141b6
Add CanDo function to AccessControl interface
...
Enables us to authorize actions and links
2018-04-25 20:14:41 -07:00
Darren Shepherd
063fbdfa71
Don't consider nil values when merging
2018-04-24 01:18:55 -07:00