We are trying to deploy Rook's OBC using ArgoCD. We expect that the OB will be created and the status of the OBC will be changed to Bound. However, the process does not end with a Pending status for the following reasons.
I'm going to create a patch to fix the problem.
ArgoCD deploys an OBC resource with the label app.kubernetes.io/instance: <ArgoCD's app name>.
We are trying to deploy Rook's OBC using ArgoCD. We expect that the OB will be created and the status of the OBC will be changed to
Bound
. However, the process does not end with a Pending status for the following reasons. I'm going to create a patch to fix the problem.app.kubernetes.io/instance: <ArgoCD's app name>
.lib-bucket-provisioner
runs. In the reconciling process, update the label with thesetOBCMetaFields
function. When updating a label, existing labels are ignored and only thebucket-provisioner
label is given. https://github.com/kube-object-storage/lib-bucket-provisioner/blob/2e9d6aa76d5895c0b497758e250e9ba69e6c18c1/pkg/provisioner/controller.go#L616 Also, thesetOBCMetaFields
function discards the return value of theUpdate
function. https://github.com/kube-object-storage/lib-bucket-provisioner/blob/2e9d6aa76d5895c0b497758e250e9ba69e6c18c1/pkg/provisioner/controller.go#L624spec.bucketName
andspec.objectBucketName
in OBC after updating OB. However, since the OBC is updated by thesetOBCMetaFields
function, it will output the following message and terminate with an error.the object has been modified; please apply your changes to the latest version and try again, requeuing
https://github.com/kube-object-storage/lib-bucket-provisioner/blob/2e9d6aa76d5895c0b497758e250e9ba69e6c18c1/pkg/provisioner/controller.go#L331app.kubernetes.io/instance:
label to the OBC again.How to reproduce it:
You can reproduce the ArgoCD process by using a shell script like the following.
Environment: Kubernetes: 1.18.9 Rook: 1.5.4 Ceph: 15.2.7