Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kitianFresh
Copy link
Contributor

What type of PR is this?

Feature

What this PR does / why we need it:

Now, cron has some flaws if only specified one cron, then if the time is not in cron start and end, the metric will be default 1. it is unexpected for users.

Mapping many crons in one ehpa to only one metric, put many cron compare logic in metric-adapter to solve this problem.

Which issue(s) this PR fixes:

Fixes #226

Special notes for your reviewer:

@kitianFresh kitianFresh requested a review from qmhu March 23, 2022 11:13
@kitianFresh kitianFresh force-pushed the feature/refine-cron-ehpa-to-single-metric-way branch from d1a42a0 to 7a17fb4 Compare March 23, 2022 11:20
metadata:
name: metric-adapter
rules:
- apiGroups:
Copy link
Member

Choose a reason for hiding this comment

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

@mfanjie suggest not use too wide regex for rbac before, so do we have to change to * ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because now the adapter need to list the workload scale to get the current replicas when cron is not active, we do not know what kind group, it will forbidden when not specified

@qmhu
Copy link
Member

qmhu commented Mar 23, 2022

/LGTM

@qmhu qmhu merged commit 3777db7 into gocrane:main Mar 24, 2022
@kitianFresh kitianFresh self-assigned this Mar 24, 2022
@kitianFresh kitianFresh added this to the 0.4.0 milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Refine the cron metric

2 participants