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

Checking for deployment equality in deployment cache #275

Merged
merged 10 commits into from
Oct 25, 2021

Conversation

arschles
Copy link
Collaborator

@arschles arschles commented Sep 29, 2021

This PR ensures that the deployment cache sends the proper event type (MODIFIED or ADDED) when it does periodic pings.

Checklist

Fixes #277

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
@arschles arschles marked this pull request as ready for review September 29, 2021 22:32
@arschles
Copy link
Collaborator Author

@ajanth97 what do you think?

@arschles arschles enabled auto-merge (squash) September 30, 2021 19:41
@arschles arschles added this to the v0.2.0 milestone Sep 30, 2021
@@ -178,7 +206,8 @@ func (k *K8sDeploymentCache) addEvt(evt watch.Event) error {
"watch event did not contain a Deployment",
)
}
k.latest[depl.GetObjectMeta().GetName()] = *depl
depl.GetName()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@arschles please assign this to a variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ajanth97 thanks for this. This code is redundant so I removed it.

Copy link

@bketelsen bketelsen left a comment

Choose a reason for hiding this comment

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

LGTM

@arschles
Copy link
Collaborator Author

thanks @bketelsen ! I really appreciate the review.

even though the linkinator check is failing, I am going to merge this. the work to fix the links is being tracked in kedacore/keda#2215

@arschles arschles merged commit 53b14e2 into kedacore:main Oct 25, 2021
@arschles arschles deleted the depl-cache-checks branch October 25, 2021 18:44
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.

Deployment cache does not fire the right event on polling intervals
3 participants