Skip to content

Commit

Permalink
fix: missing questions-ui.yml
Browse files Browse the repository at this point in the history
Adds the missing questions-ui.yml necessary to properly show the policy
configuration in the Rancher UI.

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
  • Loading branch information
jvanz committed Jan 26, 2024
1 parent f33ba0d commit cffdf36
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ artifacthub-pkg.yml: metadata.yml go.mod
make VERSION=$$(git describe --tags --abbrev=0 | cut -c2-) annotated-policy.wasm)
kwctl scaffold artifacthub \
--metadata-path metadata.yml --version $(VERSION) \
--questions-path questions-ui.yml \
--output artifacthub-pkg.yml

annotated-policy.wasm: policy.wasm metadata.yml
Expand Down
80 changes: 79 additions & 1 deletion artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version: 0.1.0-rc1
name: container-resources
displayName: Container Resources
createdAt: 2024-01-25T12:36:43.375206024Z
createdAt: 2024-01-26T12:58:26.317997696Z
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 @@ -40,6 +40,84 @@ recommendations:
- url: https://artifacthub.io/packages/helm/kubewarden/kubewarden-controller
annotations:
kubewarden/mutation: 'true'
kubewarden/questions-ui: |
questions:
- default: null
description: >-
This policy is designed to enforce constraints on the resource requirements
of Kubernetes containers.
group: Settings
label: Description
required: false
hide_input: true
type: string
variable: description
- default: {}
description: Defines the limit and minimum amount requested for CPU resource
group: Settings
label: CPU
hide_input: true
type: map[
variable: cpu
subquestions:
- default: ''
tooltip: >-
Defines default minimum CPU requested.
group: Settings
label: Default CPU requested
type: string
variable: cpu.defaultRequest
- default: ''
tooltip: >-
Defines default CPU limit value.
group: Settings
label: Default CPU limit
type: string
variable: cpu.defaultLimit
- 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
- default: {}
description: Defines the limit and minimum amount requested for memory resource
group: Settings
label: memory
hide_input: true
type: map[
variable: memory
subquestions:
- default: ''
tooltip: >-
Defines default minimum memory requested.
group: Settings
label: Default memory requested
type: string
variable: memory.defaultRequest
- default: ''
tooltip: >-
Defines default memory limit value.
group: Settings
label: Default memory limit
type: string
variable: memory.defaultLimit
- 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
- default: []
description: >-
Configuration used to exclude containers from enforcement
group: Settings
label: Ignore images
type: array[
value_multiline: false
variable: ignoreImages
kubewarden/resources: Pod, Replicationcontroller, Deployments, Replicaset, Statefulset, Daemonset, Job, Cronjob
kubewarden/rules: |
- apiGroups:
Expand Down
77 changes: 77 additions & 0 deletions questions-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
questions:
- default: null
description: >-
This policy is designed to enforce constraints on the resource requirements
of Kubernetes containers.
group: Settings
label: Description
required: false
hide_input: true
type: string
variable: description
- default: {}
description: Defines the limit and minimum amount requested for CPU resource
group: Settings
label: CPU
hide_input: true
type: map[
variable: cpu
subquestions:
- default: ''
tooltip: >-
Defines default minimum CPU requested.
group: Settings
label: Default CPU requested
type: string
variable: cpu.defaultRequest
- default: ''
tooltip: >-
Defines default CPU limit value.
group: Settings
label: Default CPU limit
type: string
variable: cpu.defaultLimit
- 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
- default: {}
description: Defines the limit and minimum amount requested for memory resource
group: Settings
label: memory
hide_input: true
type: map[
variable: memory
subquestions:
- default: ''
tooltip: >-
Defines default minimum memory requested.
group: Settings
label: Default memory requested
type: string
variable: memory.defaultRequest
- default: ''
tooltip: >-
Defines default memory limit value.
group: Settings
label: Default memory limit
type: string
variable: memory.defaultLimit
- 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
- default: []
description: >-
Configuration used to exclude containers from enforcement
group: Settings
label: Ignore images
type: array[
value_multiline: false
variable: ignoreImages

0 comments on commit cffdf36

Please sign in to comment.