-
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.
Process object-templates-raw properly with no templatization
If object-templates-raw was set without including a template, it was not properly being converted into a normal object-templates array and thus was not generating a status properly. This change marshals the object-templates-raw string into an object for further processing. Signed-off-by: Will Kutler <wkutler@redhat.com>
- Loading branch information
1 parent
3f97c64
commit 0252bc7
Showing
7 changed files
with
97 additions
and
28 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
4 changes: 2 additions & 2 deletions
4
...ine_templatization/case28_configmaps.yaml → ...ine_templatization/case29_configmaps.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: 28config1 | ||
name: 29config1 | ||
data: | ||
name: testvalue1 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: 28config2 | ||
name: 29config2 | ||
data: | ||
name: testvalue2 |
2 changes: 1 addition & 1 deletion
2
...ltiline_templatization/case28_policy.yaml → ...ltiline_templatization/case29_policy.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
17 changes: 17 additions & 0 deletions
17
test/resources/case29_multiline_templatization/case29_policy_notemplate.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,17 @@ | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: case29-configpolicy-notemplate | ||
spec: | ||
remediationAction: inform | ||
severity: low | ||
object-templates-raw: | | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: 29config1 | ||
namespace: default | ||
data: | ||
extraData: exists! |
File renamed without changes.
File renamed without changes.