mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
The health and action fixtures carried sample object names from the upstream project; renamed in step with every assertion that reads them.
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
apiVersion: policy.open-cluster-management.io/v1
|
|
kind: ConfigurationPolicy
|
|
metadata:
|
|
name: policy-namespace
|
|
generation: 3
|
|
namespace: local-cluster
|
|
spec:
|
|
object-templates:
|
|
- complianceType: musthave
|
|
objectDefinition:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: cd-example
|
|
recreateOption: None
|
|
- complianceType: musthave
|
|
objectDefinition:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: cd-example-2
|
|
recreateOption: None
|
|
pruneObjectBehavior: None
|
|
remediationAction: enforce
|
|
severity: low
|
|
status:
|
|
compliancyDetails:
|
|
- Compliant: NonCompliant
|
|
Validity: {}
|
|
conditions:
|
|
- lastTransitionTime: '2024-07-29T16:34:29Z'
|
|
message: 'namespaces [cd-example] not found'
|
|
reason: K8s does not have a `must have` object
|
|
status: 'True'
|
|
type: violation
|
|
- Compliant: NonCompliant
|
|
Validity: {}
|
|
conditions:
|
|
- lastTransitionTime: '2024-07-29T16:39:00Z'
|
|
message: 'namespaces [cd-example-2] not found'
|
|
reason: K8s does not have a `must have` object
|
|
status: 'True'
|
|
type: violation
|
|
compliant: NonCompliant
|
|
lastEvaluated: '2024-07-29T16:39:18Z'
|
|
lastEvaluatedGeneration: 2
|
|
relatedObjects:
|
|
- compliant: NonCompliant
|
|
object:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: cd-example
|
|
reason: Resource not found but should exist
|
|
- compliant: NonCompliant
|
|
object:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: cd-example-2
|
|
reason: Resource not found but should exist
|