Before this PR, we gave the annotation tortoise-name and used them in the Pod/HPA mutating webhook.
But, it could make a problem in this kind of scenario:
HPA is managed by Tortoise, which means it has tortoise annotation.
HPA is updated by a user. Tortoise name annotation is given at a tortoise reconciliation, this update may remove tortoise name annotation. The annotation will be restored at a next reconciliation.
At (2), Tortoise's HPA mutating webhook cannot notice a updated HPA is managed by Tortoise.
This PR stops depending on tortoise name annotation. Instead, we find an appropriate tortoise by checking all tortoises in the same namespace as HPA/Pod.
What this PR does / why we need it:
Before this PR, we gave the annotation tortoise-name and used them in the Pod/HPA mutating webhook. But, it could make a problem in this kind of scenario:
This PR stops depending on tortoise name annotation. Instead, we find an appropriate tortoise by checking all tortoises in the same namespace as HPA/Pod.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: