未验证 提交 7ffee72b 编写于 作者: R runzexia

filter wach && list action

Signed-off-by: Nrunzexia <runzexia@yunify.com>
上级 5dffb730
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册