filter wach && list action
Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
)
|
||||
|
||||
/**
|
||||
DevOps project controller is used to maintain the state of the DevOps project.
|
||||
DevOps project controller is used to maintain the state of the DevOps project.
|
||||
*/
|
||||
|
||||
type Controller struct {
|
||||
|
||||
@@ -182,10 +182,8 @@ func filterInformerActions(actions []core.Action) []core.Action {
|
||||
ret := []core.Action{}
|
||||
for _, action := range actions {
|
||||
if len(action.GetNamespace()) == 0 &&
|
||||
(action.Matches("list", "foos") ||
|
||||
action.Matches("watch", "foos") ||
|
||||
action.Matches("list", "deployments") ||
|
||||
action.Matches("watch", "deployments")) {
|
||||
(action.Matches("list", devopsprojects.ResourcePluralDevOpsProject) ||
|
||||
action.Matches("watch", devopsprojects.ResourcePluralDevOpsProject)) {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, action)
|
||||
|
||||
@@ -184,10 +184,8 @@ func filterInformerActions(actions []core.Action) []core.Action {
|
||||
ret := []core.Action{}
|
||||
for _, action := range actions {
|
||||
if len(action.GetNamespace()) == 0 &&
|
||||
(action.Matches("list", "foos") ||
|
||||
action.Matches("watch", "foos") ||
|
||||
action.Matches("list", "deployments") ||
|
||||
action.Matches("watch", "deployments")) {
|
||||
(action.Matches("list", s2i.ResourcePluralS2iBinary) ||
|
||||
action.Matches("watch", s2i.ResourcePluralS2iBinary)) {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, action)
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
)
|
||||
|
||||
/**
|
||||
s2irun-controller used to handle s2irun's delete logic.
|
||||
s2irun creation and operation provided by s2ioperator
|
||||
s2irun-controller used to handle s2irun's delete logic.
|
||||
s2irun creation and operation provided by s2ioperator
|
||||
*/
|
||||
type Controller struct {
|
||||
client clientset.Interface
|
||||
|
||||
@@ -226,10 +226,10 @@ func filterInformerActions(actions []core.Action) []core.Action {
|
||||
ret := []core.Action{}
|
||||
for _, action := range actions {
|
||||
if len(action.GetNamespace()) == 0 &&
|
||||
(action.Matches("list", "foos") ||
|
||||
action.Matches("watch", "foos") ||
|
||||
action.Matches("list", "deployments") ||
|
||||
action.Matches("watch", "deployments")) {
|
||||
(action.Matches("list", s2i.ResourcePluralS2iRun) ||
|
||||
action.Matches("watch", s2i.ResourcePluralS2iRun) ||
|
||||
action.Matches("list", s2i.ResourcePluralS2iBinary) ||
|
||||
action.Matches("watch", s2i.ResourcePluralS2iBinary)) {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, action)
|
||||
|
||||
Reference in New Issue
Block a user