Skip to content

Commit

Permalink
fix node opa rule
Browse files Browse the repository at this point in the history
  • Loading branch information
liangzai006 committed Dec 1, 2023
1 parent 9f5b14e commit 5f4fd26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/rule/kubeeye_v1alpha2_opa_namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
type == "Namespace"
level := "danger"
annotation := ["evercloud.io/creator", "evercloud.io/cluster","evercloud.io/ams_name","evercloud.io/ams_id"]
annotation := ["test", "demo"]
some k in annotation
not resource.Object.metadata.annotations[k]
msg := {
Expand All @@ -48,7 +48,7 @@ spec:
type == "Namespace"
level := "danger"
annotation := ["msmsapp","msmscluster","msmsenv","msmsloc"]
annotation := ["test","demo"]
some k in annotation
not resource.Object.metadata.labels[k]
msg := {
Expand Down
2 changes: 1 addition & 1 deletion deploy/rule/kubeeye_v1alpha2_opa_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
"Level": sprintf("%v", [level]),
"Message": sprintf("%v", [condition.reason]),
"Reason": sprintf("%v", [condition.message]),
} if {
} {
condition.type != "Ready"
condition.status == "True"
}

0 comments on commit 5f4fd26

Please sign in to comment.