-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Elastic Agent]-PR- Introduce log message for not supported annotations for Hints based autodiscover #4360
Conversation
…in co.elastic.hints annotations
This pull request does not have a backport label. Could you fix it @gizas? 🙏
NOTE: |
|
//We check whether the provided annotation follows the supported format and vocabulary. The check happens for annotations that start with co.elastic.hints | ||
hints, err := utils.GenerateHints(annotations, "", p.config.Prefix, allSupportedHints) | ||
if err != nil { | ||
p.logger.Warnf("%v for pod %v in namespace", err, pod.Name, pod.ObjectMeta.Namespace) |
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.
At the moment I set it as warning.
This kind of errors I think must be visible with default installation
But almost every 2sec we have a warning for one pod per wrong annotation. This can add noise
What do you think?
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 it should be added as a warning like you did, but having it every 2sec is quite annoying...
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.
They will have it every two seconds until they fix it. If the only reason to get this warning is a wrong hint annotation, this will force them to fix it.
I would leave it as a warning.
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This is tracked by #4617 as it shows up on main as well.
Without having a green sonarqube check, someone with admin privileges should force the merge |
/test |
@pchila , @blakerouse I keep trying merging and with main. I hope that soon the build will work :) I have also reformatted the code and introduced a function to call in order to create a test for coverage But now I have another problem that SonarCube seems stack and never reports anything back. |
/test |
Nice!!!! it seems all tests are successful !!!! |
@blakerouse please re-review, looks like go.mod has been fixed. |
buildkite test it |
This pull request is now in conflicts. Could you fix it? 🙏
|
@blakerouse please any objection before merging? |
This pull request is now in conflicts. Could you fix it? 🙏
|
/test |
@blakerouse another ping because the merging is blocked 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.
Looks good.
Quality Gate passedIssues Measures |
Note: Dont merge until elastic/elastic-agent-autodiscover#81 is merged.We need to udpate go.mod of the elastic-agent with v0.6.9PR is mergedWhat does this PR do?
Relates to:
Why is it important?
It adds a helpful feature for those that use Hints Autodiscovery. It can be helpful to identify configuration issues
./changelog/fragments
using the changelog toolHow to test this PR locally
Follow same instructions as #3107
Install elastic-agent-standalone with hints enabled. Sample here
elastic-agent-standalone.txt
Configure some "wrong" co.elastic.hints annotation inside a pod.
Related issues
Logs
Deploy following pod with wrong annotations hosts and steam:
Check that only annotations that start with co.elastic are the ones that are checked for correctness.
Screenshots