Skip to content

Commit 838db96

Browse files
committed
fix: remove kyverno namespace and add default users
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
1 parent c86f27d commit 838db96

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/kyverno/kyverno v1.10.2
1212
github.com/kyverno/pkg/certmanager v0.0.10
1313
github.com/kyverno/pkg/tls v0.0.9
14-
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240226100808-71a312da903f
14+
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240311051614-69198b37f3d9
1515
github.com/notaryproject/notation-core-go v1.0.2
1616
github.com/pkg/errors v0.9.1
1717
go.uber.org/zap v1.26.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,8 @@ github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240223153407-a302a950a93
10271027
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240223153407-a302a950a939/go.mod h1:LfI5AAZGleWLm5/fInN+bdv5/NukgxTPJSFCvob7Vhg=
10281028
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240226100808-71a312da903f h1:OL1hg1pzV/NK64MPZKfrasaWGg4OJzhG+/DGj94XevM=
10291029
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240226100808-71a312da903f/go.mod h1:LfI5AAZGleWLm5/fInN+bdv5/NukgxTPJSFCvob7Vhg=
1030+
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240311051614-69198b37f3d9 h1:olr9SDKzTAWUY4YcU9rCF7Z4Lpbsbo3cA4I+msW8tgM=
1031+
github.com/nirmata/kyverno-notation-verifier v1.0.2-0.20240311051614-69198b37f3d9/go.mod h1:LfI5AAZGleWLm5/fInN+bdv5/NukgxTPJSFCvob7Vhg=
10301032
github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ=
10311033
github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ=
10321034
github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE=

main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ func main() {
5959
cacheEnabled bool
6060
cacheMaxSize int64
6161
cacheTTLDuration int64
62-
kyvernoNamespace string
6362
allowedUsers string
6463
reviewKyvernoToken bool
6564
)
@@ -80,8 +79,7 @@ func main() {
8079
flag.Int64Var(&cacheMaxSize, "cacheMaxSize", 1000, "Max size limit for the TTL cache, default is 1000.")
8180
flag.Int64Var(&cacheTTLDuration, "cacheTTLDurationSeconds", int64(1*time.Hour), "Max TTL value for a cache in seconds, default is 1 hour.")
8281
flag.BoolVar(&reviewKyvernoToken, "reviewKyvernoToken", true, "Checks if the Auth token in the request is a token from kyverno controllers or other allowed users, default is true.")
83-
flag.StringVar(&kyvernoNamespace, "kyvernoNamespace", "kyverno", "Namespace where kyverno is installed, default is kyverno.")
84-
flag.StringVar(&allowedUsers, "allowedUsers", "", "Comma-seperated list of all the allowed users and service accounts.")
82+
flag.StringVar(&allowedUsers, "allowedUsers", "system:serviceaccount:kyverno:kyverno-admission-controller,system:serviceaccount:kyverno:kyverno-reports-controller", "Comma-seperated list of all the allowed users and service accounts.")
8583

8684
flag.Parse()
8785
zc := zap.NewDevelopmentConfig()
@@ -202,7 +200,6 @@ func main() {
202200
knvVerifier.WithCacheEnabled(cacheEnabled),
203201
knvVerifier.WithMaxCacheSize(cacheMaxSize),
204202
knvVerifier.WithMaxCacheTTL(time.Duration(cacheTTLDuration*int64(time.Second))),
205-
knvVerifier.WithKyvernoNamespace(kyvernoNamespace),
206203
knvVerifier.WithAllowedUsers(strings.Split(allowedUsers, ",")))
207204

208205
mux := http.NewServeMux()

0 commit comments

Comments
 (0)