-
Notifications
You must be signed in to change notification settings - Fork 237
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
Error 404 updating ArtifactRegistryRepository #339
Comments
Hi @currankaushik, sorry you ran into this. I tried reproducing your issue and noticed that when applying the new ArtifactRegistryRepository, I received an In the meantime, to prevent this, I'd recommend adding this annotation to the first instance of your resource:
so that you can immediately acquire it on the second one. Also, the lease expires after 40 minutes, so there's a good chance you can acquire the resource now without any issues (if it's been deleted from namespace1 for a while). |
Thanks @caieo for this context and the link to the documentation. A few follow-up questions:
|
@currankaushik, another user reported an error with ArtifactRegistryRepository (#348) where I posted a workaround for their situation. We will look into why/where the 404 error is appearing from, please monitor the issue I linked earlier for updates on that. For your scenario in particular, you mentioned you weren't sure if you could add the annotation on the CRD you deleted. It might be best to reapply/reacquire the resource (in namespace1) so that you can update the annotation. Once that annotation is updated, you can delete it safely and reacquire it with your other namespace. |
Ok, I tried following a combination of the guidance from here and #348. I'll recap my actions here in case it's relevant for #348. I reapplied the ArtifactRegistoryRepository in namespace1. This resulted in the same 404 error from earlier in this thread and #348. I proceeded to modify the annotation. Nothing seemed to change. At this point, I tried following the guidance to delete the k8s object for the ArtifactRegistryRepository - I did this in namespace2 since I wanted to try deleting/recreating to "reclaim" the actual repository. This ended up deleting my repository and its contents 😢. At this point, I basically had a clean slate anyway, so I just deleted all my ArtifactRegistryRepository objects across both namespaces to start from scratch. I'll go ahead and close this issue and follow #348: maybe the 404 issue was unrelated to transferring namespaces, but stems moreso from a situation where the k8s object overlaps with an actual GCP resource that already exists, but cnrm is unaware of? |
Hi @currankaushik, sorry for the late response.
Firstly, I want to apologize that this issue has caused such a problem for you. This is definitely regrettable, and we're sorry. Secondly, we've identified an issue with We've identified the root cause and have put out a fix for review. It should be out by the next release (or the one after). For now, to avoid your Thanks for working with us through this issue. Please feel free to refer to Issue #348 for tracking the fix for this bug. |
Describe the bug
When "transferring" the management of an Artifact Registry Repository from one namespace to another (i.e. abandoning it from the first namespace then creating a new ArtifactRegistryRepository in the second namespace), the controller seems to encounter a 404 error. (Full details in the steps to reproduce below.)
ConfigConnector Version
Run the following command to get the current ConfigConnector version
$ kubectl get ns cnrm-system -o jsonpath='{.metadata.annotations.cnrm\.cloud\.google\.com/version}' 1.27.1
To Reproduce
Steps to reproduce the behavior:
I created an ArtifactRegistryRepository in 1 namespace, but later decided to migrate the management of this ArtifactRegistryRepository to a different namespace. To do this, I added the necessary annotation to my ArtifactRegistryRepository, then deleted the ArtifactRegistryRepository using
kubectl delete
. In my new namespace, I then usedkubectl apply
to recreate my ArtifactRegistryRepository in the new namespace. Upon doing so, I was expecting my new ArtifactRegistryRepository instance to pick up the abandoned Artifact Registry Repository that already exists. Instead, I see this error:Other potentially relevant information:
cnrm.cloud.google.com/project-id: "myproject"
annotation on both Namespaces.YAML snippets:
Original ArtifactRegistryRepository:
New ArtifactRegistryRepository:
Thanks!
The text was updated successfully, but these errors were encountered: