Skip to content

Commit 124ca95

Browse files
authored
Merge branch 'main' into add_k8s_events_kube_stack
2 parents 497ed84 + 476d721 commit 124ca95

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

internal/pkg/agent/application/actions/handlers/handler_action_migrate.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,19 @@ func (h *Migrate) Handle(ctx context.Context, a fleetapi.Action, ack acker.Acker
7777
return err
7878
}
7979

80+
// signed data contains secret reference to the enrollment token so we extract the cleartext value
81+
// out of action.Data and replace it after unmarshalling the signed data into action.Data
82+
// see: https://github.com/elastic/fleet-server/blob/22f1f7a0474080d3f56c7148a6505cff0957f549/internal/pkg/secret/secret.go#L75
83+
enrollmentToken := action.Data.EnrollmentToken
84+
8085
if signedData != nil {
8186
if err := json.Unmarshal(signedData, &action.Data); err != nil {
8287
return fmt.Errorf("failed to convert signed data to action data: %w", err)
8388
}
8489
}
8590

91+
action.Data.EnrollmentToken = enrollmentToken
92+
8693
if err := h.coord.Migrate(ctx, action, fleetgateway.RequestBackoff); err != nil {
8794
// this should not happen, unmanaged agent should not receive the action
8895
// defensive coding to avoid misbehavior

internal/pkg/otel/samples/darwin/autoops_es.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ exporters:
3636
headers:
3737
Authorization: "AutoOpsToken ${env:AUTOOPS_TOKEN}"
3838
endpoint: ${env:AUTOOPS_OTEL_URL}
39+
sending_queue:
40+
batch:
41+
max_size: 4194304 # 4 MiB
42+
sizer: bytes
43+
enabled: true
3944

4045
service:
4146
pipelines:

internal/pkg/otel/samples/linux/autoops_es.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ exporters:
3636
headers:
3737
Authorization: "AutoOpsToken ${env:AUTOOPS_TOKEN}"
3838
endpoint: ${env:AUTOOPS_OTEL_URL}
39+
sending_queue:
40+
batch:
41+
max_size: 4194304 # 4 MiB
42+
sizer: bytes
43+
enabled: true
3944

4045
service:
4146
pipelines:

internal/pkg/otel/samples/windows/autoops_es.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ exporters:
3636
headers:
3737
Authorization: "AutoOpsToken ${env:AUTOOPS_TOKEN}"
3838
endpoint: ${env:AUTOOPS_OTEL_URL}
39+
sending_queue:
40+
batch:
41+
max_size: 4194304 # 4 MiB
42+
sizer: bytes
43+
enabled: true
3944

4045
service:
4146
pipelines:

0 commit comments

Comments
 (0)