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

feat: agent add metrics-bind-address flag #1953

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

CharlesQQ
Copy link
Contributor

@CharlesQQ CharlesQQ commented Jun 3, 2022

Signed-off-by: charlesQQ [email protected]

What type of PR is this?
/kind feature

What this PR does / why we need it:
avoid port conflict

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-agent`: Introduced `--metrics-bind-address` flag to specify the address for serving Prometheus metrics.

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 3, 2022
@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 3, 2022
@RainbowMango
Copy link
Member

avoid port conflict

Can you give a more detailed reason why we need it?

@CharlesQQ
Copy link
Contributor Author

CharlesQQ commented Jun 6, 2022

Can you give a more detailed reason why we need it?

I have other application running and listen on port 8080, agent installed on this machine have error port 8080 has already used, so I must change metrics port to other not used port

@@ -112,4 +117,5 @@ func (o *Options) AddFlags(fs *pflag.FlagSet, allControllers []string) {
fs.IntVar(&o.ConcurrentClusterSyncs, "concurrent-cluster-syncs", 5, "The number of Clusters that are allowed to sync concurrently.")
fs.IntVar(&o.ConcurrentWorkSyncs, "concurrent-work-syncs", 5, "The number of Works that are allowed to sync concurrently.")
o.RateLimiterOpts.AddFlags(fs)
fs.StringVar(&o.MetricsBindAddress, "metrics-bind-address", ":8080", "The TCP address that the controller should bind to for serving prometheus metrics(e.g. 127.0.0.1:8088, :8088)")
Copy link
Member

Choose a reason for hiding this comment

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

Karmada-controller-manager already has MetricsBindAddress. It's ok to add it in agent. How about move the flag above o.RateLimiterOpts.AddFlags(fs)?

Copy link
Contributor Author

@CharlesQQ CharlesQQ Jun 12, 2022

Choose a reason for hiding this comment

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

How about move the flag above o.RateLimiterOpts.AddFlags(fs)?

review again please

Copy link
Member

Choose a reason for hiding this comment

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

For me /lgtm
/cc @RainbowMango

@CharlesQQ CharlesQQ force-pushed the karmada-agent-metrics branch from feb60b6 to fe40364 Compare June 12, 2022 16:10
@karmada-bot karmada-bot requested a review from RainbowMango June 13, 2022 02:26
@RainbowMango
Copy link
Member

/approve

We forgot to add this flag at #1346.

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2022
@RainbowMango
Copy link
Member

/lgtm

@Poor12 The /lgtm command should be in a separate line.

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2022
@karmada-bot karmada-bot merged commit 5c3336e into karmada-io:master Jun 13, 2022
@RainbowMango RainbowMango added this to the v1.3 milestone Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants