-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: message when enforce and multiple namespaces
ConfigurationPolicy message for enforce omits objects when multiple namespaces are specified When set to inform, the full list of objects is shown. But when set to enforce (the first two messages displayed), only the last object message is shown. In multiple namespaces, the message should be merged. Should be fixed like this example: pod [pod1] in namespace test1 found; [pod1] in namespace test2 found as specified, therefore this Object template is compliant Ref: https://issues.redhat.com/browse/ACM-2604 Signed-off-by: Yi Rae Kim <yikim@redhat.com>
- Loading branch information
1 parent
9db7e62
commit fe41032
Showing
9 changed files
with
393 additions
and
18 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
25 changes: 25 additions & 0 deletions
25
test/resources/case5_multi/case5_multi_namespace_enforce.yaml
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,25 @@ | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: policy-multi-namespace-enforce | ||
namespace: managed | ||
spec: | ||
remediationAction: enforce | ||
pruneObjectBehavior: DeleteAll | ||
namespaceSelector: | ||
exclude: ["kube-*"] | ||
include: ["n1","n2","n3"] | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: case5-multi-namespace-enforce-pod | ||
spec: | ||
containers: | ||
- image: nginx:1.7.9 | ||
imagePullPolicy: Never | ||
name: nginx | ||
ports: | ||
- containerPort: 80 |
Oops, something went wrong.