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

add maxConcurrentReconciles flag for tsp controller #694

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

whitebear009
Copy link
Contributor

What type of PR is this?

optimize

What this PR does / why we need it:

Currently tsp controller reconcile a goroutine to query data from prometheus. Sometimes query take long time and need to increase the value of goroutines to run the reconcile.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@github-actions github-actions bot added the area:algorithm crane algorithm label Feb 14, 2023
@github-actions
Copy link
Contributor

🎉 Successfully Build Images.
Now Support ARM Platforms.
Comment Post Time: 2023-02-14 17:04
Git Version: a28c60d

Docker Registry

Overview: https://hub.docker.com/u/gocrane

Image Pull Command
crane-agent:pr-694-a28c60d docker pull gocrane/crane-agent:pr-694-a28c60d
dashboard:pr-694-a28c60d docker pull gocrane/dashboard:pr-694-a28c60d
metric-adapter:pr-694-a28c60d docker pull gocrane/metric-adapter:pr-694-a28c60d
craned:pr-694-a28c60d docker pull gocrane/craned:pr-694-a28c60d

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=gocrane/craned \
                   --set craned.image.tag=pr-694-a28c60d \
                   --set metricAdapter.image.repository=gocrane/metric-adapter \
                   --set metricAdapter.image.tag=pr-694-a28c60d \
                   --set craneAgent.image.repository=gocrane/crane-agent \
                   --set craneAgent.image.tag=pr-694-a28c60d \
                   --set cranedDashboard.image.repository=gocrane/dashboard \
                   --set cranedDashboard.image.tag=pr-694-a28c60d crane/crane

Coding Registry

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-694-a28c60d docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-694-a28c60d
dashboard:pr-694-a28c60d docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-694-a28c60d
metric-adapter:pr-694-a28c60d docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-694-a28c60d
craned:pr-694-a28c60d docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-694-a28c60d

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=finops-docker.pkg.coding.net/gocrane/crane/craned \
                   --set craned.image.tag=pr-694-a28c60d \
                   --set metricAdapter.image.repository=finops-docker.pkg.coding.net/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-694-a28c60d \
                   --set craneAgent.image.repository=finops-docker.pkg.coding.net/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-694-a28c60d \
                   --set cranedDashboard.image.repository=finops-docker.pkg.coding.net/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-694-a28c60d crane/crane

Ghcr Registry

Overview: https://github.com/orgs/gocrane/packages?repo_name=crane

Image Pull Command
crane-agent:pr-694-a28c60d docker pull ghcr.io/gocrane/crane/crane-agent:pr-694-a28c60d
dashboard:pr-694-a28c60d docker pull ghcr.io/gocrane/crane/dashboard:pr-694-a28c60d
metric-adapter:pr-694-a28c60d docker pull ghcr.io/gocrane/crane/metric-adapter:pr-694-a28c60d
craned:pr-694-a28c60d docker pull ghcr.io/gocrane/crane/craned:pr-694-a28c60d

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=ghcr.io/gocrane/crane/craned \
                   --set craned.image.tag=pr-694-a28c60d \
                   --set metricAdapter.image.repository=ghcr.io/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-694-a28c60d \
                   --set craneAgent.image.repository=ghcr.io/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-694-a28c60d \
                   --set cranedDashboard.image.repository=ghcr.io/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-694-a28c60d crane/crane

Copy link
Member

@qmhu qmhu left a comment

Choose a reason for hiding this comment

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

Is is only for tsp controller?

@whitebear009
Copy link
Contributor Author

whitebear009 commented Feb 16, 2023

At present, I think the performance problem of tsp is relatively big(calculating custom metrics maybe very slow), so I added it to tsp first (I see kube
-controller-manager is also a separate flag for each controller, https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/#options).

There may be some concurrency problems when setting concurrency. I haven't tested other controllers yet. After the test, I can also add flags to other controllers. How do you think?

Copy link
Member

@qmhu qmhu left a comment

Choose a reason for hiding this comment

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

LGTM

@qmhu qmhu merged commit 3597bbf into gocrane:main Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:algorithm crane algorithm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants