delete recommendation belong to recommendationrule if target oject not found#692
Merged
qmhu merged 1 commit intogocrane:mainfrom Feb 20, 2023
Merged
Conversation
…ect has been deleted, delete correspond recommendation.
Contributor
|
🎉 Successfully Build Images. Docker RegistryOverview: https://hub.docker.com/u/gocrane
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-692-a54d84a \
--set metricAdapter.image.repository=gocrane/metric-adapter \
--set metricAdapter.image.tag=pr-692-a54d84a \
--set craneAgent.image.repository=gocrane/crane-agent \
--set craneAgent.image.tag=pr-692-a54d84a \
--set cranedDashboard.image.repository=gocrane/dashboard \
--set cranedDashboard.image.tag=pr-692-a54d84a crane/craneCoding RegistryOverview: https://finops.coding.net/public-artifacts/gocrane/crane/packages
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-692-a54d84a \
--set metricAdapter.image.repository=finops-docker.pkg.coding.net/gocrane/crane/metric-adapter \
--set metricAdapter.image.tag=pr-692-a54d84a \
--set craneAgent.image.repository=finops-docker.pkg.coding.net/gocrane/crane/crane-agent \
--set craneAgent.image.tag=pr-692-a54d84a \
--set cranedDashboard.image.repository=finops-docker.pkg.coding.net/gocrane/crane/dashboard \
--set cranedDashboard.image.tag=pr-692-a54d84a crane/craneGhcr RegistryOverview: https://github.com/orgs/gocrane/packages?repo_name=crane
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-692-a54d84a \
--set metricAdapter.image.repository=ghcr.io/gocrane/crane/metric-adapter \
--set metricAdapter.image.tag=pr-692-a54d84a \
--set craneAgent.image.repository=ghcr.io/gocrane/crane/crane-agent \
--set craneAgent.image.tag=pr-692-a54d84a \
--set cranedDashboard.image.repository=ghcr.io/gocrane/crane/dashboard \
--set cranedDashboard.image.tag=pr-692-a54d84a crane/crane |
qmhu
reviewed
Feb 16, 2023
Member
qmhu
left a comment
There was a problem hiding this comment.
When recommendationrule controller rerun the progress, the orphan recommendation also will be deleted?
qmhu
approved these changes
Feb 20, 2023
Member
|
Solve the error that throws in RecommendationController, good improvement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
optimize
What this PR does / why we need it:
if we deploy recommendationrule to cover all deployment/statefulset like example, craned will create correspond recommendation for all deployment/statefulset.
If we delete some workloads (required for testing), the recommendation will not be deleted. After a period of time, there will be many unavailable recommedations in the cluster.
so this PR optimizes the issue. if recommendation is created by recommendationrule and its target object has been deleted, delete correspond recommendation.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: