Skip to content

Commit

Permalink
chore(deps): vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed Dec 12, 2018
1 parent c08113d commit 056e33e
Show file tree
Hide file tree
Showing 25 changed files with 11,538 additions and 10,586 deletions.
17 changes: 6 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,18 @@ require (
github.com/ugorji/go v1.1.1 // indirect
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7 // indirect
golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13 // indirect
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
golang.org/x/tools v0.0.0-20181207222222-4c874b978acb // indirect
google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e // indirect
google.golang.org/grpc v1.16.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
google.golang.org/grpc v1.16.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3 // indirect
k8s.io/api v0.0.0-20180904230853-4e7be11eab3f
k8s.io/apiextensions-apiserver v0.0.0-20180905004947-16750353bf97
k8s.io/apimachinery v0.0.0-20181126123124-70adfbae261e
k8s.io/api v0.0.0-20181203235848-2dd39edadc55
k8s.io/apiextensions-apiserver v0.0.0-20181204003618-e419c5771cdc
k8s.io/apimachinery v0.0.0-20181203235515-3d8ee2261517
k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170
k8s.io/client-go v8.0.0+incompatible
k8s.io/code-generator v0.0.0-20180904193909-8c97d6ab64da
k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3
k8s.io/gengo v0.0.0-20181106084056-51747d6e00da // indirect
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92 // indirect
k8s.io/kube-aggregator v0.0.0-20181201191901-6466d3c7f6e4
k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429
k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd
k8s.io/kubernetes v1.11.6-beta.0.0.20181126160157-5933b9771b71
k8s.io/kubernetes v1.11.6-beta.0.0.20181212102158-c4240ecfddd7
)
45 changes: 35 additions & 10 deletions go.sum

Large diffs are not rendered by default.

29 changes: 13 additions & 16 deletions pkg/controller/operators/catalog/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"

"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"

"github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client"
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
Expand All @@ -45,21 +43,21 @@ const (
roleBindingKind = "RoleBinding"
)

//for test stubbing and for ensuring standardization of timezones to UTC
// for test stubbing and for ensuring standardization of timezones to UTC
var timeNow = func() metav1.Time { return metav1.NewTime(time.Now().UTC()) }

// Operator represents a Kubernetes operator that executes InstallPlans by
// resolving dependencies in a catalog.
type Operator struct {
*queueinformer.Operator
client versioned.Interface
lister operatorlister.OperatorLister
namespace string
sources map[registry.ResourceKey]registry.Source
sourcesLock sync.RWMutex
sourcesLastUpdate metav1.Time
dependencyResolver resolver.DependencyResolver
subQueue workqueue.RateLimitingInterface
client versioned.Interface
lister operatorlister.OperatorLister
namespace string
sources map[registry.ResourceKey]registry.Source
sourcesLock sync.RWMutex
sourcesLastUpdate metav1.Time
dependencyResolver resolver.DependencyResolver
subQueue workqueue.RateLimitingInterface
catSrcQueue workqueue.RateLimitingInterface
configmapRegistryReconciler *registry.ConfigMapRegistryReconciler
}
Expand Down Expand Up @@ -109,7 +107,6 @@ func NewOperator(kubeconfigPath string, logger *logrus.Logger, wakeupInterval ti
client: crClient,
lister: lister,
namespace: operatorNamespace,
lister: operatorlister.NewLister(),
sources: make(map[registry.ResourceKey]registry.Source),
dependencyResolver: &resolver.MultiSourceResolver{},
}
Expand Down Expand Up @@ -282,7 +279,7 @@ func (o *Operator) syncCatalogSources(obj interface{}) (syncError error) {
})

if catsrc.Spec.SourceType == v1alpha1.SourceTypeInternal || catsrc.Spec.SourceType == v1alpha1.SourceTypeConfigmap {
return o.syncConfigMapSource(logger.Logger, catsrc)
return o.syncConfigMapSource(logger, catsrc)
}

logger.WithField("sourceType", catsrc.Spec.SourceType).Warn("unknown source type")
Expand All @@ -292,7 +289,7 @@ func (o *Operator) syncCatalogSources(obj interface{}) (syncError error) {
return nil
}

