api: Introduce & expose endpoint controller statuses#2720
Conversation
api/v1/models/controller_statuses.go
Outdated
There was a problem hiding this comment.
exported type ControllerStatuses should have comment or be unexported
api/v1/models/controller_status.go
Outdated
There was a problem hiding this comment.
exported type ControllerStatusStatus should have comment or be unexported
api/v1/models/controller_status.go
Outdated
There was a problem hiding this comment.
exported type ControllerStatusConfiguration should have comment or be unexported
api/v1/models/controller_status.go
Outdated
There was a problem hiding this comment.
exported type ControllerStatus should have comment or be unexported
|
test-me-please |
api/v1/openapi.yaml
Outdated
pkg/controller/controller.go
Outdated
There was a problem hiding this comment.
In other structures we have put the mutex above all of the resources which should be accessed under that lock - can you do that here?
66944a6 to
65481f1
Compare
|
test-me-please |
|
test-me-please |
|
Error from previous build is odd: EDIT: never mind, there were new changes to the PR. I will review when the above error has been resolved. |
Signed-off-by: Thomas Graf <[email protected]>
Signed-off-by: Thomas Graf <[email protected]>
65481f1 to
88753d8
Compare
|
test-me-please |
88753d8 to
c9b5480
Compare
|
test-me-please |
|
|
test-me-please |
pkg/client/client.go
Outdated
There was a problem hiding this comment.
Could you docuement what allControllers does?
pkg/client/client.go
Outdated
There was a problem hiding this comment.
Since we only do something when status != nil, we can continue when status == nil and avoid the indent.
pkg/client/client.go
Outdated
There was a problem hiding this comment.
I found this logic a bit difficult. Why not:
if status.ConsecutiveFailureCount > 0 {
nFailing++
} else if !allControllers {
continue
}or a switch on the same clauses.
The global controller health will become the standard health overview of the
agent as it will show the status of all async operations:
$ cilium status --all-controllers
[...]
Controller Status (0/2 failing)
Name Last success Last error Count Message
sync-identity-to-k8s-pod (56326) 36s ago never 0 no error
sync-identity-to-k8s-pod (29898) 32s ago never 0 no error
$ cilium status -o json
"controllers": [
{
"configuration": {
"error-retry": true,
"interval": "1m0s"
},
"name": "sync-identity-to-k8s-pod (56326)",
"status": {
"last-failure-timestamp": "0001-01-01T00:00:00.000Z",
"last-success-timestamp": "2018-02-05T17:43:34.099-08:00",
"success-count": 1
},
"uuid": "247d5d37-0adf-11e8-aa78-080027559fd9"
},
{
"configuration": {
"error-retry": true,
"interval": "1m0s"
},
"name": "sync-identity-to-k8s-pod (29898)",
"status": {
"last-failure-timestamp": "0001-01-01T00:00:00.000Z",
"last-success-timestamp": "2018-02-05T17:43:37.997-08:00",
"success-count": 1
},
"uuid": "26d05710-0adf-11e8-aa78-080027559fd9"
}
Signed-off-by: Thomas Graf <[email protected]>
c9b5480 to
5b57b4d
Compare
|
test-me-please |
[ cherry-picked from cilium/cilium-cli repository ] Also update kubeadm.k8s.io API version from v1beta2 to v1beta3. Ref: #2720 Suggested-by: Joe Stringer <[email protected]> Signed-off-by: Michi Mutsuzaki <[email protected]>
[ cherry-picked from cilium/cilium-cli repository ] Also update kubeadm.k8s.io API version from v1beta2 to v1beta3. Ref: #2720 Suggested-by: Joe Stringer <[email protected]> Signed-off-by: Michi Mutsuzaki <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.