1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-22 17:15:51 +00:00
Commit Graph

766 Commits

Author SHA1 Message Date
Darren Shepherd
c71b5d3258 Delete unused code 2018-10-22 10:51:51 -07:00
Darren Shepherd
ddaba8ceb5 Delete event logger as it's not really used 2018-10-22 10:51:37 -07:00
Darren Shepherd
dcaea4c5dc All per controller threadiness 2018-10-22 10:51:15 -07:00
Darren Shepherd
04cb04ac06
Merge pull request #206 from ibuildthecloud/master
After failing to remove finalizer refresh finalizer list
2018-10-15 16:12:14 -07:00
Darren Shepherd
296fc765c9 After failing to remove finalizer refresh finalizer list 2018-10-15 16:10:17 -07:00
Darren Shepherd
ad4865987c
Merge pull request #205 from ibuildthecloud/master
Add support for k8s 1.12
2018-10-09 19:32:03 -07:00
Darren Shepherd
373a1f9de1
Merge pull request #202 from ukinau/Add-Generic-Controller-Related-Metrics
Add Generic Controller Related Metrics
2018-10-09 19:31:52 -07: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
611d7cb0f1 Add support for k8s 1.12 2018-10-09 19:30:04 -07:00
Yuki Nishiwaki
90a67b5678 Add Generic Controller Related Metrics
To enhance operatability for the service using norman framework,
It's better to expose internal state as detail as possible.
This is the just starting point but at least which handler is executed
often and which handler with which key's execution is often failed
metrics is very useful to spot the place operator have to dig in when
something happened.
So this commit added 2 metrics.
1: handler execution total count
2: handler execution failure total count
2018-10-05 14:36:58 +09:00
Darren Shepherd
c580ac3ab0
Merge pull request #201 from ukinau/Enable-fine-grained-control-for-controller-related-metrics
Enable fine-grained control for Controller related metrics
2018-10-04 14:18:49 -07:00
Darren Shepherd
3bda2068a0
Merge pull request #204 from ibuildthecloud/master
Random
2018-10-04 14:16:51 -07:00
Darren Shepherd
8e5e5a6d0a
Merge pull request #203 from ukinau/Support-Reason-Field-In-ForgetError
Allow to put Reason in controller.ForgetError
2018-10-04 14:16:34 -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
Darren Shepherd
decdab356f Trigger resolve in changeset on deleted objects 2018-10-04 14:07:41 -07:00
Yuki Nishiwaki
b18da6edc4 Allow to put Reason in controller.ForgetError
Norman Condition automatically generate condition information based on
the error the handler would return in Condition.Do function.
handler function usually return 2 types of error. the error can be
ignored and the error can not be ignored.
According to current implementation, Condition.Do function generate
condition with error state even if handler return error can be ignored.
The error that can be ignored should be ignored in the context of
condition as well.

So this commit introduce new field which is Reason to ForgetError so
that the developer can put special reason other than Error when
ForgetError is expected to happen by expected procedure like
provisioning and wait for something and Norman Condintion respect to
this field when try to generate condition information based on error

This solution will help us to fix this rancher bug
https://github.com/rancher/rancher/issues/15907
2018-10-03 02:44:42 +09:00
Yuki Nishiwaki
f103a35307 Enable fine-grained control for Controller related metrics 2018-09-26 11:51:51 +09:00
Darren Shepherd
d675dc7949
Merge pull request #200 from ibuildthecloud/master
Switch to go 1.11 and modules
2018-09-25 11:49:16 -07:00
Darren Shepherd
dc39352b4b Switch to go 1.11 2018-09-25 11:43:11 -07:00
Darren Shepherd
de109902bb Switch to modules 2018-09-25 11:26:23 -07:00
Darren Shepherd
e5c60cd6bc
Merge pull request #199 from ibuildthecloud/master
Random changes
2018-09-24 09:02:30 -07:00
Darren Shepherd
5f7e9df8b9
Merge pull request #189 from nathan-jenan-rancher/pluggable-driver
Add dynamic field to field struct
2018-09-24 09:02:20 -07:00
Darren Shepherd
ee8e325eb5
Merge pull request #198 from maxkorp/plug-watch-memory-leak
Ensure that closed watchers are always stopped
2018-09-24 09:01:17 -07:00
Darren Shepherd
f06b9944e7 Some util methods for kv style string 2018-09-24 09:00:20 -07:00
Darren Shepherd
e93f1d7870 Add changeset package
changeset is an easy way to track parent/child relationships and trigger
parent updates if child changes
2018-09-24 09:00:20 -07:00
Darren Shepherd
a5698a8e86 Add method to client to get GenericController 2018-09-24 09:00:20 -07:00
Max Korp
91b33a9763 Ensure that closed watchers are always stopped
This would cause a new watcher to be started without ever cleaning up the old one, which was causing memory leaks.
2018-09-21 16:47:57 -07:00
Darren Shepherd
37bae85b96 Return proper v1.Status error, not masking marshaling error 2018-09-20 09:34:36 -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
Darren Shepherd
3a7e3090fb
Merge pull request #191 from antmanler/filter-namesapces
Enable filter namespaces on server side
2018-09-14 14:17:54 -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
antmanler
c7abb57dea
Only checks on ModifierEQ 2018-09-01 14:54:47 +08:00
Darren Shepherd
012759b2f8 Drop Config from ClientGetter interface 2018-08-31 10:42:48 -07:00
Dan Ramich
27ebab5e48 Add label to objects created through norman 2018-08-29 15:30:05 -07:00
Alena Prokharchyk
1d3cf7aee8 Log forget error in debug 2018-08-25 15:44:50 -07:00
antmanler
c159270dc1
Enable filter namespaces on server side 2018-08-24 09:13:43 +08:00
Dan Ramich
12c3f92bed Revert changes to template for controllers 2018-08-23 14:48:08 -07:00
Daishan Peng
643868f4a6 add method to compare if error has tmp file path
add a method to check if the error message contains a tmp file path. It
is to prevent updating resource's condition forever and causing the
controller flapping. https://github.com/rancher/rancher/issues/15103
2018-08-17 15:39:50 -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
kinarashah
58f46da754 return on first try if err is not conflict
Resolves: rancher/rancher#14940
2018-08-04 10:50:35 -07:00
Daishan Peng
33b13aaf9d use background delete 2018-07-31 18:29:57 -07:00
Darren Shepherd
9620967ad5 Fallback to custom decoder 2018-07-31 18:24:07 -07:00
Darren Shepherd
5a8ca5f1e5 Only set type if id is set 2018-07-31 14:10:23 -07:00
Darren Shepherd
093318714b Add ability to pass in WebSocket dialer 2018-07-31 14:10:23 -07:00
Darren Shepherd
19878010e4 Add Replace to generic client 2018-07-31 14:10:23 -07:00
Darren Shepherd
bfc612cdcb Remove unused offspring controller 2018-07-31 14:10:23 -07:00