-
Notifications
You must be signed in to change notification settings - Fork 394
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
✨ server: wire cache informers instead of root informers #2559
✨ server: wire cache informers instead of root informers #2559
Conversation
Suggestion: do we want to use something like "global" instead of "cache" as a prefix for informers and like bound to the cache server? I am just concerned that "cache" is also used for the local (client-go) cache and it may not be obvious at first sight which cache is referred to. |
if err := s.waitForOptionalSync(hookContext.StopCh); err != nil { | ||
logger.Error(err, "failed to finish post-start-hook") | ||
return nil // don't klog.Fatal. This only happens when context is cancelled. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What guarantees that shard informers for the cache server have synced before APIExportEndpointSliceController is started?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general we are waiting for all informers now with exceptions of exports and logical clusters (we need these for bootstrapping).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
c7f5eb1
to
d6fa7ba
Compare
d6fa7ba
to
175f279
Compare
175f279
to
d4870c0
Compare
@@ -40,11 +40,11 @@ import ( | |||
) | |||
|
|||
func startCacheServer(ctx context.Context, logDirPath, workingDir string) (<-chan error, string, error) { | |||
red := color.New(color.BgHiRed, color.FgHiWhite).SprintFunc() | |||
inverse := color.New(color.BgHiWhite, color.FgHiRed).SprintFunc() | |||
cyan := color.New(color.BgHiCyan, color.FgHiWhite).SprintFunc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why BgHiCyan
is better than color.BgHiRed
:)
@@ -486,6 +488,10 @@ func (o *CreateWorkspaceOptions) Complete(args []string) error { | |||
|
|||
// Validate validates the CreateWorkspaceOptions are complete and usable. | |||
func (o *CreateWorkspaceOptions) Validate() error { | |||
if _, err := metav1.ParseToLabelSelector(o.LocationSelector); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is an empty LocationSelector
a valid label ?
case tenancyv1alpha1.SchemeGroupVersion.WithResource("workspacetypes").String(): | ||
return c.reconcileObject(ctx, | ||
keyParts[1], | ||
tenancyv1alpha1.SchemeGroupVersion.WithResource("workspacetypes"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we could also extend our e2e tests to cover the new type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be done in a follow-up
@@ -683,8 +683,11 @@ func (s *Server) installAPIBindingController(ctx context.Context, config *rest.C | |||
if err := wait.PollImmediateInfiniteWithContext(goContext(hookContext), time.Millisecond*100, func(ctx context.Context) (bool, error) { | |||
crdsSynced := s.ApiExtensionsSharedInformerFactory.Apiextensions().V1().CustomResourceDefinitions().Informer().HasSynced() | |||
exportsSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() | |||
cacheExportsSynced := s.CacheKcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() | |||
schemasSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be APIResourceSchemas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in follow-up PR
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
--location-selector
flag tokubectl ws create
plugin