Skip to content

Commit 08fc446

Browse files
Merge branch 'main' into add-otel-resource-detection-processor
2 parents 3073609 + fa85498 commit 08fc446

21 files changed

+2861
-1506
lines changed

.github/workflows/bump-golang.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v4
2323

2424
- name: Install Updatecli in the runner
25-
uses: updatecli/updatecli-action@9a37c7e35598d7b37d8e7568b40ed9538112be01 # v0.76.1
25+
uses: updatecli/updatecli-action@fa41baa922561b436c449de1a0bd1f5bd768248c # v0.76.1
2626

2727
- name: Run Updatecli in Apply mode
2828
run: updatecli apply --config .github/updatecli-bump-golang.yml

.github/workflows/golangci-lint.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
go-version-file: .go-version
2626

2727
- name: golangci-lint
28-
uses: golangci/golangci-lint-action@v3
28+
uses: golangci/golangci-lint-action@v6
2929
with:
3030
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
3131
version: v1.55.2
@@ -39,8 +39,5 @@ jobs:
3939
# into fixing all linting issues in the whole file instead.
4040
args: --timeout=30m --whole-files
4141

42-
# Optional: if set to true then the action will use pre-installed Go.
43-
skip-go-installation: true
44-
4542
# Optional: show only new issues if it's a pull request. The default value is `false`.
4643
only-new-issues: true

NOTICE.txt

+1,716-843
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: enhancement
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Fleet Server component now uses policy output configuration to communicate with Elasticsearch
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
description: |
20+
Alter how elatic-agent passes the fleet-server output component so that the policy's output is used.
21+
In cases where fleet-server encounters an error when trying to use the policy's output it will use
22+
the configuration specified during enrollment as a fallback. In cases where it uses the fallback
23+
the policy's output is periodically retested and used if it's successful.
24+
25+
# Affected component; a word indicating the component this changeset affects.
26+
component:
27+
28+
# PR URL; optional; the PR number that added the changeset.
29+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
30+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
31+
# Please provide it if you are adding a fragment for a different PR.
32+
pr: https://github.com/elastic/elastic-agent/pull/4643
33+
34+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
35+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
36+
issue: https://github.com/elastic/elastic-agent/issue/2784
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Add cloudbeat asset inventory aws
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: cloudbeat
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
#pr: https://github.com/owner/repo/1234
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

docs/fleet-server-bootstrap.asciidoc

+58
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,61 @@ its API key to use for communication. The new `fleet.yml` still includes the `fl
8888
but this time the `fleet.server.bootstrap: false` is set.
8989
. `enroll` command then either restarts the running Elatic Agent daemon if one was running
9090
from Step 2, or it stops the spawned `run` subprocess and returns.
91+
92+
=== Elasticsearch output
93+
94+
The options passed that are used to specify fleet-server initially connects to elasticsearch are:
95+
96+
- `--fleet-server-es`
97+
- `--fleet-server-es-ca`
98+
- `--fleet-server-es-ca-trusted-fingerprint`
99+
- `--fleet-server-es-insecure`
100+
- `--fleet-server-es-cert`
101+
- `--fleet-server-es-cert-key`
102+
- `--fleet-server-es-service-token`
103+
- `--fleet-server-es-service-token-path`
104+
- `--proxy-url`
105+
- `--proxy-disabled`
106+
- `--proxy-header`
107+
108+
These options are always passed under a `bootstrap` attribute in the output when elastic-agent is passing config to fleet-server.
109+
When the fleet-server recieves an output block, it will inject any keys that are missing from the top level output but are specified in the `bootstrap` block
110+
After injecting the keys from bootstrap, fleet-server will test connecting the Elasticsearch with the output.
111+
If the test fails, the values under the `bootstrap` attribute are used as the output and fleet-server will periodically retest the output in case the error was caused by a temporary network issue.
112+
Note that if `--fleet-server-es-insecure` is specified, and the output in the policy contains one or more CA, or a CA fingerprint, the `--fleet-server-es-insecure` flag is ignored.
113+
114+
An example of this sequence is sequence is:
115+
116+
1) elastic-agent starts fleet-server and sends an output block that looks similar to:
117+
```yaml
118+
output:
119+
bootstrap:
120+
service_token: VALUE
121+
hosts: ["HOST"]
122+
```
123+
124+
2) fleet-server injects attributes into the top level from bootstrap if they are missing, resulting in
125+
```yaml
126+
output:
127+
service_token: VALUE
128+
hosts: ["HOST"]
129+
```
130+
131+
3) fleet-server connects to Elasticsearch with the output block
132+
4) elastic-agent enrolls and recieves its policy
133+
5) elastic-agent sends configuration generated from the policy to fleet-server, this may result in the output as follows:
134+
```yaml
135+
output:
136+
hosts: ["HOST", "HOST2"]
137+
bootstrap:
138+
service_token: VALUE
139+
hosts: ["HOST"]
140+
```
141+
142+
6) fleet-server will inject missing values resulting in:
143+
```yaml
144+
output:
145+
service_token: VALUE
146+
hosts: ["HOST", "HOST2"]
147+
```
148+
7) fleet-server tests and uses the resulting output block.

0 commit comments

Comments
 (0)