Skip to content

Commit

Permalink
Add new agentless params and discovery (#18)
Browse files Browse the repository at this point in the history
* Add discovery to manifest.
* Add organization,division,team to deployment_modes.agentless. See package-spec 801.
  • Loading branch information
andrewkroh authored Sep 23, 2024
1 parent a2366bc commit 0042da0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion fleetpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ type Manifest struct {
Elasticsearch *ElasticsearchRequirements `json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"`
Agent *AgentRequirements `json:"agent,omitempty" yaml:"agent,omitempty"`
DeploymentModes *DeploymentModes `json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"`
Discovery *Discovery `json:"discovery,omitempty" yaml:"discovery,omitempty"`

sourceFile string
}
Expand All @@ -131,6 +132,15 @@ func (m Manifest) Path() string {
return m.sourceFile
}

// Discovery provides a description of the data this package can be used with. It
// can be used to discover the package from elements in the existing data.
type Discovery struct {
// Description of the fields this package can be used with.
Fields []struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"` // Name of the field.
} `json:"fields,omitempty" yaml:"fields,omitempty"`
}

type ElasticsearchRequirements struct {
Privileges ElasticsearchPrivilegeRequirements `json:"privileges,omitempty" yaml:"privileges,omitempty"`
}
Expand Down Expand Up @@ -277,7 +287,10 @@ type DeploymentModes struct {

// Options specific to the Agentless deployment mode. This mode is used in offerings where the Elastic Agents running these policies are fully managed for the user.
Agentless struct {
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
Organization string `json:"organization,omitempty" yaml:"organization,omitempty"` // The responsible organization of the integration. This is used to tag the agentless agent deployments for monitoring.
Division string `json:"division,omitempty" yaml:"division,omitempty"` // The division responsible for the integration. This is used to tag the agentless agent deployments for monitoring.
Team string `json:"team,omitempty" yaml:"team,omitempty"` // The team responsible for the integration. This is used to tag the agentless agent deployments for monitoring.
} `json:"agentless,omitempty" yaml:"agentless,omitempty"`
}

Expand Down

0 comments on commit 0042da0

Please sign in to comment.