Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12422 restrict agent interface #2534

Merged
merged 23 commits into from
Nov 20, 2023
Merged

Conversation

idoqo
Copy link
Contributor

@idoqo idoqo commented Oct 10, 2023

PMM-12422

Link to the Feature Build: SUBMODULES-3420

If this PR adds or removes or alters one or more API endpoints, please review and add or update the relevant API documents as well:

  • API Docs updated

If this PR is related to some other PRs in this or other repositories, please provide links to those PRs:

  • Links to related pull requests (optional).

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (6c37873) 42.73% compared to head (612be35) 42.76%.

Files Patch % Lines
managed/services/agents/state.go 0.00% 5 Missing ⚠️
admin/commands/management/add_postgresql.go 0.00% 4 Missing ⚠️
admin/commands/management/add_mongodb.go 0.00% 2 Missing ⚠️
admin/commands/management/add_proxysql.go 0.00% 2 Missing ⚠️
...in/commands/inventory/add_agent_mysqld_exporter.go 0.00% 1 Missing ⚠️
...dmin/commands/inventory/add_agent_node_exporter.go 0.00% 1 Missing ⚠️
.../commands/inventory/add_agent_postgres_exporter.go 0.00% 1 Missing ⚠️
.../commands/inventory/add_agent_proxysql_exporter.go 0.00% 1 Missing ⚠️
admin/commands/management/add_mysql.go 0.00% 1 Missing ⚠️
agent/commands/clients.go 0.00% 1 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2534      +/-   ##
==========================================
+ Coverage   42.73%   42.76%   +0.02%     
==========================================
  Files         391      391              
  Lines       49241    49282      +41     
==========================================
+ Hits        21043    21074      +31     
- Misses      26218    26227       +9     
- Partials     1980     1981       +1     
Flag Coverage Δ
admin 10.47% <0.00%> (+0.02%) ⬆️
agent 53.47% <66.66%> (+<0.01%) ⬆️
managed 43.52% <80.00%> (+0.03%) ⬆️
vmproxy 68.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@idoqo idoqo changed the title Pmm 12422 restrict agent interface PMM-12422 restrict agent interface Oct 10, 2023
@idoqo idoqo marked this pull request as ready for review October 18, 2023 17:56
@idoqo idoqo requested review from BupycHuk and a team as code owners October 18, 2023 17:56
@idoqo idoqo requested review from artemgavrilov, JiriCtvrtka and ademidoff and removed request for a team October 18, 2023 17:56
api/managementpb/agent/agent.proto Outdated Show resolved Hide resolved
api/managementpb/mongodb.proto Outdated Show resolved Hide resolved
managed/models/database.go Outdated Show resolved Hide resolved
Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to implement this flag for inventory commands and flags as well.
Regarding variable name maybe it's better to keep it shorter like --expose-exporter?

managed/services/agents/agents.go Outdated Show resolved Hide resolved
admin/commands/management/add.go Outdated Show resolved Hide resolved
admin/commands/management/add.go Outdated Show resolved Hide resolved
managed/models/database.go Outdated Show resolved Hide resolved
@ademidoff
Copy link
Member

we need to implement this flag for inventory commands and flags as well. Regarding variable name maybe it's better to keep it shorter like --expose-exporter?

An even better term would use the verb bind, which seems to be heavily used in such cases. I guess something like --bind-all-interfaces or --bind-all would sound reasonable and more semantic.

@idoqo
Copy link
Contributor Author

idoqo commented Oct 20, 2023

we need to implement this flag for inventory commands and flags as well. Regarding variable name maybe it's better to keep it shorter like --expose-exporter?

An even better term would use the verb bind.

I went with this initially too, but then felt like we may want to have "exporter" somewhere in the flag to reflect the fact that only exporters will be affected.

@BupycHuk
Copy link
Member

it can be --bind-exporter with two options all and local

@idoqo idoqo requested review from ademidoff and BupycHuk October 23, 2023 06:32
@@ -185,6 +190,8 @@ message MongoDBExporter {
string process_exec_path = 16;
// Log level for exporter.
LogLevel log_level = 17;
// Optionally expose the exporter process on 0.0.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there should be better wording for the description. Maybe expose exporter APIs to the world

@idoqo idoqo merged commit 1b1661c into main Nov 20, 2023
32 checks passed
@idoqo idoqo deleted the PMM-12422-restrict-agent-interface branch November 20, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants