1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
Commit graph

7443 commits

Author SHA1 Message Date
dependabot[bot]
d068cd471f
chore(deps): bump cbrgm/cleanup-stale-branches-action (#10620)
Bumps [cbrgm/cleanup-stale-branches-action](https://github.com/cbrgm/cleanup-stale-branches-action) from 1.1.17 to 1.1.18.
- [Release notes](https://github.com/cbrgm/cleanup-stale-branches-action/releases)
- [Commits](6a9aa7a9b0...d0f8b6440d)

---
updated-dependencies:
- dependency-name: cbrgm/cleanup-stale-branches-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>
2024-07-08 18:45:31 +08:00
Khaled Emara
aafc4fe97e
fix(json-ctx): overwrite element each iteration (#10615)
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-07-05 15:06:48 +00:00
Charles-Edouard Brétéché
ff192f3dc3
feat: don't rely on events unicity in resource counters (#10613)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-07-05 12:33:45 +02:00
Charles-Edouard Brétéché
13fc9881d5
fix: detect watcher not running (#10610)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-07-05 12:57:06 +05:30
Mariam Fahmy
ad6ee93e3b
fix: CEL policies aren't applied to deleted resources (#10611)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 22:16:36 +05:30
Charles-Edouard Brétéché
1647675190
feat: improve api json parsing (#10600)
* feat: improve api json parsing

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

* fix

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: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 16:05:42 +02:00
Khaled Emara
c2a9e9ef69
feat(events): normalize gctx events reason to be inline with other po… (#10395)
* feat(events): normalize gctx events reason to be inline with other policies

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

* chore(events): hide queue limit messages at a higher level

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

* test(gctx): add factory test

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

---------

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 16:12:48 +03:00
dependabot[bot]
a19602d80f
chore(deps): bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#10608)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  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>
2024-07-04 09:23:49 +00:00
Charles-Edouard Brétéché
56e58d684d
feat: remove reports chunking (#10597)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-07-04 08:10:16 +00:00
dependabot[bot]
d5d9d9c17a
chore(deps): bump sigstore/scaffolding from 0.7.2 to 0.7.3 (#10601)
Bumps [sigstore/scaffolding](https://github.com/sigstore/scaffolding) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/sigstore/scaffolding/releases)
- [Changelog](https://github.com/sigstore/scaffolding/blob/main/release.md)
- [Commits](fb8d1817d2...bfc40f4d3a)

---
updated-dependencies:
- dependency-name: sigstore/scaffolding
  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>
2024-07-04 07:19:58 +00:00
Charles-Edouard Brétéché
fed71ffaf6
feat: make reports breaker threshold configurable (#10596)
* feat: make reports breaker threshold configurable

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

* lower default threshold

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

* release notes

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-07-03 14:44:28 +00:00
dependabot[bot]
c51bf9716f
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#10578)
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions) from 3.0.9 to 3.0.10.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases)
- [Commits](74606c3045...b88cd0aad2)

---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
  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>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-03 08:49:20 +00:00
dependabot[bot]
5fad30b58e
chore(deps): bump github.com/fluxcd/pkg/oci from 0.38.0 to 0.38.1 (#10591)
Bumps [github.com/fluxcd/pkg/oci](https://github.com/fluxcd/pkg) from 0.38.0 to 0.38.1.
- [Commits](https://github.com/fluxcd/pkg/compare/oci/v0.38.0...oci/v0.38.1)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/pkg/oci
  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>
2024-07-03 07:51:44 +00:00
Chetan Deshmukh
915d8b5eb5
updating adopters list - adding InfraCloud (#10577)
* fix: include error message when policy context creation failed (#10566)

* fix: include error message when policy context creation failed

Signed-off-by: airycanon <airycanon@airycanon.me>

* Update pkg/webhooks/resource/validation/validation.go

Co-authored-by: shuting <shuting@nirmata.com>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>

---------

Signed-off-by: airycanon <airycanon@airycanon.me>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>
Co-authored-by: shuting <shuting@nirmata.com>

updating adopters list - adding InfraCloud

Signed-off-by: Chetan Deshmukh cdeshmukh@infracloud.io

made minor text change

Signed-off-by: Chetan Deshmukh <cdeshmukh@infracloud.io>

made minor text change

Signed-off-by: Chetan Deshmukh <cdeshmukh@infracloud.io>

* updating adopters list - adding InfraCloud

Signed-off-by: Chetan Deshmukh cdeshmukh@infracloud.io
Signed-off-by: Chetan Deshmukh <cdeshmukh@infracloud.io>

* made minor text change

Signed-off-by: Chetan Deshmukh <cdeshmukh@infracloud.io>

---------

Signed-off-by: Chetan Deshmukh <cdeshmukh@infracloud.io>
Signed-off-by: Chetan Deshmukh cdeshmukh@infracloud.io
Co-authored-by: Yukun Wang <airycanon@airycanon.me>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-03 05:28:18 +00:00
Mariam Fahmy
a46f1eb48c
fix: failed to delete resource (#10582)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-02 19:54:27 +00:00
Mariam Fahmy
f738b027c3
fix: cleanup policy name is appended to logs (#10583)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-02 16:32:51 +00:00
Vishal Choudhary
d57edc8530
feat: fix notary tests (#10579)
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-07-02 14:18:29 +00:00
Yukun Wang
8890fffafb
fix: include error message when policy context creation failed (#10566)
* fix: include error message when policy context creation failed

Signed-off-by: airycanon <airycanon@airycanon.me>

* Update pkg/webhooks/resource/validation/validation.go

Co-authored-by: shuting <shuting@nirmata.com>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>

---------

Signed-off-by: airycanon <airycanon@airycanon.me>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-01 13:29:11 +00:00
dependabot[bot]
3c771fba23
chore(deps): bump github/codeql-action from 3.25.10 to 3.25.11 (#10570)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.10 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](23acc5c183...b611370bb5)

---
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>
2024-07-01 09:32:26 +00:00
Mariam Fahmy
68df5af40e
fix rule type for mutate and generate rules (#10554)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-28 16:40:56 +00:00
Husni Alhamdani
52ec560ffb
move mutate existing rule skipped log to v4 (#10560)
Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>
2024-06-28 12:08:46 +08:00
shuting
3df3515705
feat: add 1.12.4 to issue templates (#10557)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-06-27 12:11:08 +00:00
Charles-Edouard Brétéché
1a02b70a1c
feat: make any struct common to all api versions (#10553)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-27 10:09:57 +00:00
Charles-Edouard Brétéché
6f4818d724
feat: rework conditions marshaling (#10550)
* feat: rework conditions marshaling

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>

* codegen

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

* tests

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-27 10:00:02 +03:00
Mariam Fahmy
418bf25659
feat: add chainsaw tests for validate policies (part 3) (#10546)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-26 14:07:03 +00:00
Mariam Fahmy
565f4b5427
feat: add chainsaw tests for validate policies (part 2) (#10545)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-26 11:37:32 +00:00
Mariam Fahmy
340009f55f
feat: add chainsaw tests for validate policies (#10544)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-26 10:39:54 +00:00
Charles-Edouard Brétéché
e900abf3a0
feat: remove kyverno client v2beta1 (#10543)
* feat: remove kyverno client v2beta1

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>

* fix tests

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-26 08:48:32 +00:00
Mariam Fahmy
ff88c4c39a
feat: migrate validationFailureAction and validationFailureActionOverrides (#10528)
* feat: migrate validationFailureAction and validationFailureActionOverrides under validate rule

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

* feat: add unit tests

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-26 09:13:02 +02:00
shuting
88ae60ea9d
fix: correctly validate patterns for old and new objects (#10310)
* fix: correctly validate patterns for old and new objects

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

* test: add new scenario to the existing test

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

* fix: indention

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

* fix: chainsaw tests

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

---------

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-06-25 14:11:34 +00:00
Charles-Edouard Brétéché
28db48573a
feat: remove old reports from helm chart and disable cleanup jobs by default (#10533)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-25 13:34:26 +00:00
shuting
a70532a5e9
chore: bump Go 1.22.4 (#10534)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-06-25 10:20:27 +00:00
Husni Alhamdani
cd6988d1e2
fix: reset mutable fields orphandownstream (#10478)
* fix: reset mutable fields orphandownstream

Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>

* fix: reset mutable fields orphandownstream

Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>

* fix: reset mutable fields orphandownstream

Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>

---------

Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-06-25 09:24:35 +00:00
dependabot[bot]
122b3a36cf
chore(deps): bump kyverno/action-install-chainsaw from 0.2.4 to 0.2.5 (#10532)
Bumps [kyverno/action-install-chainsaw](https://github.com/kyverno/action-install-chainsaw) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/kyverno/action-install-chainsaw/releases)
- [Commits](dd64b5d7b2...573a9c636f)

---
updated-dependencies:
- dependency-name: kyverno/action-install-chainsaw
  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>
2024-06-25 07:33:37 +00:00
Charles-Edouard Brétéché
018d45cb29
feat: add reports circuit breaker (#10499)
* feat: add reports circuit breaker

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

* improve metrics and granularity

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-25 11:16:30 +08:00
Mariam Fahmy
94d9bbe73f
chore: use v2 clients for policy exceptions (#10530)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-24 16:36:55 +00:00
Mariam Fahmy
e892a0531e
chore: add tests that use spec.webhookConfiguration (#10526)
* chore: add tests that use spec.webhookConfiguration

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

* fix chainsaw tests

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-24 13:40:50 +00:00
Mariam Fahmy
b7bf894fe9
chore: use v2 for exceptions in chainsaw tests (#10529)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-24 11:54:57 +00:00
Yukun Wang
585aff0aca
include time and hash in build info (#10474)
Signed-off-by: airycanon <airycanon@airycanon.me>
2024-06-24 11:15:39 +00:00
dependabot[bot]
6e92066ac7
chore(deps): bump cbrgm/cleanup-stale-branches-action (#10524)
Bumps [cbrgm/cleanup-stale-branches-action](https://github.com/cbrgm/cleanup-stale-branches-action) from 1.1.16 to 1.1.17.
- [Release notes](https://github.com/cbrgm/cleanup-stale-branches-action/releases)
- [Commits](af96333d4b...6a9aa7a9b0)

---
updated-dependencies:
- dependency-name: cbrgm/cleanup-stale-branches-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>
2024-06-24 07:50:43 +00:00
Mariam Fahmy
abe2a2310b
feat: migrate webhookTimeoutSeconds and failurePolicy (#10515)
* feat: migrate webhookTimeoutSeconds and failurePolicy

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

* fix lint issue

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-20 13:04:37 +00:00
dependabot[bot]
692014f21c
chore(deps): bump github.com/fluxcd/pkg/oci from 0.37.1 to 0.38.0 (#10512)
Bumps [github.com/fluxcd/pkg/oci](https://github.com/fluxcd/pkg) from 0.37.1 to 0.38.0.
- [Commits](https://github.com/fluxcd/pkg/compare/oci/v0.37.1...oci/v0.38.0)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/pkg/oci
  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>
2024-06-20 11:17:19 +00:00
Mariam Fahmy
61e78fd968
chore: add tests that use spec.mutateExistingOnPolicyUpdate (#10514)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-20 10:27:42 +00:00
Charles-Edouard Brétéché
b36a2ecdcc
feat: bump update request api version (#10508)
* feat: bump update request api version

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

* use v2

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>

* codegen

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

* fix linter

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

* fix linter

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-20 09:44:43 +00:00
dependabot[bot]
4402e314c8
chore(deps): bump k8s.io/klog/v2 from 2.130.0 to 2.130.1 (#10513)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.130.0 to 2.130.1.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.130.0...v2.130.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  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>
2024-06-20 07:22:55 +00:00
Charles-Edouard Brétéché
a5254f7344
feat: remove old intermediate reports types (#10504)
* feat: remove old ephemeral reports types

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>

* helm

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

* fix

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>
2024-06-19 19:54:43 +00:00
Mariam Fahmy
88d1063647
chore: use mutateExistingOnPolicyUpdate under mutate rule in chainsaw tests (#10507)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-19 18:16:46 +02:00
Mariam Fahmy
9285006f7a
feat: add mutateExistingOnPolicyUpdate field under the mutate rule (#10461)
* fix

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

* feat: add mutateExistingOnPolicyUpdate field under the mutate rule

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-19 09:29:19 +00:00
Charles-Edouard Brétéché
6e1def1004
feat: remove v1alpha2 group/version (#10500)
* feat: remove v1alpha2 group

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>

* fix tests

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

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-19 08:08:15 +00:00
Charles-Edouard Brétéché
f349d1d541
fix: missing codegen deep copy dependency (#10501)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-19 07:20:43 +00:00