Skip to content

Commit

Permalink
fix: no ingress-class annotation on CA secretes
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
  • Loading branch information
mlavacca committed Dec 17, 2024
1 parent b0149fe commit 22af265
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,7 @@ func (s Store) ListCACerts() ([]*corev1.Secret, []*corev1.ConfigMap, error) {
err = cache.ListAll(s.stores.Secret,
labels.NewSelector().Add(*req),
func(ob interface{}) {
p, ok := ob.(*corev1.Secret)
if ok && s.isValidIngressClass(&p.ObjectMeta, annotations.IngressClassKey, s.getIngressClassHandling()) {
if p, ok := ob.(*corev1.Secret); ok {
secrets = append(secrets, p)
}
})
Expand All @@ -730,9 +729,7 @@ func (s Store) ListCACerts() ([]*corev1.Secret, []*corev1.ConfigMap, error) {
err = cache.ListAll(s.stores.ConfigMap,
labels.NewSelector().Add(*req),
func(ob interface{}) {
p, ok := ob.(*corev1.ConfigMap)
// We don't check the ingressClass here, as configmaps as CA certs are used for Gateway API BackendTLSPolicies.
if ok {
if p, ok := ob.(*corev1.ConfigMap); ok {
configMaps = append(configMaps, p)
}
})
Expand Down

0 comments on commit 22af265

Please sign in to comment.