Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template broker should use SAR, not impersonation #14216

Merged
merged 1 commit into from
May 24, 2017

Conversation

@jim-minter jim-minter self-assigned this May 16, 2017
@jim-minter
Copy link
Contributor Author

[test][testextended][extended:core(templates)]

@jim-minter jim-minter force-pushed the trello132-broker-sar branch 2 times, most recently from ef8e182 to 2629ca7 Compare May 16, 2017 14:09
@jim-minter
Copy link
Contributor Author

@deads2k, @bparees I haven't done the oadm migration piece yet, but everything else should be here. I'd appreciate it if you could take an early look and provide any feedback.

@jim-minter jim-minter force-pushed the trello132-broker-sar branch from 2629ca7 to c9689fc Compare May 16, 2017 16:27
@bparees
Copy link
Contributor

bparees commented May 16, 2017

so i think my open questions are around symmetry:

  1. should the controller SA use per project bindings instead of a cluster role, for the impersonate power (to align w/ what the broker SA does)

or

  1. could the broker SA be granted cluster-wide impersonate (to align with what the controller does) (the broker SA would still need to be granted resource creation permissions on a project by project basis, but at least the impersonate permission would be symmetrical).

},
{
APIGroups: []string{templateapi.GroupName},
// "impersonate" is required for the API server to accept creation of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about verb=assign, group=templateapi.GroupName resource=templateinstances . You could then bind that role locally in a namespace to allow subdivision or clusterwide if you (cluster-admin) don't care about subdivision.

if err != nil || resp == nil || !resp.Allowed {
if err := s.authorize(userinfo, &authorizationapi.Action{
Namespace: templateInstance.Namespace,
Verb: "impersonate",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer "assign". It's distinct and descriptive.

@@ -8,7 +8,8 @@ import (

type StoreToTemplateLister interface {
List() ([]*templateapi.Template, error)
GetTemplateByUID(uid string) (*templateapi.Template, error)
ListByNamespace(namespace string) ([]*templateapi.Template, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should really switch to the generated lister which should already have a per-namespace option.

// TemplateServiceBrokerConfig holds information related to the template
// service broker. The broker is enabled if TemplateServiceBrokerConfig is
// non-nil.
TemplateServiceBrokerConfig *TemplateServiceBrokerConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't this in another pull? I feel like I already approved it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - there are 2 commits here - the first is last my trello card from last sprint which is currently in the merge queue

@@ -129,4 +130,6 @@ const (
BuildStrategyJenkinsPipelineRoleBindingName = BuildStrategyJenkinsPipelineRoleName + "-binding"

OpenshiftSharedResourceViewRoleBindingName = OpenshiftSharedResourceViewRoleName + "s"

TemplateServiceBrokerRoleBindingName = TemplateServiceBrokerRoleName + "-binding"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try to start matching upstream. The names match exactly upstream.

@@ -91,6 +92,12 @@ const (

InfraGarbageCollectorControllerServiceAccountName = "garbage-collector-controller"
GarbageCollectorControllerRoleName = "system:garbage-collector-controller"

InfraTemplateInstanceControllerServiceAccountName = "template-instance-controller"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if #14150 merges ahead of you, I'd like to use the new pattern. It aligns us with usptream and allows us to start splitting out ownership of launch mechanism and config information.

// "impersonate" is required for the API server to accept updates to
// TemplateInstance objects where the requester username is not the
// API caller.
Verbs: sets.NewString("get", "list", "watch", "update", "impersonate"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "impersonate" I didn't expect. There's a controller that's mutating ownership? Where it get information?

If its the updating detection server-side, that should be based on a change, not just that information being present.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If its the updating detection server-side, that should be based on a change, not just that information being present.

Oh, you're updating spec from the controller, not just status? I could see that being required then, but why update spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The controller updates status only. At the moment, things are set up such that you must be the requester or have "impersonate" to edit any part of the object, hence "impersonate" is required here. Would it be better to allow anyone to change the status? Or is it somehow possible to restrict things so that just the controller can update status, and this can be done without "impersonate"?

APIGroups: []string{"*"},
// delete is needed to avoid error: "cannot set an ownerRef on a
// resource you can't delete"
Verbs: sets.NewString("create", "delete"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the controller that actually does the creation of resources from the template? He can't be allowed to have this permission. This would allow me to create oauthaccesstokens which I could use to create a super-user token and own the cluster.

You will have to enumerate.

},
{
APIGroups: []string{kapi.GroupName},
Verbs: sets.NewString("list"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks unusual to me. No watch paired to list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - the template service broker only lists services in a namespace in response to an incoming bind call.


func GetBootstrapProjectRoleBindings(namespace string) []authorizationapi.RoleBinding {
return append(GetBootstrapServiceAccountProjectRoleBindings(namespace),
GetBootstrapTemplateServiceBrokerProjectRoleBindings(namespace)...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granting rights for an alpha feature? Can you separate this particular bit to a different pull? I'd expect it to be gated based on whether the feature is enabled or not, but I don't want to block progress on the rest of your pull.

c := TemplateInstanceController{restconfig: restconfig, templateclient: templateclientset.NewForConfigOrDie(&restconfig).Template()}
func NewTemplateInstanceController(restconfig *rest.Config) *TemplateInstanceController {
c := TemplateInstanceController{
oc: client.NewOrDie(restconfig),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unusual to create your own client. Please take them as arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To confirm: is the pattern that I should cause a templateapi client to be created somewhere higher up the call stack and pass this in with the oc & kc clients?

oc: client.NewOrDie(restconfig),
kc: kclientsetinternal.NewForConfigOrDie(restconfig),
templateclient: templateclientset.NewForConfigOrDie(restconfig).Template(),
}
_, c.controller = cache.NewInformer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a generated shared informer is more appropriate.

)

type TemplateInstanceController struct {
restconfig rest.Config
oc *client.Client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated client.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or a dynamic client. Probably a dynamic client I guess.

@@ -100,25 +110,35 @@ func (c *TemplateInstanceController) handle(templateInstance *templateapi.Templa
return err
}

func (c *TemplateInstanceController) authorize(u user.Info, action *authorizationapi.Action) error {
sar := authorizationapi.AddUserToSAR(u, &authorizationapi.SubjectAccessReview{Action: *action})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the upstream subjectaccessreviews.authorization.k8s.io We're going to (someday) remove our endpoint.

if err = c.authorize(u, &authorizationapi.Action{
Namespace: templateInstance.Namespace,
Verb: "create",
Group: templateapi.LegacyGroupName,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no legacy group use here. We should be switched over for a new feature.

return nil
}
if err == nil {
err = errors.New(resp.Reason)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not forbidden here too?

@@ -100,25 +110,35 @@ func (c *TemplateInstanceController) handle(templateInstance *templateapi.Templa
return err
}

func (c *TemplateInstanceController) authorize(u user.Info, action *authorizationapi.Action) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right idea.

Namespace: namespace,
Verb: "create",
Group: info.Mapping.GroupVersionKind.Group,
Resource: info.Mapping.Resource,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure that this is never empty.

Op: cmd.Create,
Op: func(info *resource.Info, namespace string, obj runtime.Object) (runtime.Object, error) {
if err = c.authorize(u, &authorizationapi.Action{
Namespace: namespace,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure this is never empty.

@@ -118,23 +119,30 @@ func SelectableFields(obj *templateapi.TemplateInstance) fields.Set {
return templateapi.TemplateInstanceToSelectableFields(obj)
}

func (s *templateInstanceStrategy) authorize(u user.Info, action *authorizationapi.Action) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy/paste surprises me. Should be shareable, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - but I don't know where - is somewhere in pkg/authorization that this could/should go? I'm sort of surprised there isn't one already.

@deads2k
Copy link
Contributor

deads2k commented May 16, 2017

@liggitt can you think of a reasonable and thread-safe way to build a transport wrapper that takes a user and does the check on all requests rather than trying to catch them all?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2017
@jim-minter jim-minter force-pushed the trello132-broker-sar branch from c9689fc to bf9b178 Compare May 19, 2017 13:31

utilruntime.HandleError(fmt.Errorf("TemplateInstance status update failed (%d/%d): %v", try+1, updateRetries, err))

if apierrors.IsConflict(err) && try+1 < updateRetries {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic looks exactly like RetryOnConflict.

Also, it's a little unusual to bother with retrying on conflict instead of just re-running the controller func. Something really expensive happen before this? Your controller needs to be level driven anyway, so you must be able to re-run your controller sync method or you're inherently unstable on failures and the like.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I think this functionality is inherently unstable on failures and the like. I think this is where an imperative world meets a level driven world. @bparees @smarterclayton how do you want to proceed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jim-minter so the big issue here is that if we retry the event, we'll get create failures because the objects already exist, right? But we should be able to tell that we created those objects based on their ownerrefs and ignore the create failures and proceed to the status update.

So i'm inclined to say we can just retry the event as @deads2k suggests (if we add the other logic to be more intelligent about handling create failures), unless i'm forgetting something?

return false
}

func (statusStrategy) PrepareForCreate(ctx apirequest.Context, obj runtime.Object) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't have these in the interface since you only need an UpdateStrategy

return b
}

func (b *Broker) waitForReady() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected this to be called from a filter function in your handler chain so that we could easily make sure the entire handler was covered.

}

func NewBroker(restconfig restclient.Config, localSAR client.LocalSubjectAccessReviewsNamespacer, secretsGetter internalversion.SecretsGetter, informers shared.InformerFactory, namespaces []string) *Broker {
func NewBroker(privrestconfig restclient.Config, privkc kclientset.Interface, infraNamespace string, informer templateinformer.TemplateInformer, namespaces []string) *Broker {
informer.Informer().AddIndexers(cache.Indexers{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this right where you create the informers. We really shouldn't ever create one without this and later we can update the generator to allow it.

if err == nil {
err = errors.New("forbidden")
// TODO: enable SAR for template - at the moment I think this doesn't work
// properly because group information isn't populated in u.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean that your information flow is incomplete somewhere? That is a severe problem.

@deads2k
Copy link
Contributor

deads2k commented May 22, 2017

enable SAR for template in pkg/template/servicebroker/ provision.go - currently blocked because requesting user's groups are not known at this point

You sent an email a while back describing the information flow. This makes it sound like information is being dropped somewhere and that's concerning. Group information for the same user may not be stable across multiple requests (different certificates as a for instance) and the Extra information is equally critical in openshift since tokens may be scope limited and that information must be passed through. Permission to create objects of type foo is not the same as being allowed to create them of type bar and that can be expressed via scopes.

@liggitt you familiar with the information flow here?

@liggitt
Copy link
Contributor

liggitt commented May 22, 2017

enable SAR for template in pkg/template/servicebroker/ provision.go - currently blocked because requesting user's groups are not known at this point

You sent an email a while back describing the information flow. This makes it sound like information is being dropped somewhere and that's concerning. Group information for the same user may not be stable across multiple requests (different certificates as a for instance) and the Extra information is equally critical in openshift since tokens may be scope limited and that information must be passed through. Permission to create objects of type foo is not the same as being allowed to create them of type bar and that can be expressed via scopes.

@liggitt you familiar with the information flow here?

@jim-minter wasn't this the header (X-Broker-Originating-Identity, I think) that we discussed last week that was for platforms to pass platform-specific identity info to a broker? That could be a serialization of user.Info in our case. @pmorie do you know the status/timeframe for that?

@jim-minter
Copy link
Contributor Author

@liggitt I wasn't present for any discussion on X-Broker-Originating-Identity. If this allows groups and extra to be passed in, that sounds good. Waiting on @pmorie for update on status/timeframe.

@jim-minter jim-minter force-pushed the trello132-broker-sar branch from 9630180 to c4da547 Compare May 23, 2017 11:28
@jim-minter
Copy link
Contributor Author

@bparees @deads2k all points resolved (apart from passing through groups/extra which will come with improvements to the broker API).
@bparees reckon this can merge today?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2017
@jim-minter jim-minter force-pushed the trello132-broker-sar branch 2 times, most recently from 096db99 to 965e3ea Compare May 23, 2017 14:01
@jim-minter jim-minter removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2017
@jim-minter jim-minter force-pushed the trello132-broker-sar branch from 965e3ea to 1f0aba8 Compare May 23, 2017 16:01
@jim-minter jim-minter changed the title WIP template broker should use SAR, not impersonation template broker should use SAR, not impersonation May 23, 2017
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 1f0aba8

@openshift-bot
Copy link
Contributor

Evaluated for origin testextended up to 1f0aba8

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/465/) (Base Commit: 48e5e40) (Extended Tests: core(templates))

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/1641/) (Base Commit: 48e5e40)

Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this because none of my comments should block it, but i'd like to see a follow up PR that addresses them and also:

  1. general addition of godoc (i didn't call out all the places it's missing)
  2. more logging (at level 2 or 4) in the controllers+broker api so we can debug request flows/failures.

@@ -45,5 +45,16 @@ func AddObjectsToTemplate(template *Template, objects []runtime.Object, targetVe
}

return nil
}

func FilterTemplateInstanceCondition(conditions []TemplateInstanceCondition, condType TemplateInstanceConditionType) []TemplateInstanceCondition {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

godoc

provisionErr := c.provision(templateInstance)

templateInstance.Status.Conditions = templateapi.FilterTemplateInstanceCondition(templateInstance.Status.Conditions, templateapi.TemplateInstanceReady)
templateInstance.Status.Conditions = templateapi.FilterTemplateInstanceCondition(templateInstance.Status.Conditions, templateapi.TemplateInstanceInstantiateFailure)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can a templateinstance go from a Failed condition to Ready condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Is your opinion that these lines are overkill? I was wanting to guarantee that whatever these conditions may currently contain, subsequently they only contain the result of this process.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i was wondering if they were, but i agree w/ the goal of certainty, so i think it's fine to leave them.

if err != nil || resp == nil || !resp.Allowed {
if err := util.Authorize(s.kc.Authorization().SubjectAccessReviews(), userinfo, &authorization.ResourceAttributes{
Namespace: templateInstance.Namespace,
Verb: "assign",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do, but my impression was that this seems to match wider existing code style.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shrug]. we can leave it, i just worry about someone getting the name wrong or typo'ing it somewhere.

Verb: "assign",
Group: templateapi.GroupName,
Resource: "templateinstances",
}); err != nil {
return field.ErrorList{field.Forbidden(field.NewPath("spec.impersonateUser"), "impersonation forbidden")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/spec.impersonateUser/spec.requester.username/ ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh - thanks

"github.com/openshift/origin/pkg/openservicebroker/api"
templateapi "github.com/openshift/origin/pkg/template/api"
)

func (b *Broker) ensureSecret(impersonatedKC internalversion.SecretsGetter, namespace string, instanceID string, preq *api.ProvisionRequest, didWork *bool) (*kapi.Secret, *api.Response) {
func (b *Broker) ensureSecret(u user.Info, namespace string, instanceID string, preq *api.ProvisionRequest, didWork *bool) (*kapi.Secret, *api.Response) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

godoc

@@ -50,26 +67,44 @@ func (b *Broker) ensureSecret(impersonatedKC internalversion.SecretsGetter, name
return nil, api.InternalServerError(err)
}

func (b *Broker) ensureTemplateInstance(impersonatedTemplateclient internalversiontemplate.TemplateInterface, namespace string, instanceID string, template *templateapi.Template, secret *kapi.Secret, impersonate string, didWork *bool) (*templateapi.TemplateInstance, *api.Response) {
func (b *Broker) ensureTemplateInstance(u user.Info, namespace string, instanceID string, template *templateapi.Template, secret *kapi.Secret, didWork *bool) (*templateapi.TemplateInstance, *api.Response) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

godoc

b.kc = kc
b.templateclient = templateclientset.NewForConfigOrDie(restconfig).Template()

glog.Infof("Template service broker: waiting for informer sync")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lower log level.

}

func (b *Broker) WaitForReady() error {
timer := time.NewTimer(10 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10s sounds short. how confident are we this will always be sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any incoming TSB API request would be held up for maximally that length of time before giving up if the broker hasn't initialised. Initialisation is a one-off event at startup and should be rapid. 10s is in use elsewhere in our codebase in similar scenarios. At the moment we return status code 500 if the timer expires, arguably that should be a different code, but there's nothing to cover this in the OSB spec and I'm not aware of a specific standardised "try again later" status code to use.

I think I should add some code documentation here :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, if this is a check that's being run on each request that's fine. I was under the (mistaken, I guess) impression that if we hit this timeout, the broker api wasn't going to start up at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes; that is not the case.

}

func NewBroker(restconfig restclient.Config, localSAR client.LocalSubjectAccessReviewsNamespacer, secretsGetter internalversion.SecretsGetter, informers shared.InformerFactory, namespaces []string) *Broker {
func NewBroker(privrestconfig restclient.Config, privkc kclientset.Interface, infraNamespace string, informer templateinformer.TemplateInformer, namespaces []string) *Broker {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

godoc

@@ -109,14 +109,14 @@ var _ = g.Describe("[templates] templateinstance security tests", func() {
},
},
{
by: "checking adminuser can create a privileged object",
by: "checking adminuser can't create a privileged object",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably worth a comment that the reason this should fail is because the controller itself should not have these permissions, even though the adminuser does.

@bparees
Copy link
Contributor

bparees commented May 23, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 1f0aba8

@openshift-bot
Copy link
Contributor

openshift-bot commented May 24, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/765/) (Base Commit: 50b7254) (Image: devenv-rhel7_6260)

informerFactory := shared.NewInformerFactory(internalkubeInformerFactory, externalkubeInformerFactory, privilegedLoopbackKubeClientsetInternal, privilegedLoopbackOpenShiftClient, customListerWatchers, defaultInformerResyncPeriod)

err = templateInformers.Template().InternalVersion().Templates().Informer().AddIndexers(cache.Indexers{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the template informer to always be started, even if the template broker is off. This needs to be guarded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants