argocd-operator icon indicating copy to clipboard operation
argocd-operator copied to clipboard

ArgoCDExport with existing PVC is not using the correct name field

Open momoadc opened this issue 4 years ago • 5 comments

Describe the bug I tried to connect ArgoCDExport to an existing PVC which is allocated using CSI driver (using the dataSource fields). When going through the source code of the operator I found out that the claim name to be used is the ArgoCDExport name and not the name field under dataSource

To Reproduce Steps to reproduce the behavior:

  1. Create a PVC.
  2. Create a ArgoCDExport with the corresponding name and kind under dataSource and set the backend field to local
  3. The created CronJob template is mounting EmptyDir instead of the existing PVC.

Expected behavior being able to create existing PVC and ArgoCDExport with different names while specifing the correct PVC name.

momoadc avatar Jun 21 '21 14:06 momoadc

Hi @momoadc , Thanks a lot for raising issue with us :)

You mentioned that you have already looked into the code which is doing wrong, do you want to contribute this to us ? Thanks :)

iam-veeramalla avatar Jun 21 '21 17:06 iam-veeramalla

Offcourse. https://github.com/argoproj-labs/argocd-operator/blob/3aa839b023883b564ac5bfd6012f16f9ce19797b/pkg/controller/argocdexport/job.go#L130

Do you want to raise a PR with the changes ?

iam-veeramalla avatar Jun 22 '21 07:06 iam-veeramalla

From what i have seen the field dataSource is not integrated with ArgoCDExport yet (it is not used at all). the fix requires more then changing the line.

momoadc avatar Jun 22 '21 07:06 momoadc

From what i have seen the field dataSource is not integrated with ArgoCDExport yet (it is not used at all). the fix requires more then changing the line.

got it :) .. Thanks for the response.

iam-veeramalla avatar Jun 22 '21 07:06 iam-veeramalla