-
Notifications
You must be signed in to change notification settings - Fork 33
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 #246
Conversation
Blocked / Kept as draft for now as we've decided to wait for MVP release before making these changes |
Codecov Report
@@ Coverage Diff @@
## main #246 +/- ##
==========================================
- Coverage 64.79% 64.39% -0.40%
==========================================
Files 35 35
Lines 3806 3806
==========================================
- Hits 2466 2451 -15
- Misses 1148 1159 +11
- Partials 192 196 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
1b4e0a2
to
d4545f0
Compare
options := ctrl.Options{Scheme: scheme} | ||
|
||
if configFile != "" { | ||
options, err = options.AndFrom(ctrl.ConfigFile().AtPath(configFile)) |
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.
ComponentConfig
has been deprecated (https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0). We can either use a custom implementation that sets Manager.Options directly or move back to configuration via arguments.
Moving back to configuration using arguments as it's the easier option and we do not have many configurations in general
5b415d4
to
b1331a4
Compare
b1331a4
to
595ce11
Compare
595ce11
to
aa2c5bd
Compare
ea1019e
to
a41e652
Compare
a41e652
to
7361016
Compare
497c187
to
e73c4c8
Compare
e73c4c8
to
46c9725
Compare
MVP I believe has been completed, so this is ready for review |
46c9725
to
5357f6c
Compare
Gateway api v1.0.0 has been released using controller runtime v0.16.3 |
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.
These changes look good - I opted for a near identical implementation when I started to look at gwapi v1 and needed a newer controller-runtime. Nice work!
5357f6c
to
e083955
Compare
Rebased to resolve conflicts with main |
"The operator will load its initial configuration from this file. "+ | ||
"Omit this flag to use the default configuration values. "+ | ||
"Command-line flags override configuration from this file.") | ||
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") |
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 wonder if the deployment of the operator should change after this change. Or defaults are good enough?
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 these defaults are good. These are the same as 52b2cdb which was before it was moved to loading config using file.
Only difference I see between defaults and deployment options is that leacterElection
is true
only for deployment but false
by default 🤔 :
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.
But the deployment is setting it explicitly, so we should be good.
LGTM however, git is yelling at conflicting files. On fixing them, happy to approve it |
e083955
to
9a839ac
Compare
Resolves: #237