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

refactor: controller-runtime v0.16.3 #444

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

KevFan
Copy link
Contributor

@KevFan KevFan commented Nov 8, 2023

With Authorino now using Go 1.20 (Kuadrant/authorino-operator#156), we should bump controller runtime to v0.16.3 as Kuadrant Operator has also moved to this version for consistency (Kuadrant/kuadrant-operator#246)

HealthProbeBindAddress: opts.healthProbeAddr,
LeaderElection: false,
}
if opts.watchNamespace != "" {
baseManagerOptions.Namespace = opts.watchNamespace
baseManagerOptions.Cache.DefaultNamespaces = map[string]cache.Config{opts.watchNamespace: {}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. So now we can supporting watching selected namespaces (plural)?

We need to test this with Authorino deployed in both modes (i.e. cluster-wide and namespaced.)

Copy link
Contributor Author

@KevFan KevFan Nov 8, 2023

Choose a reason for hiding this comment

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

Interesting. So now we can supporting watching selected namespaces (plural)?

Yeah, it seems the BaseOptions has moved the Namespace option to Cache.Options.DefaultNamespaces 🤔

By default it will watch from all namespaces unless defined in this slice

So it seems possible to support multi namespace via this if we so choose at some point 🤔

We need to test this with Authorino deployed in both modes (i.e. cluster-wide and namespaced.

Agreed 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

BaseOptions has moved the Namespace option to Cache.Options.DefaultNamespaces

So it seems. It's in the release notes of v0.15.0 (since v0.14.5):

cache.Options.Namespace has been removed in favor of cache.Options.Namespaces, a slice.

And I think that changed again later, in v0.16, with:

return nil, err
}
if options.Metrics.BindAddress != "0" {
options.Metrics.ExtraHandlers = map[string]http.Handler{"/server-metrics": promhttp.Handler()}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KevFan
Copy link
Contributor Author

KevFan commented Nov 9, 2023

Running e2e tests locally using make e2e had passed successfully:

image

Copy link
Collaborator

@guicassolato guicassolato left a comment

Choose a reason for hiding this comment

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

I've tested a few scenarios and everything looks good. e2e tests also green.

Nice work, @KevFan!

@KevFan KevFan marked this pull request as ready for review November 10, 2023 11:09
@KevFan
Copy link
Contributor Author

KevFan commented Nov 10, 2023

Thanks @guicassolato for testing it out ! 👍

@KevFan KevFan merged commit 8addd67 into Kuadrant:main Nov 10, 2023
5 checks passed
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.

2 participants