Remove shared variables from ldap upstream observer

This commit is contained in:
Margo Crawford 2021-07-19 14:18:29 -07:00
parent 5d8d7246c2
commit 8e1d70562d

View File

@ -7,9 +7,7 @@ package ldapupstreamwatcher
import (
"context"
"fmt"
"time"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@ -29,8 +27,6 @@ import (
const (
ldapControllerName = "ldap-upstream-observer"
ldapBindAccountSecretType = corev1.SecretTypeBasicAuth
testLDAPConnectionTimeout = 90 * time.Second
)
type ldapUpstreamGenericLDAPImpl struct {
@ -187,7 +183,7 @@ func newInternal(
),
withInformer(
secretInformer,
pinnipedcontroller.MatchAnySecretOfTypeFilter(ldapBindAccountSecretType, pinnipedcontroller.SingletonQueue()),
pinnipedcontroller.MatchAnySecretOfTypeFilter(upstreamwatchers.LDAPBindAccountSecretType, pinnipedcontroller.SingletonQueue()),
controllerlib.InformerOption{},
),
)