-
Notifications
You must be signed in to change notification settings - Fork 67
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
Expose policy_templates_behavior and deployment modes for policy templates in search and package endpoints #1244
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
aed6fd5
Add support to expose deployment modes fields
mrodm 2432394
Add test package with deployment modes
mrodm 38b7f10
Add changelog entry - temporal link
mrodm 3f100de
Expose policy_templates_behavior field
mrodm 5011370
Revert expose hide_in_deployment_modes field
mrodm 62316bb
Rewrite changelog entry
mrodm 12b606d
Update changelog link
mrodm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
{ | ||
"id": "custom", | ||
"title": "Custom", | ||
"count": 17 | ||
"count": 18 | ||
}, | ||
{ | ||
"id": "datastore", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
{ | ||
"id": "custom", | ||
"title": "Custom", | ||
"count": 16 | ||
"count": 17 | ||
}, | ||
{ | ||
"id": "datastore", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
{ | ||
"id": "custom", | ||
"title": "Custom", | ||
"count": 16 | ||
"count": 17 | ||
}, | ||
{ | ||
"id": "datastore", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
{ | ||
"id": "custom", | ||
"title": "Custom", | ||
"count": 17 | ||
"count": 18 | ||
}, | ||
{ | ||
"id": "datastore", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not added the
organization
,division
andteam
fields that can also be set underagentless
key:https://github.com/elastic/package-spec/blob/cc5282374a5d062497bf0517d77a449d7176a35e/spec/integration/manifest.spec.yml#L177-L197
Should they be added? Are they necessary for Fleet?
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.
According to the description these fields are only intended to be used internally, when the package is installed: elastic/package-spec#795
So I don't think we need to expose them here. cc @seanrathier just in 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.
They need to be added because Kibana will send those fields to the Agentless API and then the Agentless API will tag the agentless agent deployment with that information.
Those fields should only be required if you have a
deployment_modes agentless
Does that answer the question?
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.
Looking at this comment, I thought those values would be read directly from the manifest in Kibana (Fleet):
elastic/package-spec#795 (comment)
If the package is installed before sending those values to the Agentless API, could those values be read from the package manifest? If that is possible, probably it's not needed to add those fields to the API.
WDYT ? @seanrathier @jsoriano
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.
If I am misunderstanding this request please let me know.
Are we looking to expose
deployment_modes
when searching for packages? If so, we don't need to expose the org, division and team in the search.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.
Exactly, I think I didn't give the full context here, sorry. This question was more related to check whether or not those fields should be added in to the search and package API responses from the package registry.
So, I think it's good to proceed as it is the PR now (just exposing if the mode is enabled or not).
Thanks @seanrathier !