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

Uninstalling akri does not remove configurations, instances nor broker pods #706

Closed
kate-goldenring opened this issue Oct 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kate-goldenring
Copy link
Contributor

With the latest Agent, when you uninstall Akri, all Akri pods (controller, agent, etc) are terminated however the akri config, instances, and broker pods are left running:

helm repo add akri-helm-charts https://project-akri.github.io/akri/
helm install akri akri-helm-charts/akri-dev \
    --set agent.allowDebugEcho=true \
    --set debugEcho.discovery.enabled=true \
    --set debugEcho.configuration.enabled=true \
    --set debugEcho.configuration.brokerJob.image.repository=busybox \
    --set debugEcho.configuration.shared=false

Uninstall akri: helm uninstall akri

Leftover resources:

$ k get akrii,akric,pod
NAME                                      CONFIG            SHARED   NODES                               AGE
instance.akri.sh/akri-debug-echo-489660   akri-debug-echo   false    ["kagold-thinkpad-x1-carbon-6th"]   5m26s
instance.akri.sh/akri-debug-echo-93a7b0   akri-debug-echo   false    ["kagold-thinkpad-x1-carbon-6th"]   5m26s

NAME                                    CAPACITY   AGE
configuration.akri.sh/akri-debug-echo   2          5m34s

NAME                             READY   STATUS    RESTARTS   AGE
pod/akri-debug-echo-489660-pod   1/1     Running   0          5m26s
pod/akri-debug-echo-93a7b0-pod   1/1     Running   0          5m26s

I think it has to do with some issues with finalizers in the agent -- there must be one on the configuration resource that is preventing it from being deleted, since i can't even delete it with kubectl cc @diconico07

@kate-goldenring kate-goldenring added the bug Something isn't working label Oct 22, 2024
@github-project-automation github-project-automation bot moved this to Triage needed in Akri Roadmap Oct 22, 2024
@kate-goldenring kate-goldenring changed the title Uninstalling akri does not remove instances nor broker pods Uninstalling akri does not remove configurations, instances nor broker pods Oct 22, 2024
@kate-goldenring
Copy link
Contributor Author

These are the finalizers on the resources:

Config

apiVersion: akri.sh/v0
kind: Configuration
metadata:
  ...
  finalizers:
  - kagold-thinkpad-x1-carbon-6th

Instance

apiVersion: akri.sh/v0
  kind: Instance
  metadata:
    ...
    finalizers:
    - kagold-thinkpad-x1-carbon-6th

@kate-goldenring
Copy link
Contributor Author

Removing the finalizers automatically deletes the resources:

k patch akric akri-debug-echo --type='merge' -p '{"metadata":{"finalizers":[]}}'
k patch akrii akri-debug-echo-489660 akri-debug-echo-93a7b0 --type='merge' -p '{"metadata":{"finalizers":[]}}'

@kate-goldenring
Copy link
Contributor Author

Here is one to use on all instances and configs:

k patch akric $(k get akric | tail -n +2 | awk '{print $1}') --type='merge' -p '{"metadata":{"finalizers":[]}}'
k patch akrii $(k get akrii | tail -n +2 | awk '{print $1}') --type='merge' -p '{"metadata":{"finalizers":[]}}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant