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

Create repository returns PermissionDenied #193

Closed
cvegagimenez opened this issue Sep 18, 2024 · 1 comment · Fixed by #200
Closed

Create repository returns PermissionDenied #193

cvegagimenez opened this issue Sep 18, 2024 · 1 comment · Fixed by #200
Labels
bug Something isn't working

Comments

@cvegagimenez
Copy link

What happened?

After upgrading ArgoCD from to 2.12.3 version we get permission denied error when trying to create a new Repository.
After verifying against ArgoCD with the ArgoCD CLI we made it to reproduce the same behaviour.

When the repository does not exist, now ArgoCD is returning a permission denied error when trying to get the repository and that error is not controlled in the provider Observe function.

How can we reproduce it?

Try to create a new Repository with the local environment described in the README file and the example in the Marketplace:

apiVersion: repositories.argocd.crossplane.io/v1alpha1
kind: Repository
metadata:
  name: example-project.git
spec:
  forProvider:
    passwordRef:
      key: token
      name: example-project.git
      namespace: crossplane-system
    repo: https://gitlab.com/example-group/example-project.git
    type: git
    username: example-user
  providerConfigRef:
    name: argocd-provider

Result:

Name:         example-scoped-project.git
Namespace:
Labels:       <none>
Annotations:  crossplane.io/external-name: example-scoped-project.git
API Version:  repositories.argocd.crossplane.io/v1alpha1
Kind:         Repository
Metadata:
  Creation Timestamp:  2024-09-18T13:45:36Z
  Generation:          1
  Resource Version:    4509
  UID:                 06021f56-b2d2-4a9a-9cfa-dc0460108515
Spec:
  Deletion Policy:  Delete
  For Provider:
    Password Ref:
      Key:        token
      Name:       example-project.git
      Namespace:  crossplane-system
    Project:      example-project
    Repo:         https://gitlab.com/example-group/example-project-scoped.git
    Type:         git
    Username:     example-user
  Management Policies:
    *
  Provider Config Ref:
    Name:  argocd-provider
Status:
  At Provider:
    Connection State:
  Conditions:
    Last Transition Time:  2024-09-18T13:45:36Z
    Message:               observe failed: rpc error: code = PermissionDenied desc = permission denied
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                         Age                    From                Message
  ----     ------                         ----                   ----                -------
  Warning  CannotObserveExternalResource  2m5s (x12 over 2m16s)  managed/repository  rpc error: code = PermissionDenied desc = permission denied

What environment did it happen in?

Crossplane Provider argocd version: v0.9.0
ArgoCD version running: v2.12.3

@cvegagimenez cvegagimenez added the bug Something isn't working label Sep 18, 2024
@KasnocknDave
Copy link
Contributor

I have forked the project and am currently working on a fix. I will link the open PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants