rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
462 stars 261 forks source link

OPA- Different YAML configs in constraint creation #1317

Closed aaronyeeski closed 4 years ago

aaronyeeski commented 4 years ago

What kind of request is this (question/bug/enhancement/feature request): question

Steps to reproduce (least amount of steps as possible): From dashboard -> Install OPA Gatekeeper Create constraint from form Preview as YAML Cancel creation From constraint view, create as YAML

Result: Create constraint from form -> Preview as YAML: Screen Shot 2020-09-19 at 12 35 06 PM

Create constraint from YAML Screen Shot 2020-09-19 at 12 34 39 PM These two YAML configurations are different. Different constraint templates are used by default. Create from form uses k8sAllowedRepos as default. Create from YAML uses k8sRequiredLabels as default.

Should we change these so they use the same configuration?

Environment information

codyrancher commented 4 years ago

I think it should be consistent but it appears to already be consistent for me.

Kapture 2020-10-19 at 13 51 37

aaronyeeski commented 4 years ago

Tested with Rancher server rancher\rancher:master-head version 298a206 and rancher\rancher:v2.5-head version 7d5afc0

Create as YAML and Edit as YAML are consistent with template used: Screen Shot 2020-10-20 at 3 03 47 PM Create as YAML Screen Shot 2020-10-20 at 3 03 54 PM Edit as YAML Screen Shot 2020-10-20 at 4 22 17 PM