Skip to content

Commit

Permalink
Add support for ignoring namespaces
Browse files Browse the repository at this point in the history
This Commit,
- adds support for ignoring certain namespaces while watching all namespaces.
- replaces `Namespaces []string` with `Namespaces.Include []string`
- adds `Namespaces.Ignore []string` ( optional / omitempty ) filed to ignore namespaces when Namespaces.Inculde contains "all"
  • Loading branch information
codenio committed Aug 2, 2019
1 parent be5fade commit e09d097
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 75 deletions.
88 changes: 70 additions & 18 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,119 +2,171 @@
resources:
- name: pods # Name of the resources e.g pods, deployments, ingresses, etc. (Resource name must be in plural form)
namespaces: # List of namespaces, "all" will watch all the namespaces
- all
include:
- all
ignore: # List of namespaces to be ignored (omitempty), used only with include: all
- # example : include [all], ignore [x,y,z]
events: # List of lifecycle events you want to receive, e.g create, update, delete, error OR all
- create
- delete
- error
- name: services
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: deployments
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- update
- error
- name: ingresses
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: nodes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: namespaces
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: persistentvolumes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: persistentvolumeclaim
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: secrets
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: configmaps
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: daemonsets
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: jobs
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: roles
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: rolebindings
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: clusterroles
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: clusterrolebindings
namespace:
- all
namespaces:
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: nodes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
Expand Down
86 changes: 67 additions & 19 deletions deploy-all-in-one-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,107 +11,152 @@ data:
## Resources you want to watch
resources:
- name: pods # Name of the resources e.g pods, deployments, ingresses, etc. (Resource name must be in plural form)
namespaces: # List of namespaces, "all" will watch all the namespaces
- all
events: # List of lifecycle events you want to receive, e.g create, update, delete OR all
namespaces:
include:
- all
ignore: # List of namespaces to be ignored (omitempty), used only with include: all
- # example : include [all], ignore [x,y,z]
events: # List of lifecycle events you want to receive, e.g create, update, delete, error OR all
- create
- delete
- error
- name: services
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: deployments
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: ingresses
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: nodes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: namespaces
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: persistentvolumes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: persistentvolumeclaims
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: secrets
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: configmaps
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: daemonsets
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: jobs
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- update
- error
- name: roles
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: rolebindings
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
- error
- name: clusterroles
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
Expand All @@ -125,7 +170,10 @@ data:
- error
- name: nodes
namespaces:
- all
include:
- all
ignore:
-
events:
- create
- delete
Expand Down
Loading

0 comments on commit e09d097

Please sign in to comment.