1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
Commit graph

3860 commits

Author SHA1 Message Date
Charles-Edouard Brétéché
db4f7fb5e6
feat: register cel context lib (#12007)
* feat: register cel context lib

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* unit test

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-27 16:16:27 +00:00
Mariam Fahmy
b8c6931aa5
feat: add autogen package for ValidatingPolicies (#11996)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-01-27 12:36:11 +00:00
Charles-Edouard Brétéché
a5fe768a53
feat: implement cel engine context provider (#11995)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-24 15:42:58 +00:00
Mariam Fahmy
1703428ffb
chore: remove unused functions in autogen (#11993)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-01-24 12:30:11 +00:00
Charles-Edouard Brétéché
ed80be3eff
feat: add support for more context elements (#11986)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-24 08:37:33 +00:00
Johann Schley
02c54490bc
Fix default value for apiCall context (#11733)
* chore(deps): bump golang.org/x/crypto from 0.29.0 to 0.30.0 (#11712)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.30.0.
- [Commits](https://github.com/golang/crypto/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Johann Schley <johann.schley@swisscom.com>

* add test for apiCall default value

Signed-off-by: Johann Schley <johann.schley@swisscom.com>

* move fallback to default into fetch function

Signed-off-by: Johann Schley <johann.schley@swisscom.com>

* Update pkg/engine/apicall/apiCall.go

improved log message text

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: Johann Schley <johann.schley@swisscom.com>

* Update pkg/engine/apicall/apiCall.go

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: Johann Schley <johann.schley@swisscom.com>

* address comments

Signed-off-by: Johann Schley <johann.schley@swisscom.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Johann Schley <johann.schley@swisscom.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Johann Schley <johann.schley@swisscom.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2025-01-24 04:54:32 +00:00
Charles-Edouard Brétéché
144bf436ed
fix: implement cel context lib correctly (#11983)
* fix: implement cel context lib correctly

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* more changes

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-23 11:02:33 +00:00
Charles-Edouard Brétéché
f5467fcd61
refactor: reduce generic policy interface (#11977)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-22 16:32:30 +00:00
Charles-Edouard Brétéché
61d69c9290
refactor: reduce generic policy interface (#11974)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-22 09:03:48 +00:00
Charles-Edouard Brétéché
9d11e8f98c
feat: introduce evaluation results in cel engine (#11971)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-21 16:41:45 +00:00
Charles-Edouard Brétéché
54a8a53205
feat: add validating policy engine api wrapper (#11963)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-21 15:59:34 +08:00
Charles-Edouard Brétéché
a30fc14d4d
feat: add namespace support in CLI values (#11958)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-20 13:43:13 +02:00
Charles-Edouard Brétéché
5cc408dddb
feat: use policy provider (#11947)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-20 09:43:05 +00:00
Mariam Fahmy
77a7e5193a
feat: add MAP's mutation logic for the CLI (#11946)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-01-17 15:16:34 +00:00
Charles-Edouard Brétéché
7351501ef6
feat(cli,apply): load validating policies (#11933)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-17 09:53:17 +00:00
shuting
97ed53f6bb
feat: register webhook configurations for validatingpolicies (#11892)
* feat: add spec.webhookConfiguration

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: refactor build webhook for kyverno policies

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update yamls

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: add listers

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* feat: update api

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: remove matchPolicy

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update crd yaml

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: add short name

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update deepcopy

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: upadte spec

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: fix description

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: add missing files

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* feat: register webhook for validatingpolicies

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: fix import

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: add unit tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update docs

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update manifests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update unit tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update manifests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

---------

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2025-01-17 11:33:47 +02:00
abhashsolanki18
d2e6759115
fix:[Bug] [CLI] CEL scanning a namespace yaml object makes Kyverno crash (#11834)
* fix:[Bug] [CLI] CEL scanning a namespace yaml object makes Kyverno crash

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

* Fix nil pointer dereference in namespace handling for ValidatingAdmissionPolicy.

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

* added test for namespace resource

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

* fixed test

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

* fixed test

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

* fixed test, combined binding and policy

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>

---------

Signed-off-by: abhashsolanki18 <abhashsolanki18@gmail.com>
2025-01-16 13:39:24 +00:00
Mariam Fahmy
a72868bd6f
chore: move CEL package to admissionpolicy package (#11931)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-01-15 13:04:18 +00:00
Frank Jogeleit
c0d7df709a
Implement Object type checking based on OpenAPI v3 schema (#11919)
* Implement Object type checking based on OpenAPI v3 schema

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>

* Fix conflicting resource name

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>

* make typeName an configurable argument

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>

---------

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-14 15:36:09 +00:00
Charles-Edouard Brétéché
6af7ab8905
feat: add CEL variables type checking (#11920)
* feat: add CEL variables support

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: add CEL variables type checking

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* more types

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* provider

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-14 15:57:55 +01:00
Mariam Fahmy
4678078c3d
feat: add auditAnnotation in CEL Compiler (#11918)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-01-14 13:16:29 +00:00
Charles-Edouard Brétéché
9177c57b21
feat: add CEL variables support (#11913)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-14 09:41:18 +00:00
Charles-Edouard Brétéché
616cb93bc4
feat: add validating policy compiler (#11906)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-13 13:56:36 +01:00
Charles-Edouard Brétéché
bdc55fbc93
feat: add context cel lib to get config map (#11898)
* feat: add context cel lib to get config map

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* function name

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix type

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-10 14:19:50 +00:00
Frank Jogeleit
032d428b12
feat: setup validating policy cel environment (#11897)
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2025-01-10 13:54:04 +00:00
Charles-Edouard Brétéché
4e84edff68
feat: add support for loading validating policies in the cli (#11883)
* feat: add support for loading validating policies in the cli

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* copy data

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* legacy loader

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-10 10:43:48 +00:00
Charles-Edouard Brétéché
1d03b932a4
refactor: get policy helper (#11891)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2025-01-10 09:30:54 +00:00
Charles-Edouard Brétéché
8be679cdfb
feat: bump kube deps to 1.32 (#11877) 2025-01-09 19:51:43 +08:00
Charles-Edouard Brétéché
47e99166a5
feat: add kyverno vap API (#11790)
* feat: add kyverno vap API

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* add context lib

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2025-01-08 15:56:36 +00:00
Damien Degois
c282f71212
remove policy exception dependancy from globalcontext and add some tests (#11788)
Signed-off-by: Damien Degois <damien@degois.info>
Co-authored-by: shuting <shuting@nirmata.com>
2025-01-03 16:16:37 +00:00
Damien Degois
e0fe6ec59a
fix global context error message logic error (#11815)
following same file line 91 and github.com/kyverno/kyverno/pkg/globalcontext/store#35

the proper handling should be `!ok`

Signed-off-by: Damien Degois <damien@degois.info>
Co-authored-by: shuting <shuting@nirmata.com>
2025-01-03 11:47:07 +00:00
Sandesh More
37c73f9314
Fix: Policy with failureActionOverrides not applying desired failure actions in desired namespaces (#11811)
Signed-off-by: Sandesh More <sandesh.more@infracloud.io>
Co-authored-by: sandesh more <samore@purestorage.com>
2025-01-03 10:50:49 +00:00
Mohd Uzair
d84fc7b4e1
fix panic when rules are empty (#11821)
Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2025-01-03 09:51:44 +00:00
Rokibul Hasan
5573e5cded
Fix panic in background controller when updating Generate rule (#11835)
Signed-off-by: Rokibul Hasan <mdrokibulhasan@appscode.com>
2025-01-03 08:45:06 +00:00
Vishal Choudhary
58ac348f3d
fix: copy all the fields of public keys when splitting (#11770)
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-12-20 08:28:17 +00:00
Ammar Yasser
739e6a21c4
Mutate existing CLI support (#11453)
* feat: Add flags for target resources and add fake client initialization

Signed-off-by: aerosouund <aerosound161@gmail.com>

* feat: Add fake discovery client and cluster bool in the policy processor

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Use the full mutation engine policy response in the engine response

Signed-off-by: aerosouund <aerosound161@gmail.com>

* feat: Extract mutated targets from the policy responses and print them out

Signed-off-by: aerosouund <aerosound161@gmail.com>

* feat: Add TargetResources field in the cli test schema

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Generate CLI crds

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: modify checkResult to take an arbitrary actual resource and resource name

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: change getAndCompareResource to take a resource name and cascade it to GetResourceFromPath

Signed-off-by: aerosouund <aerosound161@gmail.com>

* test: Create a simple test to test mutate existing in the CLI

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Allow GetResourceFromPath to select a resource with a name from a multi resource yaml

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Modify the runTest command to return the TestResponse type

- Create a fake client, load the target resources in it and use it in the PolicyProcessor.
- Create the TestResponse which contains Trigger and Target fields, each is a map of gvk/name to the responses corresponding to that resource.

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Rewrite output.go to use the TestResponse type

- Check for both target and trigger
- Create logic for appending the resource array in case no resources are passed
- Move row creation logic into a separate method to avoid code duplication
- Extract the proper target resource based on rule type
- Create a function to extract mutated target from the engine response

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Move tests to the correct folder

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Use apiVersion/Kind/Name as the key in the test responses

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Use the apiVersion/Kind/name key schema in checking results and fix invalid resource name checking for generate policies

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Use better variable names for rows

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Account for Generate resources being an array

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Use generated resource name in checking the results and printing output

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Uncomment checks printing

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Remove bug in engine response creation

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Move the generate logic into an else block

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Fix namespace fetching bug in cel validator

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Use pointer to int in the test counter

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Remove redundant method

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Skip resources not being found in the manifests

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Create another field in the engine to denote if this is a cluster engine or an offline engine

Simply checking for the client being nil is no longer enough because for cli operations the client will be a fake client
A pointer to bool is chosen because callers who don't necessarily know what to pass should be able to pass nil

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: Add extra argument in fake client initiation

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: add extra argument in fuzz test

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: Add extra arg

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: Handle resources specified as ns/name as this schema will be deprecated in favor of apiVersion/Kind/Name

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: Fix linter complaints

Signed-off-by: ammar <ammar.yasser@vodafone.com>

* fix: Use comma separation as array separators as kubernetes names don't support commas

To avoid undefined array length on splitting on /
using commas will result in a fixed length since all resources will have an apiVersion, kind, namespace and name

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Change resource array type to an array of any instead of array of string

To support the use of a string or a TestResourceSpec

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Expect the resource array to be an array of string or array of TestResourceSpec

Assert that an array element is either of these types and match the resources in both cases according to the element type
Expect that the key in responses is now separated by commas instead of slashes

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Expect that the resource array is now of type array of any and modify tests that use it

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Skip response check if the policy name isnt whats in the result

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Match the name if its specified as ns/name

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Fix linter complaint

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Run codegen

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Create CLI CRDs

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Run codegen

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Fix linter complaints

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Cleanup invalid code used in FixTest to adapt it to the schema changes

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Check if resource is nil before extracting

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: use the loadResources method to open targets in a directory

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Account for target resources with the same name but different namespaces

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Add CLI test for mutate existing with the same name

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Infer resource name and namespace from the actual resource and account for resources with the same name and namespace but different kinds

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: remove extra line

Signed-off-by: aerosouund <aerosound161@gmail.com>

* feat: Add printing mutate existing resources to the output or to a file

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Minor fixes

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: fix linter complaint

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: codegen

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Revert result back to error

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Use io discard to not print resources in the test command

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Update vague comments and remove outdated ones

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Integrate mutate existing changes with diff generation

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Move resource key generation into a function

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Add a mutate existing test that fails

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: fix linter complaint

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Remove redundant comment

Signed-off-by: aerosouund <aerosound161@gmail.com>

* refactor: Fix array of any assignment in cli test

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Dont check duplicate strings for field that is an array of any

Signed-off-by: aerosouund <aerosound161@gmail.com>

* bug: Fix appending to the wrong array

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: run fix tests

Signed-off-by: aerosouund <aerosound161@gmail.com>

* chore: Run fix tests

Signed-off-by: aerosouund <aerosound161@gmail.com>

---------

Signed-off-by: aerosouund <aerosound161@gmail.com>
Signed-off-by: ammar <ammar.yasser@vodafone.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>
Co-authored-by: ammar <ammar.yasser@vodafone.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-12-19 07:42:54 +00:00
Liang Deng
e9704e7d8f
fix: exemption error caused by convertChecks function (#11780)
Signed-off-by: Liang Deng <ytdengliang@gmail.com>
2024-12-18 13:46:18 +00:00
Mohd Kamaal
e771896541
distributed labels in group, version, and resource so it doesn't exceed (#11620)
* change label to hash if exceed 63 limit char

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>

* Distribute GVR labels into 'group', 'version', and 'resource' to avoid exceeding character limits

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>

---------

Signed-off-by: Mohd Kamaal <mohdkamaal2019@gmail.com>
Co-authored-by: Kamaal <kamaal@macs-MacBook-Air.local>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-12-16 10:36:34 +05:30
Vishal Choudhary
174534b518
fix: properly verify precondition in old object validation (#11644)
* fix: properly verify precondition in old object validation

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

* fix: tests

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

* fix: assert bug

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

* fix: properly update the values

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

---------

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-12-04 06:32:12 +00:00
Meet Soni
cf5a5b12ae
feat: add/improve error logs (#11657)
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
2024-11-25 13:37:43 +00:00
Charles-Edouard Brétéché
be4705faa3
fix: use deleteOptions in cleanup controller (#11662)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-11-25 16:18:58 +05:30
Ammar Yasser
d61f87e0f9
Context vars with labelselector (#11608)
* refactor: Treat all of the target spec as a single object while replacing variables

Serialize it into a map string interface then back to a target seletor before returning

Signed-off-by: aerosouund <aerosound161@gmail.com>

* test: Add scenario for variables in the label selector test

Signed-off-by: aerosouund <aerosound161@gmail.com>

* Fix: Capitalize error message

Co-authored-by: shuting <shuting@nirmata.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>

* Fix: Adjust error message specification to mention target rather than selector

Co-authored-by: shuting <shuting@nirmata.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>

* fix: Pass the target selector only during variable replacement

Signed-off-by: aerosouund <aerosound161@gmail.com>

---------

Signed-off-by: aerosouund <aerosound161@gmail.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-11-20 10:36:55 +00:00
Nishanth Reddy
95baeaa4e9
fix: return nil error when trigger resource not found for a subresouces (#11594)
* fix: return nil error when trigger resource not found for a subresource kind

Signed-off-by: Nishanth Reddy <nishanth.reddy@doordash.com>

* chore(deps): bump codecov/codecov-action from 4.6.0 to 5.0.0 (#11597)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](b9fd7d16f6...968872560f)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump sigs.k8s.io/structured-merge-diff/v4 (#11596)

Bumps [sigs.k8s.io/structured-merge-diff/v4](https://github.com/kubernetes-sigs/structured-merge-diff) from 4.4.1 to 4.4.3.
- [Release notes](https://github.com/kubernetes-sigs/structured-merge-diff/releases)
- [Changelog](https://github.com/kubernetes-sigs/structured-merge-diff/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/structured-merge-diff/compare/v4.4.1...v4.4.3)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/structured-merge-diff/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: use generate name for background scan reports (#11586)

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>

* chore(deps): bump github/codeql-action from 3.27.3 to 3.27.4 (#11598)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.3 to 3.27.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](396bb3e453...ea9e4e3799)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(ci): test upgrade conformance (#11498)

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>

* add chainsaw tests

* add kubectl-evict to githubpath

* add readme

---------

Signed-off-by: Nishanth Reddy <nishanth.reddy@doordash.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Khaled Emara <khaled.emara@nirmata.com>
2024-11-20 15:41:06 +08:00
Shivam Kumar
30d475aaae
Passed the deleteOptions to the DeleteResource client (#11484)
* Passed the deleteOptions to the DeleteResource client

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

* fix:minor change in the DeleteResource client

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>

---------

Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-11-19 09:26:17 +00:00
Frederic M
5e79e5044a
fix(background-controller): reduce logging for URs (#11616)
Signed-off-by: Frederic Mereu <frederic.mereu@gaming1.com>
2024-11-18 13:22:26 +00:00
Vishal Choudhary
c1f8b2ed96
fix: use generate name for background scan reports (#11586)
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-11-15 09:37:31 +00:00
Vishal Choudhary
bf83f37984
fix: add a check for nil rule response (#11591) 2024-11-14 15:13:23 +00:00
Tomas Aschan
07f5e9be08
Add missing error check (#11587)
Signed-off-by: Tomas Aschan <tomasl@spotify.com>
2024-11-14 13:37:53 +00:00
Netanel Kadosh
cef7be1fdc
feat: Add Manifest Index to ImageRegistry context (#9883)
* feat: Add Manifest Index to ImageRegistry context

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>

* test: adding manifest list tests

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>

---------

Signed-off-by: Netanel Kadosh <kadoshnetanel@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-11-14 08:10:25 +00:00
shuting
244dbe19cf
fix: update explicit webhook based on the policy type (#11580)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-11-13 21:09:36 +05:30