Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require objectDefinition and remediationAction #183

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/v1/configurationpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ func (e EvaluationInterval) GetNonCompliantInterval() (time.Duration, error) {

// ConfigurationPolicySpec defines the desired state of ConfigurationPolicy
type ConfigurationPolicySpec struct {
Severity Severity `json:"severity,omitempty"` // low, medium, high
RemediationAction RemediationAction `json:"remediationAction,omitempty"` // enforce, inform
Severity Severity `json:"severity,omitempty"` // low, medium, high
RemediationAction RemediationAction `json:"remediationAction"` // enforce, inform
// 'namespaceSelector' defines the list of namespaces to include/exclude for objects defined in
// spec.objectTemplates. All selector rules are ANDed. If 'include' is not provided but
// 'matchLabels' and/or 'matchExpressions' are, 'include' will behave as if ['*'] were given. If
Expand Down Expand Up @@ -186,7 +186,7 @@ type ObjectTemplate struct {

// ObjectDefinition defines required fields for the object
// +kubebuilder:pruning:PreserveUnknownFields
ObjectDefinition runtime.RawExtension `json:"objectDefinition,omitempty"`
ObjectDefinition runtime.RawExtension `json:"objectDefinition"`
}

// ConfigurationPolicyStatus defines the observed state of ConfigurationPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
required:
- complianceType
- objectDefinition
type: object
type: array
object-templates-raw:
Expand Down Expand Up @@ -202,6 +203,8 @@ spec:
- critical
- Critical
type: string
required:
- remediationAction
type: object
status:
description: ConfigurationPolicyStatus defines the observed state of ConfigurationPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
required:
- complianceType
- objectDefinition
type: object
type: array
object-templates-raw:
Expand Down Expand Up @@ -209,6 +210,8 @@ spec:
- critical
- Critical
type: string
required:
- remediationAction
type: object
status:
description: ConfigurationPolicyStatus defines the observed state of ConfigurationPolicy
Expand Down