-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Kubernetes check to handle multiple namespaces fix #2838
The configuration key 'namespace' is renamed 'namespaces' so multiple names can be specified (if present the old key will be added to the 'namespaces' list). A new configuration key 'namespace_name_regexp' is added to allow namespaces selection using regexp. We now pull every event from Kubernetes and filter them the namespace list.
- Loading branch information
Showing
6 changed files
with
226 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"kind": "NamespaceList", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"selfLink": "/api/v1/namespaces", | ||
"resourceVersion": "2841873" | ||
}, | ||
"items": [ | ||
{ | ||
"metadata": { | ||
"name": "default", | ||
"selfLink": "/api/v1/namespaces/default", | ||
"uid": "7f1a0d0c-65f3-11e6-b5c9-42010a840043", | ||
"resourceVersion": "6", | ||
"creationTimestamp": "2016-08-19T09:58:36Z" | ||
}, | ||
"spec": { | ||
"finalizers": [ | ||
"kubernetes" | ||
] | ||
}, | ||
"status": { | ||
"phase": "Active" | ||
} | ||
}, | ||
{ | ||
"metadata": { | ||
"name": "kube-system", | ||
"selfLink": "/api/v1/namespaces/kube-system", | ||
"uid": "7f239026-65f3-11e6-b5c9-42010a840043", | ||
"resourceVersion": "46", | ||
"creationTimestamp": "2016-08-19T09:58:36Z", | ||
"annotations": { | ||
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Namespace\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"kube-system\",\"creationTimestamp\":null},\"spec\":{},\"status\":{}}" | ||
} | ||
}, | ||
"spec": { | ||
"finalizers": [ | ||
"kubernetes" | ||
] | ||
}, | ||
"status": { | ||
"phase": "Active" | ||
} | ||
}, | ||
{ | ||
"metadata": { | ||
"name": "test-namespace-1", | ||
"selfLink": "/api/v1/namespaces/test-namespace-1", | ||
"uid": "473b5f59-a769-11e6-b048-42010a84006e", | ||
"resourceVersion": "2152956", | ||
"creationTimestamp": "2016-11-10T17:15:28Z", | ||
"labels": { | ||
"name": "test-namespace-1" | ||
} | ||
}, | ||
"spec": { | ||
"finalizers": [ | ||
"kubernetes" | ||
] | ||
}, | ||
"status": { | ||
"phase": "Active" | ||
} | ||
}, | ||
{ | ||
"metadata": { | ||
"name": "test-namespace-2", | ||
"selfLink": "/api/v1/namespaces/test-namespace-2", | ||
"uid": "d4973ec1-a769-11e6-b048-42010a84006e", | ||
"resourceVersion": "2153046", | ||
"creationTimestamp": "2016-11-10T17:19:26Z", | ||
"labels": { | ||
"name": "test-namespace-2" | ||
} | ||
}, | ||
"spec": { | ||
"finalizers": [ | ||
"kubernetes" | ||
] | ||
}, | ||
"status": { | ||
"phase": "Active" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters