Ensure old revision stays Unreachable after Knative Service update #818
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.
Changes
Fixes knative/serving#14115 by changing how
IsReady
is implemented.Currently, the
IsReady
function of the ServerlessService which is returning false if the generation is different in metadata and status.Due to it temporarily not being ready, the PodAutoscaler is set to SKSReady=Unknown here.
The PodAutoscaler then goes Ready=False because SKSReady is part of Ready here.
The revision inherits the PodAutoscaler status and sets Active=Unknown here.
This causes the PodAutoscaler's Reachability to be set to Unknown here.
Once the PodAutoscaler is not anymore marked as unreachable, the scaling boundary will be set to the min value from the annotation again here. This will cause a revision that is being not needed anymore to scale up again for a short moment which causes additional pods.
I am changing the
IsReady
of the ServerlessService to only check the condition. This fixes the problem and I have not seen negative impact. Though, it undos the work of IsReady should take ObservedGeneration into account #8004 which sounds to me as if it tried to resolve an abstract issue while I here have a real one. Alternative could be to leaveIsReady
unchanged und look at the condition directly in kpa.go.I need somebody with experience in this area to carefully assess if there are side-effects.
/kind bug
Release Note
Docs
None