cannot update status onepassworditems.onepassword.com <resource_name> not found
antonio-robles-1 opened this issue ยท 2 comments
Your environment
Operator Version: 1.5.0
Connect Server Version: 1.5.6
Kubernetes Version: 1.21
What happened?
I am trying to create a onepassword item, like below:
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: dev-tableau-mat
namespace: back
spec:
itemPath: "vaults/rpfkb5tonxvhotbj7y7v3jmaya/items/6rxj35eudmhlogcs2xrye4xt3i"
The item previously exists in that vault and the operator is able to create the secret without problems, but the operator throws an error:
{
"level":"error",
"ts":1659007217.0285819,
"logger":"controller-runtime.controller",
"msg":"Reconciler error",
"controller":"onepassworditem-controller",
"request":"back/dev-tableau-mat",
"error":"cannot update status: onepassworditems.onepassword.com \"dev-tableau-mat\" not found",
"stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/workspace/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:90"
}
The resource is also created:
$ kubectl -n back get onepassworditems.onepassword.com
NAME AGE
dev-tableau-mat 30m
I do not uderstand why is throwing a "not found" error
We had this issue because we didn't update the OnePasswordItem CustomResourceDefinition when we updated to 1.5.0, we fixed it by applying the CRDs from v1.5.0.
Hey folks! ๐
I will be closing this issue since it seems that the solution for this is to update the CRD that also supports the new Status
property (which was added from v1.5.0 onwards). Feel free to reopen it if this persists. ๐