Charles-Edouard Brétéché
8301453d31
chore: enable makezero linter ( #3937 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-17 07:19:25 +00:00
Prateek Pandey
8aebe3d06a
fix: handle UR delete once trigger namespace deleted ( #3934 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-05-17 06:56:12 +00:00
Charles-Edouard Brétéché
0099ef54ad
chore: enable gofmt and gofumpt linters ( #3931 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-17 06:19:03 +00:00
Charles-Edouard Brétéché
c12f94d6d4
chore: enble gci linter ( #3930 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-17 07:56:48 +02:00
Anurag
e8b1e1275a
fix: return type changed to bool in jpfCompare fn ( #3924 )
...
* return type changed to bool in jpfCompare fn
Signed-off-by: Anurag <contact.anurag7@gmail.com>
* update functions.go
Signed-off-by: Anurag <contact.anurag7@gmail.com>
* updated the commit
Signed-off-by: Anurag <contact.anurag7@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-16 21:11:43 +00:00
Charles-Edouard Brétéché
53adf904d6
refactor: separate policy cache and controller ( #3925 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 18:36:19 +02:00
Charles-Edouard Brétéché
c112aaefa1
refactor: separate resource mutation/validation handlers from server ( #3908 )
...
* refactor: webhooks server logger
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: separate policy mutation/validation handlers from server
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* separate resource mutation from server code
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 22:36:21 +08:00
Charles-Edouard Brétéché
52cc493e57
chore: enable misspell linter ( #3932 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 19:08:57 +05:30
Charles-Edouard Brétéché
d7a3ba596d
chore: enable errname linter ( #3926 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 18:51:31 +08:00
Charles-Edouard Brétéché
0bf201dba2
chore: enable decorder linter ( #3920 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-16 14:28:47 +05:30
Charles-Edouard Brétéché
70954b9995
refactor: policy cache ( #3919 )
...
* refactor: simplify policy cache
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: policy cache
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* remove update and add policies map
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: review comments
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-16 07:56:16 +00:00
Charles-Edouard Brétéché
474223dc5b
chore: enable dogsled linter ( #3921 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 08:31:41 +02:00
shuting
7d7a23e74a
Cleanup the UR for mutate policies once it's completed ( #3912 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-05-16 09:24:17 +05:30
Dhaval Shah
fce35b91d2
[Bugbash] Kceu22 bugbash/fix staticcheck warnings ( #3917 )
...
* cleanup: error string formating
Fixes Staticcheck ST1005
KubeCon EU 2022 BugBash
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* cleanup: merge var declaration with assignment
Fixes staticcheck S1021
Kubecon EU 2022 Bugbash
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* cleanup normalize yoda condition to simple compare
fixes staticcheck ST1017
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* cleanup: remove extraneous err param on executeTest
err is not used anywhere except to throw Fatal inside execureTest()
fix staticcheck SA4009
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* fix: match validation error message to actual errors
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* cleanup: more of normalize validation error messages
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
* cleanup: additional error message formatting fixes
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-14 22:04:35 +01:00
Dhaval Shah
4d0d719735
fix: gosec G304 file inclusion error ( #3916 )
...
Part of KubeCon EU 2022 Bugbash
Signed-off-by: Dhaval Shah <30974879+dhavalgshah@users.noreply.github.com>
2022-05-14 16:40:04 +00:00
Charles-Edouard Brétéché
87ac548563
refactor: separate policy mutation/validation handlers from server ( #3905 )
...
* refactor: webhooks server logger
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: separate policy mutation/validation handlers from server
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-13 07:33:20 +02:00
Charles-Edouard Brétéché
526876452e
fix: docker build ( #3907 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-12 22:24:25 +01:00
Charles-Edouard Brétéché
a5e623f939
refactor: webhooks server logger ( #3904 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-12 15:47:44 +00:00
Charles-Edouard Brétéché
97cf1b3e95
feat: gracefull certificates rotation support ( #3890 )
...
* refactor: remove deployment hash on certs secrets
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: add label on kyverno webhooks
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: implement update ca bundle
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* test: set very low validity and expiration intervals
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: writing secret
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* add renew ca
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* decouple ca and tls validity duration
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactored code, everything is in place to finalize implementation
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* use real validity periods
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-12 14:07:25 +00:00
Charles-Edouard Brétéché
c15ad0c520
chore: remove ca-certificates from our repository ( #3859 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-12 11:41:45 +00:00
Charles-Edouard Brétéché
26a5402747
chore: enable wastedassign linter ( #3898 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-12 11:03:26 +00:00
Charles-Edouard Brétéché
bd78f02510
chore: enable goprintffuncname linter ( #3899 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-12 10:12:57 +00:00
Charles-Edouard Brétéché
d64153f7eb
chore: remove unused function ( #3902 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-12 09:24:09 +00:00
shuting
bccce5d9e3
Remove permissions in helm-release workflow ( #3901 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-05-12 08:12:17 +00:00
Jim Bugwadia
36affff4b7
Timeout and init ( #3893 )
...
* increase timeout to 30s to match webhook timeout
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* initialize Fulcio roots at startup
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add TUF root
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix chart
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make helm-gen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-12 10:55:14 +08:00
Charles-Edouard Brétéché
37a5a6652f
fix: write secret ( #3891 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-11 15:46:37 +00:00
Vyankatesh Kudtarkar
31928c9507
Fix subject match selector issue in cli ( #3887 )
...
* Fix subject match selector issue in cli
* remove space
* code refactoring
2022-05-11 15:21:13 +00:00
Charles-Edouard Brétéché
8f825bb040
refactor: remove deployment hash on certs secrets ( #3886 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-11 16:58:14 +02:00
Charles-Edouard Brétéché
747f4128ef
chore: enable noctx linter ( #3888 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-11 17:34:40 +05:30
Charles-Edouard Brétéché
f67c138f54
chore: enable importas linter ( #3882 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-11 13:32:54 +02:00
Jim Bugwadia
0cd21ec0f3
skip var checks in attestations ( #3876 )
...
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-05-11 09:31:48 +00:00
Charles-Edouard Brétéché
c6a0bdd711
chore: enable gochecknoinits linter ( #3874 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-11 08:24:46 +00:00
Charles-Edouard Brétéché
c2602d8181
refactor: cleanup tls package ( #3854 )
...
* refactor: init certs with certs renewer directly
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: tls package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: cleanup tls package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-11 08:05:13 +00:00
Charles-Edouard Brétéché
d8a4c709f8
chore: enable containedctx linter ( #3873 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-11 07:42:11 +00:00
Charles-Edouard Brétéché
a32d0f8029
fix: include ca key in secret ( #3804 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-11 07:11:50 +00:00
Charles-Edouard Brétéché
2064a69b8a
refactor: make config vars private ( #3823 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-11 06:14:30 +00:00
Prateek Pandey
4d4f805d68
fix: undo length validation check for generate rule resource name ( #3865 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-11 05:08:27 +00:00
Tathagata Paul
3e826f109c
fix subjects in test cli ( #3743 )
...
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-11 04:21:00 +00:00
Charles-Edouard Brétéché
12dd0e5cc0
chore: enable exportloopref linter ( #3869 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-10 23:10:25 +00:00
Charles-Edouard Brétéché
e43d42bce3
chore: enable tenv thelper and tparallel linters ( #3868 )
...
* chore: add unconvert linter
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* chore: enable tenv thelper and tparallel linters
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 22:48:45 +00:00
Charles-Edouard Brétéché
120467fe46
chore: enable durationcheck linter ( #3870 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-10 22:27:59 +00:00
Charles-Edouard Brétéché
925436104c
chore: enable asciicheck and bidichk linters ( #3871 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-10 22:09:19 +00:00
Charles-Edouard Brétéché
f508e9a0b8
chore: add unconvert linter ( #3867 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 20:28:45 +01:00
Charles-Edouard Brétéché
97e5e64fd4
chore: enable whitespace linter ( #3864 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-10 17:01:29 +00:00
shuting
5532203091
Handle errors properly for mutate and generate on existing resources ( #3863 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-05-10 16:36:50 +00:00
Charles-Edouard Brétéché
22e85209c4
fix: remove code to load CA from kubeconfig ( #3860 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 16:12:22 +00:00
Charles-Edouard Brétéché
bfc4290285
chore: enable more linters ( #3862 )
...
* chore: enable deadcode and unused linters
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* chore: enable more linters
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 21:20:04 +05:30
Charles-Edouard Brétéché
d982ef77b3
chore: enable deadcode and unused linters ( #3861 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 17:06:48 +02:00
Charles-Edouard Brétéché
c7849f20f1
chore: increase golangci-lint timeout ( #3855 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-10 14:38:09 +00:00
Charles-Edouard Brétéché
ec2bf3b6da
refactor: init certs with certs renewer directly ( #3853 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-10 16:08:36 +02:00