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

Update services plugin #808

Merged
merged 2 commits into from
Jun 1, 2023
Merged

Update services plugin #808

merged 2 commits into from
Jun 1, 2023

Conversation

qmhu
Copy link
Member

@qmhu qmhu commented May 31, 2023

What type of PR is this?

Feature

What this PR does / why we need it:

Update services plugin

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2023

🎉 Successfully Build Images.
Now Support ARM Platforms.
Comment Post Time: 2023-06-01 11:37
Git Version: 56e5852

Docker Registry

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

Image Pull Command
crane-agent:pr-808-56e5852 docker pull gocrane/crane-agent:pr-808-56e5852
dashboard:pr-808-56e5852 docker pull gocrane/dashboard:pr-808-56e5852
metric-adapter:pr-808-56e5852 docker pull gocrane/metric-adapter:pr-808-56e5852
craned:pr-808-56e5852 docker pull gocrane/craned:pr-808-56e5852

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-808-56e5852 \
                   --set metricAdapter.image.repository=gocrane/metric-adapter \
                   --set metricAdapter.image.tag=pr-808-56e5852 \
                   --set craneAgent.image.repository=gocrane/crane-agent \
                   --set craneAgent.image.tag=pr-808-56e5852 \
                   --set cranedDashboard.image.repository=gocrane/dashboard \
                   --set cranedDashboard.image.tag=pr-808-56e5852 crane/crane

Coding Registry

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

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

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-808-56e5852 \
                   --set metricAdapter.image.repository=finops-docker.pkg.coding.net/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-808-56e5852 \
                   --set craneAgent.image.repository=finops-docker.pkg.coding.net/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-808-56e5852 \
                   --set cranedDashboard.image.repository=finops-docker.pkg.coding.net/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-808-56e5852 crane/crane

Ghcr Registry

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

Image Pull Command
crane-agent:pr-808-56e5852 docker pull ghcr.io/gocrane/crane/crane-agent:pr-808-56e5852
dashboard:pr-808-56e5852 docker pull ghcr.io/gocrane/crane/dashboard:pr-808-56e5852
metric-adapter:pr-808-56e5852 docker pull ghcr.io/gocrane/crane/metric-adapter:pr-808-56e5852
craned:pr-808-56e5852 docker pull ghcr.io/gocrane/crane/craned:pr-808-56e5852

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-808-56e5852 \
                   --set metricAdapter.image.repository=ghcr.io/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-808-56e5852 \
                   --set craneAgent.image.repository=ghcr.io/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-808-56e5852 \
                   --set cranedDashboard.image.repository=ghcr.io/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-808-56e5852 crane/crane

@qmhu qmhu requested a review from lbbniu June 1, 2023 02:24
if cpuRequestUtilization := inr.getMaxValue(inr.cpuRequestUtilization, ctx.InputValue(cpuRequestUtilizationKey)); cpuRequestUtilization > inr.cpuRequestUtilization {
return fmt.Errorf("Node %s is not a idle node, because the config value is %f, but the node max cpu request utilization is %f ", ctx.Object.GetName(), inr.cpuRequestUtilization, cpuRequestUtilization)
if inr.cpuRequestUtilization != 0 {
cpuRequestUtilization, err := inr.BaseRecommender.GetPercentile(inr.cpuRequestUtilization, ctx.InputValue(cpuRequestUtilizationKey))
Copy link
Member

@lbbniu lbbniu Jun 1, 2023

Choose a reason for hiding this comment

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

the first argument should be inr.cpuPercentile

if memoryRequestUtilization := inr.getMaxValue(inr.memoryRequestUtilization, ctx.InputValue(memoryRequestUtilizationKey)); memoryRequestUtilization > inr.memoryRequestUtilization {
return fmt.Errorf("Node %s is not a idle node, because the config value is %f, but the node max memory request utilization is %f ", ctx.Object.GetName(), inr.memoryRequestUtilization, memoryRequestUtilization)
if inr.memoryRequestUtilization != 0 {
memoryRequestUtilization, err := inr.BaseRecommender.GetPercentile(inr.memoryRequestUtilization, ctx.InputValue(memoryRequestUtilizationKey))
Copy link
Member

@lbbniu lbbniu Jun 1, 2023

Choose a reason for hiding this comment

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

the first argument should be inr.memoryPercentile

Copy link
Member Author

Choose a reason for hiding this comment

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

a mistake...

@qmhu
Copy link
Member Author

qmhu commented Jun 1, 2023

@lbbniu PTAL

@lbbniu
Copy link
Member

lbbniu commented Jun 1, 2023

LGTM

@qmhu qmhu merged commit ed187a1 into gocrane:main Jun 1, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants