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 adoption type to recommendation #40

Merged
merged 2 commits into from Mar 7, 2022
Merged

Add adoption type to recommendation #40

merged 2 commits into from Mar 7, 2022

Conversation

qmhu
Copy link
Member

@qmhu qmhu commented Feb 11, 2022

Provide a way to let recommendation take effect.

  • when set to AdoptionTypeStatus, recommendation value only present on recommendation.status.recommendationValue
  • when set to AdoptionTypeStatusAndAnnotation, recommendation value only present on recommendation.status.recommendationValue and target object's annotation
  • when set to AdoptionTypeAuto, recommendation value not only in status and annotation, it will apply to target's spec. If recommendation is Once , the value will apply to object once, if it is Periodical, the value will apply to object in every turn.

@mfanjie
Copy link
Contributor

mfanjie commented Feb 18, 2022

the value will apply to object once, if it is Periodical, the value will apply to object in every turn.
what's the different of this behavior from vpa?

@kitianFresh
Copy link
Contributor

We should implement a remote apply provider so that crane is compatible with some crd operator, if the workload is controlled by a crd operator, we can not apply the workload directly.

@qmhu
Copy link
Member Author

qmhu commented Feb 21, 2022

We should implement a remote apply provider so that crane is compatible with some crd operator, if the workload is controlled by a crd operator, we can not apply the workload directly.

If adoptionType != Auto, then user can apply it by themselves.

@qmhu
Copy link
Member Author

qmhu commented Feb 21, 2022

the value will apply to object once, if it is Periodical, the value will apply to object in every turn. what's the different of this behavior from vpa?

Adoption defines the behavior for recommendation. It only care how to apply recommendation value to workload or just present it on recommendation.status or annotation, so if you create a recommendation for vpa and set adoptionType to Auto, then it will apply recommendation value to vpa based on CompletionStrategy.

Consider we recommend vpa's scalingStrategy and CompletionStrategy is Periodical, then recommendation will recommend scalingStrategy according to algo continuously.

@mfanjie
Copy link
Contributor

mfanjie commented Feb 23, 2022

/lgtm

1 similar comment
@yufeiyu
Copy link
Contributor

yufeiyu commented Mar 7, 2022

/lgtm

@qmhu qmhu merged commit 6171d03 into gocrane:main Mar 7, 2022
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.

None yet

4 participants