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

[Bug] CRDs Hang around #3

Open
christianh814 opened this issue Dec 2, 2022 · 3 comments
Open

[Bug] CRDs Hang around #3

christianh814 opened this issue Dec 2, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@christianh814
Copy link
Member

christianh814 commented Dec 2, 2022

CRDs seem to hang around after migration. Example from my test system

$ mta scan
┌───────────────┬─────────────┬─────────────┬─────────────────────────────────────────────────────────────────┐
│ KIND          │ NAME        │ NAMESPACE   │ STATUS                                                          │
├───────────────┼─────────────┼─────────────┼─────────────────────────────────────────────────────────────────┤
│ Kustomization │ flux-system │ flux-system │ Applied revision: main/f35c47113103d67b20859a2301fa5c88a8f7c6c9 │
└───────────────┴─────────────┴─────────────┴─────────────────────────────────────────────────────────────────┘

But the migration has already happened

$ kubectl get pods -A
NAMESPACE            NAME                                               READY   STATUS    RESTARTS   AGE
argocd               argocd-application-controller-0                    1/1     Running   0          28m
argocd               argocd-applicationset-controller-695d5488d-sktdf   1/1     Running   0          28m
argocd               argocd-dex-server-6896f577ff-mg9fm                 1/1     Running   0          28m
argocd               argocd-notifications-controller-6774bf5859-kvv26   1/1     Running   0          28m
argocd               argocd-redis-79c755c747-wwvdm                      1/1     Running   0          28m
argocd               argocd-repo-server-7bbc9bcf85-fw828                1/1     Running   0          28m
argocd               argocd-server-8455bf6676-mdhlm                     1/1     Running   0          28m
bgd                  bgd-674c98bf9c-frpsp                               1/1     Running   0          29m
kube-system          coredns-565d847f94-9t7nf                           1/1     Running   0          29m
kube-system          coredns-565d847f94-csbvn                           1/1     Running   0          29m
kube-system          etcd-kind-control-plane                            1/1     Running   0          29m
kube-system          kindnet-54rmt                                      1/1     Running   0          29m
kube-system          kube-apiserver-kind-control-plane                  1/1     Running   0          29m
kube-system          kube-controller-manager-kind-control-plane         1/1     Running   0          29m
kube-system          kube-proxy-cq5dq                                   1/1     Running   0          29m
kube-system          kube-scheduler-kind-control-plane                  1/1     Running   0          29m
local-path-storage   local-path-provisioner-684f458cdd-9jxr2            1/1     Running   0          29m
podinfo-system       podinfo-758bbb57d6-dlclg                           1/1     Running   0          9m24s
podinfo-system       podinfo-758bbb57d6-l4bjr                           1/1     Running   0          9m24s
quarkus              sample-845fdbd9c-5bt26                             1/1     Running   0          10m
welcome-php          welcome-php-6c665bfb77-wjs29                       1/1     Running   0          29m

Looks like finalizers?

$ kubectl get ns flux-system
NAME          STATUS        AGE
flux-system   Terminating   30m

The FluxCleanUp function could be "smarter"

@christianh814 christianh814 added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Dec 2, 2022
@christianh814
Copy link
Member Author

Found out that some of the Flux configs stay in the flux-system namespace. Describing an Argo CD Application shows

helmrepository.source.toolkit.fluxcd.io/redhat-helm-charts unchanged. Warning: Detected changes to resource redhat-helm-charts which is currently being deleted

Might not want to delete the NS and keep it around?

christianh814 added a commit that referenced this issue Feb 24, 2023
Signed-off-by: Christian Hernandez <christian@chernand.io>
@christianh814 christianh814 reopened this Feb 24, 2023
@christianh814
Copy link
Member Author

NS gets deleted but CRDs still hang around

$ k api-resources  |grep -i flux
helmreleases                      hr                 helm.toolkit.fluxcd.io/v2beta1           true         HelmRelease
kustomizations                    ks                 kustomize.toolkit.fluxcd.io/v1beta2      true         Kustomization
alerts                                               notification.toolkit.fluxcd.io/v1beta2   true         Alert
providers                                            notification.toolkit.fluxcd.io/v1beta2   true         Provider
receivers                                            notification.toolkit.fluxcd.io/v1beta2   true         Receiver
buckets                                              source.toolkit.fluxcd.io/v1beta2         true         Bucket
gitrepositories                   gitrepo            source.toolkit.fluxcd.io/v1beta2         true         GitRepository
helmcharts                        hc                 source.toolkit.fluxcd.io/v1beta2         true         HelmChart
helmrepositories                  helmrepo           source.toolkit.fluxcd.io/v1beta2         true         HelmRepository
ocirepositories                   ocirepo            source.toolkit.fluxcd.io/v1beta2         true         OCIRepository

@christianh814
Copy link
Member Author

Looks like the current workaround is to run flux uninstall after running mta scan --auto-migrate to remove the lingering api-resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant