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