-
Notifications
You must be signed in to change notification settings - Fork 600
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
Remove any existing finalizer #4512
Comments
@vaikas Is this still relevant? I see 0.20 as release |
@vaikas is this issue still relevant? (v0.20 was released several weeks ago) |
I noticed that yesterday. All in-memory channels created before 0.20 are un-deletable because they contain a We are already on 0.21 so we can probably consider the damage done and move on. Or maybe provide a clean up script outside the regular releases for folks who ran into this. For example: #!/usr/bin/env bash
kubectl get inmemorychannels.messaging.knative.dev -A -o json \
| jq -r '.items[] | select(
.metadata.deletionTimestamp != null
) | @base64' \
| while read -r imc; do
echo "$imc" | base64 -d \
| kubectl patch -f- --type=json -p='[{"op": "remove", "path": "/metadata/finalizers"}]'
done Or change the condition in jq's #!/usr/bin/env bash
kubectl get inmemorychannels.messaging.knative.dev -A -o json \
| jq -r '.items[] | select(
.metadata.finalizers != null
) | @base64' \
| while read -r imc; do
echo "$imc" | base64 -d \
| kubectl patch -f- --type=json -p='[{"op": "remove", "path": "/metadata/finalizers"}]'
done (I use this |
0.20 is old enough now that I don't think it's worth trying to fix this automatically. I added a note pointing to @antoineco's comment in the 0.20.0, 0.20.1, 0.20.2, and 0.20.3 release notes: Known Issues
|
Describe the bug
Prior to #4511 IMC would have finalizer. If this gets upgraded, then the IMC will not get removed. So, we should remove all the existing finalizers.
Expected behavior
Existing IMC after an upgrade to .20 will get properly deleted.
To Reproduce
Steps to reproduce the behavior.
Knative release version
0.20
Additional context
In 0.19, IMC dispatcher would set the finalizer so it would get removed. in #4511 we just deal with this in ReconcileKind, and hence after upgrading to this behaviour, any existing InMemoryChannels will have Finalizer set, but nothing that will clean it up. So, we should probably just remove those always in the Controller in case they are there. Need to test that they will be properly respected with genreconciler (nothing says they won't, but just need to verify this (for example, if it doesn't allow adding/removing additional finalizers)).
The text was updated successfully, but these errors were encountered: