-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the bug where obj-temp is abead of raw
Signed-off-by: yiraeChristineKim <[email protected]>
- Loading branch information
1 parent
dd1f91f
commit 9e0d6f6
Showing
5 changed files
with
358 additions
and
111 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
158 changes: 158 additions & 0 deletions
158
internal/testdata/ordering/manifest-level-name-raw-consolidate-true-empty-name.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,158 @@ | ||
--- | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: Policy | ||
metadata: | ||
annotations: | ||
policy.open-cluster-management.io/categories: CM Configuration Management | ||
policy.open-cluster-management.io/controls: CM-2 Baseline Configuration | ||
policy.open-cluster-management.io/description: "" | ||
policy.open-cluster-management.io/standards: NIST SP 800-53 | ||
name: one | ||
namespace: my-policies | ||
spec: | ||
disabled: false | ||
policy-templates: | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: one | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: one2 | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: bird | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: bird2 | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: one3 | ||
spec: | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=potato | ||
kind: ConfigMap | ||
metadata: | ||
name: my-configmap | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=cabbage | ||
kind: ConfigMap | ||
metadata: | ||
name: config-2 | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=potato | ||
kind: ConfigMap | ||
metadata: | ||
name: my-configmap | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=cabbage | ||
kind: ConfigMap | ||
metadata: | ||
name: config-2 | ||
remediationAction: inform | ||
severity: low | ||
remediationAction: inform | ||
--- | ||
apiVersion: cluster.open-cluster-management.io/v1beta1 | ||
kind: Placement | ||
metadata: | ||
name: placement-one | ||
namespace: my-policies | ||
spec: | ||
predicates: | ||
- requiredClusterSelector: | ||
labelSelector: | ||
matchExpressions: [] | ||
tolerations: | ||
- key: cluster.open-cluster-management.io/unavailable | ||
operator: Exists | ||
- key: cluster.open-cluster-management.io/unreachable | ||
operator: Exists | ||
--- | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: PlacementBinding | ||
metadata: | ||
name: binding-one | ||
namespace: my-policies | ||
placementRef: | ||
apiGroup: cluster.open-cluster-management.io | ||
kind: Placement | ||
name: placement-one | ||
subjects: | ||
- apiGroup: policy.open-cluster-management.io | ||
kind: Policy | ||
name: one |
122 changes: 122 additions & 0 deletions
122
internal/testdata/ordering/manifest-level-name-raw-consolidate-true-with-name.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,122 @@ | ||
--- | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: Policy | ||
metadata: | ||
annotations: | ||
policy.open-cluster-management.io/categories: CM Configuration Management | ||
policy.open-cluster-management.io/controls: CM-2 Baseline Configuration | ||
policy.open-cluster-management.io/description: "" | ||
policy.open-cluster-management.io/standards: NIST SP 800-53 | ||
name: one | ||
namespace: my-policies | ||
spec: | ||
disabled: false | ||
policy-templates: | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: bird | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: bird2 | ||
spec: | ||
object-templates-raw: |- | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: example | ||
namespace: default | ||
data: | ||
extraData: data | ||
remediationAction: inform | ||
severity: low | ||
- objectDefinition: | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: ConfigurationPolicy | ||
metadata: | ||
name: tiger | ||
spec: | ||
object-templates: | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=potato | ||
kind: ConfigMap | ||
metadata: | ||
name: my-configmap | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=cabbage | ||
kind: ConfigMap | ||
metadata: | ||
name: config-2 | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=potato | ||
kind: ConfigMap | ||
metadata: | ||
name: my-configmap | ||
- complianceType: musthave | ||
objectDefinition: | ||
apiVersion: v1 | ||
data: | ||
game.properties: enemies=cabbage | ||
kind: ConfigMap | ||
metadata: | ||
name: config-2 | ||
remediationAction: inform | ||
severity: low | ||
remediationAction: inform | ||
--- | ||
apiVersion: cluster.open-cluster-management.io/v1beta1 | ||
kind: Placement | ||
metadata: | ||
name: placement-one | ||
namespace: my-policies | ||
spec: | ||
predicates: | ||
- requiredClusterSelector: | ||
labelSelector: | ||
matchExpressions: [] | ||
tolerations: | ||
- key: cluster.open-cluster-management.io/unavailable | ||
operator: Exists | ||
- key: cluster.open-cluster-management.io/unreachable | ||
operator: Exists | ||
--- | ||
apiVersion: policy.open-cluster-management.io/v1 | ||
kind: PlacementBinding | ||
metadata: | ||
name: binding-one | ||
namespace: my-policies | ||
placementRef: | ||
apiGroup: cluster.open-cluster-management.io | ||
kind: Placement | ||
name: placement-one | ||
subjects: | ||
- apiGroup: policy.open-cluster-management.io | ||
kind: Policy | ||
name: one |
Oops, something went wrong.