Skip to content

Commit

Permalink
add nstemplatetier to informer start
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancisc committed Sep 20, 2023
1 parent 44eee9d commit c3639a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/informers/informers.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func StartInformer(cfg *rest.Config) (*Informer, chan struct{}, error) {
informer.ProxyPluginConfig = proxyPluginInformer.Lister()
proxyPluginConfigInformer := proxyPluginInformer.Informer()

// NSTemplateTier plugins
genericNSTemplateTierInformer := factory.ForResource(schema.GroupVersionResource{Group: "toolchain.dev.openshift.com", Version: "v1alpha1", Resource: resources.NSTemplateTierPlural})
informer.NSTemplateTier = genericNSTemplateTierInformer.Lister()
nsTemplateTierInformer := genericNSTemplateTierInformer.Informer()

stopper := make(chan struct{})

log.Info(nil, "Starting proxy cache informers")
Expand All @@ -77,6 +82,7 @@ func StartInformer(cfg *rest.Config) (*Informer, chan struct{}, error) {
toolchainstatusInformer.HasSynced,
userSignupInformer.HasSynced,
proxyPluginConfigInformer.HasSynced,
nsTemplateTierInformer.HasSynced,
) {
err := fmt.Errorf("timed out waiting for caches to sync")
log.Error(nil, err, "Failed to create informers")
Expand Down
1 change: 1 addition & 0 deletions pkg/kubeclient/resources/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ const (
ToolchainStatusPlural = "toolchainstatuses"
ToolchainStatusName = "toolchain-status"
ProxyPluginsPlural = "proxyplugins"
NSTemplateTierPlural = "nstemplatetiers"
)

0 comments on commit c3639a3

Please sign in to comment.