Skip to content

Commit 61bd2f4

Browse files
committed
fix: Add Secret to ByObject label filter for defense-in-depth
Add Secret to the ByObject cache configuration with the same operator-name label filter used for other core types. While no controller currently creates a Secret informer, this prevents an unfiltered cluster-wide Secret watch if one is added in the future.
1 parent 58e9d95 commit 61bd2f4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/training-operator.v1/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func newCacheOptions(namespace string) cache.Options {
9999
&corev1.Pod{}: operatorFilter,
100100
&corev1.Service{}: operatorFilter,
101101
&corev1.ServiceAccount{}: operatorFilter,
102+
&corev1.Secret{}: operatorFilter,
102103
&rbacv1.Role{}: operatorFilter,
103104
&rbacv1.RoleBinding{}: operatorFilter,
104105
},

0 commit comments

Comments
 (0)