Skip to content

Reuse the authorization and template shared informers for GC #14391

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

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

smarterclayton
Copy link
Contributor

Allow them to be loaded via ForResource() as a stepping stone to
transforming their behavior.

For #8229

[test]

@smarterclayton
Copy link
Contributor Author

@liggitt I am confused why the preferred group versions are changing

@liggitt
Copy link
Contributor

liggitt commented May 31, 2017

I'm not sure either

@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton smarterclayton added this to the 3.6.0 milestone Jun 2, 2017
@smarterclayton
Copy link
Contributor Author

It's because the generated informers require their API group to be registered.

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jun 4, 2017 via email

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jun 4, 2017 via email

@smarterclayton
Copy link
Contributor Author

@enj also for review

ForResource(resource schema.GroupVersionResource) (kinformers.GenericInformer, error)
}

type genericInformers struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in a separate package. I agree that combining informers is useful, but I suspect we'll need it more generally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just the adapter interface for GC, if you want to start a brand new controller factory i want to do that in a separate PR where the rest of them get converted.

}

type genericInformers struct {
kinformers.SharedInformerFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

Why must this be anonymous?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is passing through all the kubernetes informer methods

ClientBuilder: saClientBuilder,
InformerFactory: genericInformers{
SharedInformerFactory: oc.Informers.KubernetesInformers(),
generic: []GenericResourceInformer{oc.Informers},
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this wiring in the hand coded informers? I'm against including them in new places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need those to reuse existing informers

@@ -81,13 +87,26 @@ type sharedInformerFactory struct {
customListerWatchers ListerWatcherOverrides
defaultResync time.Duration

templateInformers templateinformers.SharedInformerFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like this. If we must have a new struct, we should be building out a new struct that doesn't carry the legacy of hand-coded informers with 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.

What do you want the tsruct to look like? The upstream shared struct? This is the generated type

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jun 6, 2017 via email

@smarterclayton
Copy link
Contributor Author

Refactored to be clearer, removed Register, and excluded a lot more resources that I honestly don't care about right now (mostly ones without reflectors).

@smarterclayton
Copy link
Contributor Author

smarterclayton commented Jun 9, 2017 via email

Allow them to be loaded via ForResource() as a stepping stone to
transforming their behavior.

Set projects and tokens as GC excluded resources (virtual, and security
related).
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 37ebaf7

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2089/) (Base Commit: c9a1d10)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 37ebaf7

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 12, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/966/) (Base Commit: 52661e3) (Image: devenv-rhel7_6338)

@openshift-bot openshift-bot merged commit e166740 into openshift:master Jun 12, 2017
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.

4 participants