-
Notifications
You must be signed in to change notification settings - Fork 24
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
H&H: Allow using Test Console (standalone) from operator 🤘 #666
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #666 +/- ##
==========================================
+ Coverage 66.53% 66.55% +0.01%
==========================================
Files 70 70
Lines 8095 8108 +13
==========================================
+ Hits 5386 5396 +10
- Misses 2315 2316 +1
- Partials 394 396 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Looks good, just a small suggestion
pkg/helper/flowcollector.go
Outdated
func UseTestConsolePlugin(spec *flowslatest.FlowCollectorSpec) bool { | ||
if spec.ConsolePlugin.Advanced != nil { | ||
env := spec.ConsolePlugin.Advanced.Env[constants.EnvTestConsole] | ||
return env == "true" |
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.
Should we use:
return env == "true" | |
return strconv.ParseBool(env) |
and manage errors here ?
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 tend to prefer just checking the correct case here, because it's simpler and (this is subjective) I don't believe the error brings much value here - but I don't have stronger arguments to give :-)
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.
it's more for consistency with eBPF environment variables than anything.
These allow upper case "True" for example
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.
Perfect ! Thanks @jotak
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jotak 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 |
Description
To be used with a standalone plugin build image such as:
quay.io/jotak/network-observability-standalone-frontend:riviera2024
Set
spec.consolePlugin.advanced.env.TEST_CONSOLE
"true"
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.