Skip to content

Commit

Permalink
Expose is_default setting of agentless deployment mode (#1269)
Browse files Browse the repository at this point in the history
This setting indicates if the agentless deployment mode should be used by default
when more deployment modes are enabled.

Co-authored-by: Mario Rodriguez Molins <marrodmo@gmail.com>
  • Loading branch information
jsoriano and mrodm authored Jan 14, 2025
1 parent bcfed6d commit 4b46249
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Include summary of data streams in search responses. [#1264](https://github.com/elastic/package-registry/pull/1264)
* Add Access-Control-Allow-Origin header for all origins. [#1266](https://github.com/elastic/package-registry/pull/1266)
* Expose `is_default` flag in agentless deployment modes. [#1269](https://github.com/elastic/package-registry/pull/1269)

### Deprecated

Expand Down
3 changes: 2 additions & 1 deletion packages/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ type DeploymentModes struct {
}

type DeploymentMode struct {
Enabled bool `config:"enabled" json:"enabled" yaml:"enabled" validate:"required"`
Enabled bool `config:"enabled" json:"enabled" yaml:"enabled" validate:"required"`
IsDefault *bool `config:"is_default" json:"is_default,omitempty" yaml:"is_default,omitempty"`
}

func NewDownload(p Package, t string) Download {
Expand Down
3 changes: 2 additions & 1 deletion packages/testdata/marshaler/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion testdata/generated/package/deployment_modes/0.0.1/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion testdata/generated/search-package-experimental.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion testdata/generated/search-package-prerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion testdata/generated/search-prerelease-capabilities-none.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
"enabled": false
},
"agentless": {
"enabled": true
"enabled": true,
"is_default": true
}
}
},
Expand Down
1 change: 1 addition & 0 deletions testdata/package/deployment_modes/0.0.1/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ policy_templates:
enabled: false
agentless:
enabled: true
is_default: true
organization: elastic
division: observability
team: integration
Expand Down

0 comments on commit 4b46249

Please # to comment.