-
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
Conversation
@@ -184,6 +187,15 @@ type Download struct { | |||
Type string `config:"type" json:"type" validate:"required"` | |||
} | |||
|
|||
type DeploymentModes struct { | |||
Default *DeploymentMode `config:"default,omitempty" json:"default,omitempty" yaml:"default,omitempty"` | |||
Agentless *DeploymentMode `config:"agentless,omitempty" json:"agentless,omitempty" yaml:"agentless,omitempty"` |
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
and team
fields that can also be set under agentless
key:
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.
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.
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 !
💚 Build Succeeded
History
cc @mrodm |
@@ -184,6 +187,15 @@ type Download struct { | |||
Type string `config:"type" json:"type" validate:"required"` | |||
} | |||
|
|||
type DeploymentModes struct { | |||
Default *DeploymentMode `config:"default,omitempty" json:"default,omitempty" yaml:"default,omitempty"` | |||
Agentless *DeploymentMode `config:"agentless,omitempty" json:"agentless,omitempty" yaml:"agentless,omitempty"` |
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.
Closes #1238
Closes #1243
Expose
policy_templates_behavior
and thedeployment_modes
for the policy templates (if any) in both search and package endpoints.How to test
config.yml
from the repo):