helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Wrong questions for Host Namespaces PSP

Open kravciak opened this issue 10 months ago • 0 comments

Setting port value to 80 for example produces following error on policy server: Error(\"invalid type: string \\\"80\\\", expected a sequence\", line: 1, column: 97)")

Current state

Questions on kubewarden-defaults helm chart provide single input field for allow_host_ports, which generates following YAML:

Screenshot from 2024-04-22 16-07-19

Yaml generated by creating policy from kubewarden-defaults helm chart:

    settings:
      allow_host_ipc: false
      allow_host_network: false
      allow_host_pid: false
      allow_host_ports: 80,443

Expected state

Policy settings expect ports to be a range, giving min & max value.

Screenshot from 2024-04-22 16-10-20

Yaml generated by creating policy from ClusterAdmissionPolicies page:

  settings:
    allow_host_ipc: true
    allow_host_network: false
    allow_host_pid: false
    allow_host_ports:
      - min: 80
        max: 80
      - min: 8000
        max: 9000

kravciak avatar Apr 22 '24 14:04 kravciak