Skip to content

Commit

Permalink
update policy engine type
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Feb 20, 2025
1 parent 58fe055 commit 0bcca27
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8383,9 +8383,18 @@ spec:
maxSeverity:
description: MaxSeverity is the maximum allowed severity without
failing the stack run
enum:
- UNKNOWN
- LOW
- MEDIUM
- HIGH
- CRITICAL
- NONE
type: string
type:
description: Type is the policy engine to use with this stack
enum:
- TRIVY
type: string
required:
- type
Expand Down
2 changes: 2 additions & 0 deletions go/controller/api/v1alpha1/infrastructurestack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ type ObservableMetric struct {

type PolicyEngine struct {
// Type is the policy engine to use with this stack
// +kubebuilder:validation:Enum=TRIVY
// +kubebuilder:validation:Required
Type console.PolicyEngineType `json:"type"`

// MaxSeverity is the maximum allowed severity without failing the stack run
// +kubebuilder:validation:Enum=UNKNOWN;LOW;MEDIUM;HIGH;CRITICAL;NONE
// +kubebuilder:validation:Optional
MaxSeverity *console.VulnSeverity `json:"maxSeverity,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8383,9 +8383,18 @@ spec:
maxSeverity:
description: MaxSeverity is the maximum allowed severity without
failing the stack run
enum:
- UNKNOWN
- LOW
- MEDIUM
- HIGH
- CRITICAL
- NONE
type: string
type:
description: Type is the policy engine to use with this stack
enum:
- TRIVY
type: string
required:
- type
Expand Down
4 changes: 2 additions & 2 deletions go/controller/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1989,8 +1989,8 @@ _Appears in:_

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `type` _[PolicyEngineType](#policyenginetype)_ | Type is the policy engine to use with this stack | | Required: {} <br /> |
| `maxSeverity` _[VulnSeverity](#vulnseverity)_ | MaxSeverity is the maximum allowed severity without failing the stack run | | Optional: {} <br /> |
| `type` _[PolicyEngineType](#policyenginetype)_ | Type is the policy engine to use with this stack | | Enum: [TRIVY] <br />Required: {} <br /> |
| `maxSeverity` _[VulnSeverity](#vulnseverity)_ | MaxSeverity is the maximum allowed severity without failing the stack run | | Enum: [UNKNOWN LOW MEDIUM HIGH CRITICAL NONE] <br />Optional: {} <br /> |


#### PrAutomation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8383,9 +8383,18 @@ spec:
maxSeverity:
description: MaxSeverity is the maximum allowed severity without
failing the stack run
enum:
- UNKNOWN
- LOW
- MEDIUM
- HIGH
- CRITICAL
- NONE
type: string
type:
description: Type is the policy engine to use with this stack
enum:
- TRIVY
type: string
required:
- type
Expand Down

0 comments on commit 0bcca27

Please sign in to comment.