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

Automatically enable detected GVKs #2219

Closed
youngnick opened this issue Feb 11, 2020 · 5 comments · Fixed by #2668
Closed

Automatically enable detected GVKs #2219

youngnick opened this issue Feb 11, 2020 · 5 comments · Fixed by #2668
Assignees
Labels
kind/design Categorizes issue or PR as related to design.

Comments

@youngnick
Copy link
Member

youngnick commented Feb 11, 2020

This issue is to discuss whether Contour should autodetect supported GVKs, both CRD and core, at startup and watch any supported objects that are installed in a cluster.

The current option is to have specific flags for types we want to enable or disable (#1461, #1241). We will keep doing this for now, but we can consider doing a more dynamic solution.

Pros of autodetecting:

  • Less config flags
  • Enables cluster admins to switch off CRD functionality by not installing CRDs
  • Stops the surprise factor of having a CRD or other object installed that is not watched by Contour

Cons of autodetecting:

  • Doesn't allow for clearly flagging things as experimental as easily - probably warning logs would be required.
@youngnick youngnick added blocked/needs-design Categorizes the issue or PR as blocked because it needs a design document. kind/design Categorizes issue or PR as related to design. labels Feb 11, 2020
@youngnick youngnick added this to the Backlog milestone Feb 11, 2020
@youngnick
Copy link
Member Author

We would probably need to use https://godoc.org/k8s.io/client-go/discovery or similar, for future reference.

@jpeach
Copy link
Contributor

jpeach commented Feb 11, 2020

xref: #1241

@youngnick youngnick changed the title design: Automatically enable detected CRDs? design: Automatically enable detected GVKs? Mar 2, 2020
@youngnick youngnick self-assigned this Mar 2, 2020
@youngnick youngnick modified the milestones: Backlog, 1.3.0 Mar 2, 2020
@davecheney davecheney removed this from the 1.3.0 milestone Mar 11, 2020
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 18, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 18, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
@youngnick youngnick changed the title design: Automatically enable detected GVKs? Automatically enable detected GVKs Mar 19, 2020
@youngnick
Copy link
Member Author

After some consideration of this, I'm going ahead with it, as it will allow for people to make an ultimate "disable this configuration type" decision by removing a CRD from the cluster. This will help with IngressRoute -> HTTPProxy migration, version changes, and so on.

youngnick pushed a commit to youngnick/contour that referenced this issue Mar 19, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 19, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 19, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 19, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 23, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates projectcontour#2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit that referenced this issue Mar 23, 2020
This is in preparation for adding in filtering by discovered CRD types.

Updates #2219

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 24, 2020
This is further refactoring for projectcontour#2219.

Moves Service and Ingress to the client-go dynamic client, leaving only Secrets and Endpoints not handled by the new InformerSet. Secrets need namespace handling, and Endpoints need a separate handler.

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit to youngnick/contour that referenced this issue Mar 24, 2020
This is further refactoring for projectcontour#2219.

Moves Service and Ingress to the client-go dynamic client, leaving only Secrets and Endpoints not handled by the new InformerSet. Secrets need namespace handling, and Endpoints need a separate handler.

Signed-off-by: Nick Young <[email protected]>
youngnick pushed a commit that referenced this issue Mar 24, 2020
This is further refactoring for #2219.

Moves Service and Ingress to the client-go dynamic client, leaving only Secrets and Endpoints not handled by the new InformerSet. Secrets need namespace handling, and Endpoints need a separate handler.

Signed-off-by: Nick Young <[email protected]>
@youngnick youngnick removed the blocked/needs-design Categorizes the issue or PR as blocked because it needs a design document. label Mar 24, 2020
@stevesloka
Copy link
Member

@youngnick I have some work for this started, did you already start? I don't want to duplicate efforts.

@youngnick
Copy link
Member Author

I started in that I did some refactoring in preparation - my idea was that we would build the default set of informers using the bits I added already, and then wash that set against what's actually present on the apiserver. Could also do it the other way around, of course.

@youngnick youngnick assigned stevesloka and unassigned youngnick Jul 1, 2020
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 8, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 8, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 8, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 8, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 8, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 9, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 10, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 10, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 10, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit to stevesloka/contour that referenced this issue Jul 14, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes projectcontour#2219

Signed-off-by: Steve Sloka <[email protected]>
stevesloka added a commit that referenced this issue Jul 15, 2020
Add a discovery client to look up server groups and resources which
allows for a check to be made that a resource type exists before
starting any informers against.

Fixes #2219

Signed-off-by: Steve Sloka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants