-
Notifications
You must be signed in to change notification settings - Fork 204
Add complete flag environment variable to agent metadata #3190
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
Add complete flag environment variable to agent metadata #3190
Conversation
|
This pull request does not have a backport label. Could you fix it @emilioalvap? 🙏
NOTE: |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
🌐 Coverage report
|
|
/test |
|
/test |
| kind: enhancement | ||
|
|
||
| # Change summary; a 80ish characters long description of the change. | ||
| summary: Add complete image to agent metadata. |
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.
When a customer reads the changelog what does this mean to them? Maybe some more information on why this is done would be better.
| } | ||
|
|
||
| // VersionInfo is structure used by `version --yaml`. | ||
| type VersionInfo struct { |
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 this information be added to the VersionInfo? That is the information that is exposed from the elastic-agent version command line. Is that information important to know there? Being that we want to let fleet know seems like its important. That information would then be provided in diagnostics.
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 don't think it would make sense to include it from the synthetics pov. For us, this is telling us that a given agent is running inside Docker with synthetics deps bundled. For us having ELASTIC_AGENT_COMPLETE: "true" on the diagnostics file is a direct correlation so no need to display it on the version. But I can add it if you think it'll add value
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 agree that it is only for synthetics and inside of a container. How will the information that its a complete image get into the diagnostics zip archive?
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.
Diagnostics includes the agent environment:
env:
BEAT_SETUID_AS: elastic-agent
ELASTIC_AGENT_COMPLETE: "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.
Okay, sounds good.
blakerouse
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.
Please update the changelog before merging, otherwise looks good!
What does this PR do?
Closes elastic/fleet-server#1754. Add environment variable to agent complete image and add it to agent metada.
Why is it important?
We need a mechanism to detect if the agent enrolled is a
-completeimage in Synthetics to show early warnings which the spec does not provide.Checklist
./changelog/fragmentsusing the changelog toolHow to test this PR locally
elastic-agentandelastic-agent-completecontainers on a policy.completeflag: