-
Notifications
You must be signed in to change notification settings - Fork 1.8k
k8sutil: ExposeMetricsPort works for ClusterScoped #836
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
k8sutil: ExposeMetricsPort works for ClusterScoped #836
Conversation
estroz
left a comment
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 probably needs an e2e test case.
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.
Thanks for this! Few initial comments.
|
@hasbro17 had a good suggestion in #786 (comment) so pinging him on this. |
1aa79c0 to
48be906
Compare
|
I think #786 (comment) makes a lot of sense. I'd suggest we move this function to |
|
@joelanford i will do that. Thanks. |
48be906 to
5b90a09
Compare
|
@joelanford @lilic changes done according to your comment to reuse the proposal of #786 (comment) If it is accepted, should I squash all commits before the merge? Description of the change: |
joelanford
left a comment
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.
A couple of nits, but looks good to me overall.
Also, don't worry about squashing. That'll happen automatically when we merge the PR.
lilic
left a comment
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.
Thanks for doing the changes!
lilic
left a comment
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.
One leftover comment otherwise lgtm!
|
pinging @estroz @joelanford to re-review. LGTM from my side. |
joelanford
left a comment
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.
Thanks @dbenque-1a!
LGTM
|
@dbenque-1a needs a rebase. LGTM on green tests. |
ExposeMetricsPort was failing to generate the kubernetes service to scrape metrics if the operator was generated with --cluster-scoped flag Fixes operator-framework#835
b906dbd to
321a7c9
Compare
|
@estroz, rebase done. I must say that this SDK should really improve our efficiency in that exercise. At some point we wanted to build such a SDK.. and you do it, thanks! So now we are going to be regular users and probably contributors. Regards, |
Thanks for that! We are happy to welcome any contributions! And of course, feedback is always welcome. I reran the tests they are 🍏 , this should be good to merge once @estroz dismisses his review. Thanks again! |
|
@dbenque-1a Thanks again! |
Description of the change:
When creating the Service to expose metrics, use the NAMESPACE env variable instead of the WATCH_NAMESPACE that is empty for an operator generated with --cluster-scoped
Motivation for the change:
ExposeMetricsPort was failing to generate the kubernetes service to scrape metrics if the operator was generated with --cluster-scoped flag
Closes #835