-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Restrict synthetics/browser from fleet #25831
Conversation
We do not yet have a synthetics fleet image available, so, for now, users should not be allowed to create synthetics inputs in fleet. See elastic#22932 (comment)
Pinging @elastic/uptime (Team:Uptime) |
💔 Build Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Log outputExpand to view the last 100 lines of log output
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
location is fine but if you want to pack it into a resulting package |
@michalpristas updated per your suggestions. Is there any way we can test this PR prior to rolling out the fleet package? |
@@ -45,6 +45,10 @@ shared: | |||
source: 'elastic-agent.yml' | |||
mode: 0600 | |||
config: true | |||
/etc/{{.BeatName}}/capabilities.yml: |
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 needs to be added in multiple places.
try searching for 'elastic-agent.yml'
there should be 5 occurences, you have 1 so far.
This pull request is now in conflicts. Could you fix it? 🙏
|
I wonder if this is the right approach to follow. So far we don't have any capabilities file shipped by default and it is up to the user to create one if needed. No matter what the user configures in the capabilities.yml, synthetics/browser will not work so it should be hardcoded in the build. My understanding is the the only build that supports synthetics/browser is the complete Dockerfile. Instead of doing modifications to the capabilities, instead heartbeat should return an error if this input is sent down and explain to the user that it is not supported. It is not up to Elastic Agent to know if the input is working in a certain environment or not but heartbeat. My proposal is to move this implementation to heartbeat and not touch capabilities.yml file as it is not designed for this use case. |
Closing this based on Ruflin's concerns and the fact that we already do surface an error message in heartbeat interviews to run browser-based monitors if we are not running on an image with the synthetics dependencies. |
We do not yet have a synthetics fleet image available, so, for now, users should not be allowed to create synthetics inputs in fleet.
@michalpristas can you verify that this is the right place for this file to exist? Once we have a special big docker image with synthetics deps we can conditionally remove this restriction in that special image (which has access to real browsers and graphics libs).
Fixes #25775
See also #22932 (comment)
Checklist
- [ ] My code follows the style guidelines of this project- [ ] I have made corresponding changes to the documentation- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Not yet possible until elastic/uptime#276 is ready