* fix: limit the trigger name to a maximum of 63 characters for mutate existing rules
* fix chainsaw test
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: allow changes to preexisting resource in violation of a policy in Enforce
* fix: missing error check
* fix: tests
* nit: cleanup
* fix
* fix: update old policy context
* fix: preconditions always retured true
internal.CheckPreconditions always returned true when v.anyAllConditions, it should be populated with rule.RawAnyAllConditions when newValidator() is used to create a validator
* fix: fix chainsaw test
* fix: nit
* debug
* feat: update test
* fix: add namespace
* feat: add test for bad to good conversion
* feat: add test step
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
* fix: only block mutation when failurePolicy is set
to fail
* feat: kuttl test
* fix: add else check
* fix: update defaulting ns label policy's failure policy to be fail
based on readme, this test has nothing to do with failurePolicy and resource should not be blocked in case of ignore failurePolicy
* fix: there is another
* fix: update policy
* nit
* feat: add logs
* Update pkg/webhooks/resource/mutation/mutation.go
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: shuting <shuting@nirmata.com>
Co-authored-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: shuting <shutting06@gmail.com>
* fix: update KeysAreMissing() to ignore negations in resource
KeysAreMissing() checks if a key is missing in a resource, since a negation should not be present in the resource, it should not count as a missing key
* feat: add tests
* fix: pod is supposed to fail
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
* feat: add checks for max response size in API Call GET request
* fix: tests
* fix: added changes suggested by jim
* cleanup
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
This reverts commit 590dce5830.
This will ensure servicemonitor can be enabled with ArgoCD which doesn't support querying API capabilities
Fixes#8891
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
Co-authored-by: treydock <tdockendorf@osc.edu>
Co-authored-by: shuting <shuting@nirmata.com>
* fix: generate label resource name character length issue
* add source label
* modify newUR function
* fix
* improve readability
* remove generate source name label
* Revert changes
* update ResourceSpec
* add URGenerateResourceUIDLabel
* make codegen crds all
* make codegen client all
* add GenerateSourceUIDLabel
* modify comment
* make codegen crds all
* make codegen-docs-all
* make codegen-all
* set trigger uid
* add uid in transform()
* add name label
* fix: use resource name labels along with its UID
* fix: use the resource name label only if its uid label isn't set
* fix
* add kuttl tests
* fix: delete the trigger resource in the test
* fix: delete the source in the kuttl test
* add generate trigger uid label
* modify TriggerInfo function
* populate uid field for new update requests
* populate new ur spec with uid
* handle downstream resources cleanup
* populate uid of ur status
* fetch triggers by the UID label
* label triggers
* fetch trigger by comparing UID
* fetch cloneList downstream resource by UID
* update test names
* remove trigger name label assertions from kuttl tests
* add unit name selector
* add sleep
* assert events on failures
* rename tests
---------
Signed-off-by: Chandan-DK <chandandk468@gmail.com>
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Signed-off-by: shuting <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Chandan-DK <chandandk468@gmail.com>
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
* fix: display a message when the controller has no permissions for VAPs
* fix: add a warning when a Kyverno policy is created
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>