Skip to content

Commit

Permalink
Merge pull request operator-framework#960 from dinhxuanvu/relatedobjects
Browse files Browse the repository at this point in the history
Bug 1717636: Add relatedObjects to cluster operator status
  • Loading branch information
openshift-merge-robot authored and alecmerdler committed Aug 14, 2019
2 parents c59f9b4 + 6bfe15f commit 07fa728
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func main() {
<-op.Ready()

if *writeStatusName != "" {
operatorstatus.MonitorClusterStatus(*writeStatusName, op.AtLevel(), op.Done(), opClient, configClient)
operatorstatus.MonitorClusterStatus(*writeStatusName, *catalogNamespace, op.AtLevel(), op.Done(), opClient, configClient)
}

<-op.Done()
Expand Down
2 changes: 1 addition & 1 deletion cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func main() {
<-op.Ready()

if *writeStatusName != "" {
operatorstatus.MonitorClusterStatus(*writeStatusName, op.AtLevel(), ctx.Done(), opClient, configClient)
operatorstatus.MonitorClusterStatus(*writeStatusName, *namespace, op.AtLevel(), ctx.Done(), opClient, configClient)
}

if *writePackageServerStatusName != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
- ""
resources:
- configmaps
- namespaces
verbs:
- get
- list
Expand Down
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/go-openapi/spec v0.19.2
github.com/go-openapi/validate v0.19.2 // indirect
github.com/gogo/protobuf v1.2.0 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/mock v1.3.1
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.9.4 // indirect
github.com/json-iterator/go v1.1.6 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.1
github.com/mitchellh/hashstructure v1.0.0
Expand All @@ -60,14 +57,14 @@ require (
k8s.io/apiextensions-apiserver v0.0.0-20181204003618-e419c5771cdc
k8s.io/apimachinery v0.0.0-20190717022731-0bb8574e0887
k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170
k8s.io/client-go v8.0.0+incompatible
k8s.io/client-go v11.0.0+incompatible
k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3
k8s.io/component-base v0.0.0-20190717023551-b4f50308a616
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a // indirect
k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429
k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd
k8s.io/kube-openapi v0.0.0-20190510232812-a01b7d5d6c22
k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2
k8s.io/utils v0.0.0-20190712204705-3dccf664f023 // indirect
sigs.k8s.io/kind v0.4.0 // indirect
sigs.k8s.io/structured-merge-diff v0.0.0-00010101000000-000000000000 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6 h1:V
github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ=
github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
Expand Down Expand Up @@ -104,6 +105,7 @@ github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
Expand All @@ -125,6 +127,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -189,6 +193,7 @@ github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
Expand Down Expand Up @@ -286,6 +291,7 @@ github.com/sclevine/spec v1.2.0 h1:1Jwdf9jSfDl9NVmt8ndHqbTZ7XCCPbh1jI3hkDBHVYA=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
Expand Down Expand Up @@ -356,6 +362,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53 h1:kcXqo9vE6fsZY5X5Rd7R1l7fTgnWaDCVmln65REefiE=
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190514140710-3ec191127204/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -390,6 +397,7 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down Expand Up @@ -471,6 +479,10 @@ k8s.io/kubernetes v1.14.5-beta.0.0.20190708100021-7936da50c68f/go.mod h1:ocZa8+6
k8s.io/utils v0.0.0-20190712204705-3dccf664f023 h1:1H4Jyzb0z2X0GfBMTwRjnt5ejffRHrGftUgJcV/ZfDc=
k8s.io/utils v0.0.0-20190712204705-3dccf664f023/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
sigs.k8s.io/controller-runtime v0.1.10/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8=
sigs.k8s.io/kind v0.4.0 h1:C/QMxmF5Sp3yyKkTJ5+VJPcclZyu/JV8wLyihZbsHaI=
sigs.k8s.io/kind v0.4.0/go.mod h1:bgGo2cWxKGQ7esVxtGp9H17Ttlexju92CTMjCg08HNQ=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/structured-merge-diff v0.0.0-20190302045857-e85c7b244fd2 h1:9r5DY45ef9LtcA6BnkhW8MPV7OKAfbf2AUwUhq3LeRk=
sigs.k8s.io/structured-merge-diff v0.0.0-20190302045857-e85c7b244fd2/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
- ""
resources:
- configmaps
- namespaces
verbs:
- get
- list
Expand Down
50 changes: 49 additions & 1 deletion pkg/lib/operatorstatus/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/discovery"

olmv1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1"
olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient"
olmversion "github.com/operator-framework/operator-lifecycle-manager/pkg/version"
)

func MonitorClusterStatus(name string, syncCh <-chan error, stopCh <-chan struct{}, opClient operatorclient.ClientInterface, configClient configv1client.ConfigV1Interface) {
const (
clusterOperatorOLM = "operator-lifecycle-manager"
clusterOperatorCatalogSource = "operator-lifecycle-manager-catalog"
)

func MonitorClusterStatus(name, namespace string, syncCh <-chan error, stopCh <-chan struct{}, opClient operatorclient.ClientInterface, configClient configv1client.ConfigV1Interface) {
var (
syncs int
successfulSyncs int
Expand Down Expand Up @@ -105,6 +112,7 @@ func MonitorClusterStatus(name string, syncCh <-chan error, stopCh <-chan struct
},
},
})
created.Status.RelatedObjects = relatedObjects(name, namespace)
if createErr != nil {
log.Errorf("Failed to create cluster operator: %v\n", createErr)
return
Expand Down Expand Up @@ -234,3 +242,43 @@ func findOperatorStatusCondition(conditions []configv1.ClusterOperatorStatusCond

return nil
}

// relatedObjects returns RelatedObjects in the ClusterOperator.Status.
// RelatedObjects are consumed by https://github.com/openshift/must-gather
func relatedObjects(name, namespace string) []configv1.ObjectReference {
var objectReferences []configv1.ObjectReference
switch name {
case clusterOperatorOLM:
objectReferences = []configv1.ObjectReference{
{
Group: olmv1.GroupName,
Resource: olmv1.OperatorGroupKind,
Namespace: namespace,
},
{
Group: olmv1alpha1.GroupName,
Resource: olmv1alpha1.ClusterServiceVersionKind,
Namespace: namespace,
},
}
case clusterOperatorCatalogSource:
objectReferences = []configv1.ObjectReference{
{
Group: olmv1alpha1.GroupName,
Resource: olmv1alpha1.SubscriptionKind,
Namespace: namespace,
},
{
Group: olmv1alpha1.GroupName,
Resource: olmv1alpha1.InstallPlanKind,
Namespace: namespace,
},
}
}
namespaces := configv1.ObjectReference{
Resource: "namespaces",
Name: namespace,
}
objectReferences = append(objectReferences, namespaces)
return objectReferences
}
14 changes: 12 additions & 2 deletions pkg/package-server/provider/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"google.golang.org/grpc/connectivity"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"
"k8s.io/kubernetes/pkg/util/labels"

Expand Down Expand Up @@ -51,16 +52,19 @@ func newRegistryClient(source *operatorsv1alpha1.CatalogSource, conn *grpc.Clien
type RegistryProvider struct {
queueinformer.Operator

kubeClient kubernetes.Interface

mu sync.RWMutex
globalNamespace string
clients map[sourceKey]registryClient
}

var _ PackageManifestProvider = &RegistryProvider{}

func NewRegistryProvider(ctx context.Context, crClient versioned.Interface, operator queueinformer.Operator, wakeupInterval time.Duration, watchedNamespaces []string, globalNamespace string) (*RegistryProvider, error) {
func NewRegistryProvider(ctx context.Context, crClient versioned.Interface, kubeClient kubernetes.Interface, operator queueinformer.Operator, wakeupInterval time.Duration, watchedNamespaces []string, globalNamespace string) (*RegistryProvider, error) {
p := &RegistryProvider{
Operator: operator,
Operator: operator,
kubeClient: kubeClient,

globalNamespace: globalNamespace,
clients: make(map[sourceKey]registryClient),
Expand Down Expand Up @@ -242,6 +246,12 @@ func (p *RegistryProvider) List(namespace string) (*operators.PackageManifestLis
defer p.mu.RUnlock()

pkgs := []operators.PackageManifest{}
if namespace != metav1.NamespaceAll {
if _, err := p.kubeClient.CoreV1().Namespaces().Get(namespace, metav1.GetOptions{}); err != nil {
return &operators.PackageManifestList{Items: pkgs}, nil
}
}

for _, client := range p.clients {
if client.source.GetNamespace() == namespace || client.source.GetNamespace() == p.globalNamespace || namespace == metav1.NamespaceAll {
logger.Debugf("found CatalogSource %s", client.source.GetName())
Expand Down
35 changes: 32 additions & 3 deletions pkg/package-server/provider/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -90,7 +91,7 @@ func NewFakeRegistryProvider(ctx context.Context, clientObjs []runtime.Object, k

resyncInterval := 5 * time.Minute

return NewRegistryProvider(ctx, clientFake, op, resyncInterval, watchedNamespaces, globalNamespace)
return NewRegistryProvider(ctx, clientFake, k8sClientFake, op, resyncInterval, watchedNamespaces, globalNamespace)
}

func catalogSource(name, namespace string) *operatorsv1alpha1.CatalogSource {
Expand Down Expand Up @@ -244,6 +245,20 @@ func TestRegistryProviderGet(t *testing.T) {
expectedErr: "",
expected: nil,
},
{
name: "SingleNamespace/NamespaceDoesNotExist",
namespaces: []string{"not-a-namespace"},
globalNS: "ns",
catalogSources: []runtime.Object{
withRegistryServiceStatus(catalogSource("cool-operators", "ns"), "grpc", "cool-operators", "ns", port, metav1.NewTime(time.Now())),
},
request: getRequest{
packageNamespace: "ns",
packageName: "amq",
},
expectedErr: "",
expected: nil,
},
{
name: "SingleNamespace/PackageManifestFound",
namespaces: []string{"ns"},
Expand Down Expand Up @@ -389,7 +404,14 @@ func TestRegistryProviderGet(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
ctx, cancel := context.WithCancel(context.TODO())
defer cancel()
provider, err := NewFakeRegistryProvider(ctx, nil, nil, test.namespaces, test.globalNS)

existingNamespaces := []runtime.Object{}
for _, ns := range test.namespaces {
existingNamespaces = append(existingNamespaces, &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{Name: ns},
})
}
provider, err := NewFakeRegistryProvider(ctx, nil, existingNamespaces, test.namespaces, test.globalNS)
require.NoError(t, err)

for _, cs := range test.catalogSources {
Expand Down Expand Up @@ -590,7 +612,14 @@ func TestRegistryProviderList(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
ctx, cancel := context.WithCancel(context.TODO())
defer cancel()
provider, err := NewFakeRegistryProvider(ctx, nil, nil, test.namespaces, test.globalNS)

existingNamespaces := []runtime.Object{}
for _, ns := range test.namespaces {
existingNamespaces = append(existingNamespaces, &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{Name: ns},
})
}
provider, err := NewFakeRegistryProvider(ctx, nil, existingNamespaces, test.namespaces, test.globalNS)
require.NoError(t, err)

for _, cs := range test.catalogSources {
Expand Down
2 changes: 1 addition & 1 deletion pkg/package-server/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (o *PackageServerOptions) Run(ctx context.Context) error {
return err
}

sourceProvider, err := provider.NewRegistryProvider(ctx, crClient, queueOperator, o.WakeupInterval, o.WatchedNamespaces, o.GlobalNamespace)
sourceProvider, err := provider.NewRegistryProvider(ctx, crClient, kubeClient, queueOperator, o.WakeupInterval, o.WatchedNamespaces, o.GlobalNamespace)
if err != nil {
return err
}
Expand Down

0 comments on commit 07fa728

Please sign in to comment.