func (o *Operator) syncConfigMapSource(logger *logrus.Logger, catsrc *v1alpha1.CatalogSource) (syncError error) {
func (o *Operator) syncConfigMapSource(logger *logrus.Entry, catsrc *v1alpha1.CatalogSource) (syncError error) {

// Get the catalog source's config map
configMap, err := o.lister.CoreV1().ConfigMapLister().ConfigMaps(catsrc.GetNamespace()).Get(catsrc.Spec.ConfigMap)
Expand Down Expand Up @@ -365,7 +362,7 @@ func (o *Operator) syncConfigMapSource(logger *logrus.Logger, catsrc *v1alpha1.C
return nil
}

logger := logrus.WithFields(logrus.Fields{"catalogSource": out.GetName(), "catalogNamespace": out.GetNamespace()})
logger = logger.WithFields(logrus.Fields{"catalogSource": catsrc.GetName(), "catalogNamespace": catsrc.GetNamespace()})

// Sync any dependent Subscriptions
subs, err := o.lister.OperatorsV1alpha1().SubscriptionLister().List(labels.Everything())
Expand All @@ -381,7 +378,7 @@ func (o *Operator) syncConfigMapSource(logger *logrus.Logger, catsrc *v1alpha1.C
catalogNamespace = o.namespace
}
subLogger.Debug("checking subscription")
if sub.Spec.CatalogSource == out.GetName() && catalogNamespace == out.GetNamespace() {
if sub.Spec.CatalogSource == catsrc.GetName() && catalogNamespace == catsrc.GetNamespace() {
logger.Debug("requeueing subscription")
o.requeueSubscription(sub.GetName(), sub.GetNamespace())
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/controller/operators/catalog/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func NewFakeOperator(clientObjs []runtime.Object, k8sObjs []runtime.Object, extO
configMapInformer := informerFactory.Core().V1().ConfigMaps()
subscriptionInformer := externalversions.NewSharedInformerFactoryWithOptions(clientFake, wakeupInterval, externalversions.WithNamespace(namespace)).Operators().V1alpha1().Subscriptions()

// register informers
// register informers
registryInformers := []cache.SharedIndexInformer{
roleInformer.Informer(),
roleBindingInformer.Informer(),
Expand All @@ -446,7 +446,7 @@ func NewFakeOperator(clientObjs []runtime.Object, k8sObjs []runtime.Object, extO
configMapInformer.Informer(),
subscriptionInformer.Informer(),
}

// register listers
lister := operatorlister.NewLister()
lister.RbacV1().RegisterRoleLister(namespace, roleInformer.Lister())
Expand Down Expand Up @@ -478,14 +478,14 @@ func NewFakeOperator(clientObjs []runtime.Object, k8sObjs []runtime.Object, extO
for _, informer := range registryInformers {
op.RegisterInformer(informer)
hasSyncedCheckFns = append(hasSyncedCheckFns, informer.HasSynced)
go informer.Run(stopc)
go informer.Run(stopCh)
}

if ok := cache.WaitForCacheSync(stopc, hasSyncedCheckFns...); !ok {
return nil, fmt.Errorf("failed to wait for caches to sync")
if ok := cache.WaitForCacheSync(stopCh, hasSyncedCheckFns...); !ok {
return nil, nil, fmt.Errorf("failed to wait for caches to sync")
}

return op, nil
return op, hasSyncedCheckFns, nil
}

func installPlan(names ...string) v1alpha1.InstallPlan {
Expand Down
5 changes: 1 addition & 4 deletions test/e2e/csv_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func TestCreateCSVRequirementsMetCRD(t *testing.T) {
_, err = c.CreateClusterRoleBinding(&nonResourceClusterRoleBinding)
require.NoError(t, err, "could not create ClusterRoleBinding")

cleanupCSV, err := createCSV(t, c, crc, csv, testNamespace, true, false)
cleanupCSV, err = createCSV(t, c, crc, csv, testNamespace, true, false)
require.NoError(t, err)
defer cleanupCSV()

Expand All @@ -752,9 +752,6 @@ func TestCreateCSVRequirementsMetCRD(t *testing.T) {
})
require.NoError(t, err)

fetchedCSV, err := fetchCSV(t, crc, csv.Name, csvSucceededChecker)
require.NoError(t, err)

fetchedCSV, err = fetchCSV(t, crc, csv.Name, csvSucceededChecker)
require.NoError(t, err)

Expand Down
54 changes: 32 additions & 22 deletions vendor/golang.org/x/tools/go/ast/astutil/imports.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 056e33e

Please sign in to comment.