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

Fix map growing #67

Merged
merged 5 commits into from
May 18, 2023
Merged

Fix map growing #67

merged 5 commits into from
May 18, 2023

Conversation

toshipp
Copy link
Contributor

@toshipp toshipp commented May 15, 2023

We store pods event times to maps and delete them if pods are deleted. But we misunderstood the controller-runtime delete events that do not provide object names, the deletion did not work. This PR leverages a finalizer to get object names properly.

Since controller-runtime does not provide a pod name if the pod is
deleted, we can not delete an item storing event times from maps.
To solve this, add a finalizer to pods to get their names.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
To make sure to delete a pod from job, set deletion policy to background
for job deletion.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
Since check function runs peridically, it may miss a deleting pod event.
To prevent it, run the function before deleting pod events from maps.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
The group name seems not to accept version.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
The previous code checks standard or dummy SC. But we actually want to
check both.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
@toshipp toshipp requested a review from a team as a code owner May 15, 2023 07:40
@cupnes cupnes merged commit ed3563e into main May 18, 2023
@cupnes cupnes deleted the fix-map-growing branch May 18, 2023 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants