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

Bug with multiple sources #12588

Closed
rnpaiva opened this issue Feb 23, 2023 · 5 comments
Closed

Bug with multiple sources #12588

rnpaiva opened this issue Feb 23, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@rnpaiva
Copy link

rnpaiva commented Feb 23, 2023

Describe the bug

I cant use multiple sources as described here https://argo-cd.readthedocs.io/en/latest/user-guide/multiple_sources/ .

To Reproduce
Using the application.yaml to configure it :

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: authelia
  namespace: argocd
  labels:
    environment: prod
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
  - repoURL: 'git@github.com:HorizonMedia/next-infrastructure.git'
    path: apps/authelia
    targetRevision: main
    ref: myRepo
  - repoURL: 'https://charts.authelia.com'
    chart: authelia
    targetRevision: 0.8.38
    helm:
      valueFiles:
        - $myRepo/values-prod.yaml
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: authelia
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true



Expected behavior

Get the helm chart from authelia and the values-prod.yaml from my repository.

Screenshots

Version

argocd@argocd-application-controller-0:~$ argocd version
argocd: v2.6.2+6e02f8b
  BuildDate: 2023-02-16T15:05:14Z
  GitCommit: 6e02f8b23201b0620a4ff1bce5d38229ba1eb02e
  GitTreeState: clean
  GoVersion: go1.18.10
  Compiler: gc
  Platform: linux/amd64

Logs

$ kubectl apply -f application.yaml -n argocd
error: error validating "application.yaml": error validating data: ValidationError(Application.spec.source): invalid type for io.argoproj.v1alpha1.Application.spec.source: got "array", expected "map"; if you choose to ignore these errors, turn validation off with --validate=false
@rnpaiva rnpaiva added the bug Something isn't working label Feb 23, 2023
@crenshaw-dev
Copy link
Collaborator

Change ‘source’ in the spec to ‘sources’.

@rnpaiva
Copy link
Author

rnpaiva commented Feb 23, 2023

$ kubectl apply -f application.yaml -n argocd
error: error validating "application.yaml": error validating data: [ValidationError(Application.spec): unknown field "sources" in io.argoproj.v1alpha1.Application.spec, ValidationError(Application.spec): missing required field "source" in io.argoproj.v1alpha1.Application.spec]; if you choose to ignore these errors, turn validation off with --validate=false

@crenshaw-dev
Copy link
Collaborator

Make sure you’ve applied the latest Application CRD to your cluster.

@crenshaw-dev
Copy link
Collaborator

Well, not latest, but 2.6+ :-)

@rnpaiva
Copy link
Author

rnpaiva commented Feb 24, 2023

Thank you @crenshaw-dev !
It's working smoothly after update the crds .

@rnpaiva rnpaiva closed this as completed Feb 24, 2023
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

No branches or pull requests

2 participants