From 34fd8d2a5c8edb86d160c085a6b7f099e734f4a4 Mon Sep 17 00:00:00 2001 From: Dominika Molenda Date: Fri, 19 Apr 2024 12:21:51 +0200 Subject: [PATCH 1/4] [cmd/opampsupervisor] Use nop components during bootstrapping --- .../supervisor/templates/bootstrap.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml b/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml index 983b62c4af59..e18970a40e56 100644 --- a/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml +++ b/cmd/opampsupervisor/supervisor/templates/bootstrap.yaml @@ -1,11 +1,7 @@ receivers: - otlp: - protocols: - http: - endpoint: "localhost:{{.EndpointPort}}" + nop: exporters: - debug: - verbosity: basic + nop: extensions: opamp: @@ -19,6 +15,6 @@ extensions: service: pipelines: traces: - receivers: [otlp] - exporters: [debug] + receivers: [nop] + exporters: [nop] extensions: [opamp] From edf2148c50b27050c9f2082a9471f544c81b74c7 Mon Sep 17 00:00:00 2001 From: Dominika Molenda Date: Fri, 19 Apr 2024 22:39:48 +0200 Subject: [PATCH 2/4] Add changelog and remove EndpointPort --- .../nop-coponents-during-bootstrapping.yaml | 27 +++++++++++++++++++ cmd/opampsupervisor/supervisor/supervisor.go | 6 ----- 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .chloggen/nop-coponents-during-bootstrapping.yaml diff --git a/.chloggen/nop-coponents-during-bootstrapping.yaml b/.chloggen/nop-coponents-during-bootstrapping.yaml new file mode 100644 index 000000000000..acb11d4002f8 --- /dev/null +++ b/.chloggen/nop-coponents-during-bootstrapping.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: opamp/supervisor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Switch the OpAMP Supervisor's bootstrap config to use nopreceiver and nopexporter + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [32455] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/cmd/opampsupervisor/supervisor/supervisor.go b/cmd/opampsupervisor/supervisor/supervisor.go index a84e6444cb9b..d7e91aedfba9 100644 --- a/cmd/opampsupervisor/supervisor/supervisor.go +++ b/cmd/opampsupervisor/supervisor/supervisor.go @@ -219,11 +219,6 @@ func (s *Supervisor) loadConfig(configFile string) error { } func (s *Supervisor) getBootstrapInfo() (err error) { - port, err := s.findRandomPort() - if err != nil { - return err - } - supervisorPort, err := s.findRandomPort() if err != nil { return err @@ -232,7 +227,6 @@ func (s *Supervisor) getBootstrapInfo() (err error) { var cfg bytes.Buffer err = s.bootstrapTemplate.Execute(&cfg, map[string]any{ - "EndpointPort": port, "InstanceUid": s.instanceID.String(), "SupervisorPort": supervisorPort, }) From fca40676a53ac7e3d81a17bd427a91e03e07d74e Mon Sep 17 00:00:00 2001 From: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Date: Tue, 23 Apr 2024 08:06:54 -0400 Subject: [PATCH 3/4] Update .chloggen/nop-coponents-during-bootstrapping.yaml --- .chloggen/nop-coponents-during-bootstrapping.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/nop-coponents-during-bootstrapping.yaml b/.chloggen/nop-coponents-during-bootstrapping.yaml index acb11d4002f8..390a2fa59acd 100644 --- a/.chloggen/nop-coponents-during-bootstrapping.yaml +++ b/.chloggen/nop-coponents-during-bootstrapping.yaml @@ -4,7 +4,7 @@ change_type: enhancement # The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) -component: opamp/supervisor +component: cmd/opampsupervisor # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). note: Switch the OpAMP Supervisor's bootstrap config to use nopreceiver and nopexporter From ce8ce088218431c65fb27f4b6ebace5d134b8f82 Mon Sep 17 00:00:00 2001 From: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Date: Tue, 23 Apr 2024 08:06:59 -0400 Subject: [PATCH 4/4] Update .chloggen/nop-coponents-during-bootstrapping.yaml --- .chloggen/nop-coponents-during-bootstrapping.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/nop-coponents-during-bootstrapping.yaml b/.chloggen/nop-coponents-during-bootstrapping.yaml index 390a2fa59acd..4460b11dfa87 100644 --- a/.chloggen/nop-coponents-during-bootstrapping.yaml +++ b/.chloggen/nop-coponents-during-bootstrapping.yaml @@ -7,7 +7,7 @@ change_type: enhancement component: cmd/opampsupervisor # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Switch the OpAMP Supervisor's bootstrap config to use nopreceiver and nopexporter +note: Switch the OpAMP Supervisor's bootstrap config to use the nopreceiver and nopexporter # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. issues: [32455]