Skip to content

Commit

Permalink
Merge pull request #29 from jvanz/add-missing-field-questions-ui
Browse files Browse the repository at this point in the history
fix: questions-ui.yml missing latest configuration.
  • Loading branch information
jvanz authored Apr 16, 2024
2 parents 1e27218 + 84a923c commit 727bcc9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ the `defaultRequest`, `defaultLimit`, and `maxLimit` fields, if set, will be
ignored. Additionally, `ignoreValues` default value is `false`, so it's
recommended to only provide it when you want to set it to `true`.

> [!NOTE]
> The admission request review evaluated by the policy could be mutated by
> another admission controller, like the LimitRange admission controller. This
> means that the policy could accept a resource that at first looks invalid, but
> that is later mutated by another admission controller to be valid. For example,
> LimitRange will set the default request values if they are not set.

Any container that uses an image that matches an entry in this list will be excluded
from enforcement.

Expand Down
24 changes: 23 additions & 1 deletion artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version: 0.2.2
name: container-resources
displayName: Container Resources
createdAt: 2024-03-15T17:07:43.480376548Z
createdAt: 2024-04-12T11:54:02.226315046Z
description: Policy is designed to enforce constraints on the resource requirements of Kubernetes containers
license: Apache-2.0
homeURL: https://github.com/kubewarden/container-resources-policy
Expand Down Expand Up @@ -60,27 +60,38 @@ annotations:
type: map[
variable: cpu
subquestions:
- default: false
group: Settings
label: Ignore values
title: Ignore values
type: boolean
variable: cpu.ignoreValues
tooltip: >-
Skip enforcement of specific values, but ensure that requests and limits are set
- default: ''
tooltip: >-
Defines default minimum CPU requested.
group: Settings
label: Default CPU requested
type: string
variable: cpu.defaultRequest
show_if: cpu.ignoreValues=false
- default: ''
tooltip: >-
Defines default CPU limit value.
group: Settings
label: Default CPU limit
type: string
variable: cpu.defaultLimit
show_if: cpu.ignoreValues=false
- default: ''
tooltip: >-
Defines maximum limit value allowed to be set for the CPU resource
group: Settings
label: Max CPU limit allowed
type: string
variable: cpu.maxLimit
show_if: cpu.ignoreValues=false
- default: {}
description: Defines the limit and minimum amount requested for memory resource
group: Settings
Expand All @@ -89,27 +100,38 @@ annotations:
type: map[
variable: memory
subquestions:
- default: false
group: Settings
label: Ignore values
title: Ignore values
type: boolean
variable: memory.ignoreValues
tooltip: >-
Skip enforcement of specific values, but ensure that requests and limits are set
- default: ''
tooltip: >-
Defines default minimum memory requested.
group: Settings
label: Default memory requested
type: string
variable: memory.defaultRequest
show_if: memory.ignoreValues=false
- default: ''
tooltip: >-
Defines default memory limit value.
group: Settings
label: Default memory limit
type: string
variable: memory.defaultLimit
show_if: memory.ignoreValues=false
- default: ''
tooltip: >-
Defines maximum limit value allowed to be set for the memory resource
group: Settings
label: Max memory limit allowed
type: string
variable: memory.maxLimit
show_if: memory.ignoreValues=false
- default: []
description: >-
Configuration used to exclude containers from enforcement
Expand Down
22 changes: 22 additions & 0 deletions questions-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,38 @@ questions:
type: map[
variable: cpu
subquestions:
- default: false
group: Settings
label: Ignore values
title: Ignore values
type: boolean
variable: cpu.ignoreValues
tooltip: >-
Skip enforcement of specific values, but ensure that requests and limits are set
- default: ''
tooltip: >-
Defines default minimum CPU requested.
group: Settings
label: Default CPU requested
type: string
variable: cpu.defaultRequest
show_if: cpu.ignoreValues=false
- default: ''
tooltip: >-
Defines default CPU limit value.
group: Settings
label: Default CPU limit
type: string
variable: cpu.defaultLimit
show_if: cpu.ignoreValues=false
- default: ''
tooltip: >-
Defines maximum limit value allowed to be set for the CPU resource
group: Settings
label: Max CPU limit allowed
type: string
variable: cpu.maxLimit
show_if: cpu.ignoreValues=false
- default: {}
description: Defines the limit and minimum amount requested for memory resource
group: Settings
Expand All @@ -46,27 +57,38 @@ questions:
type: map[
variable: memory
subquestions:
- default: false
group: Settings
label: Ignore values
title: Ignore values
type: boolean
variable: memory.ignoreValues
tooltip: >-
Skip enforcement of specific values, but ensure that requests and limits are set
- default: ''
tooltip: >-
Defines default minimum memory requested.
group: Settings
label: Default memory requested
type: string
variable: memory.defaultRequest
show_if: memory.ignoreValues=false
- default: ''
tooltip: >-
Defines default memory limit value.
group: Settings
label: Default memory limit
type: string
variable: memory.defaultLimit
show_if: memory.ignoreValues=false
- default: ''
tooltip: >-
Defines maximum limit value allowed to be set for the memory resource
group: Settings
label: Max memory limit allowed
type: string
variable: memory.maxLimit
show_if: memory.ignoreValues=false
- default: []
description: >-
Configuration used to exclude containers from enforcement
Expand Down

0 comments on commit 727bcc9

Please sign in to comment.