aquasecurity / aqua-helm

Helm Charts For Installing Aqua Security Components
http://aquasec.com
Apache License 2.0
86 stars 188 forks source link

Bug: Duplicate 'sideEffects' entries on kube-enforcer's webhooks #856

Closed stan-yago closed 4 months ago

stan-yago commented 5 months ago

Mutating and Validating webhook configurations have duplicate entries for sideEffects, introduced in https://github.com/aquasecurity/aqua-helm/commit/0081cbcbfa69b8859244c7b1930804f65c26f497

These duplicate entries cause validation errors when deploying with flux helm-controller

Helm install failed: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
  line 35: mapping key "sideEffects" already defined at line 20

This isn't the first occurrence, similar issues have been reported and fixed before, see: https://github.com/aquasecurity/aqua-helm/issues/608 https://github.com/aquasecurity/aqua-helm/issues/483

After correcting this issue perhaps another issue should be created to add a strict linter action to prevent this from happening again. Something that would run helm template, followed by kubeconform -strict -ignore-missing-schemas which currently produces

MutatingWebhookConfiguration kube-enforcer-me-injection-hook-config failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: unmarshal errors:
  line 33: key "sideEffects" already set in map
ValidatingWebhookConfiguration kube-enforcer-admission-hook-config failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: unmarshal errors:
  line 48: key "sideEffects" already set in map 
alejandro-belleza-globant commented 4 months ago

Hi. I would like to know what is the expected timeline to release a new Chart version that includes this fix ?