I am using ArgoCD for a couple of weeks now and I don't really understand how to define spec.source.path in the application.
I have set the following path:
...
spec:
source:
repoURL: https://github.com/theautomation/home-assistant.git
targetRevision: main
path: deploy/k8s
...
but still argoCD syncs when a commit is committed outside this path in the repo, argoCD should ONLY watch this path for changes right? or does it not work that way?
Full application yaml:
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: home-assistant
namespace: devops
annotations:
notifications.argoproj.io/subscribe.slack: cicd
argocd.argoproj.io/manifest-generate-paths: /deploy
spec:
project: default
source:
repoURL: https://github.com/theautomation/home-assistant.git
targetRevision: main
path: deploy/k8s
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: home-automation
syncPolicy:
syncOptions:
- CreateNamespace=true
- Validate=true
- PrunePropagationPolicy=foreground
- PruneLast=true
automated:
selfHeal: true
prune: true
retry:
limit: 2
backoff:
duration: 5s
factor: 2
maxDuration: 3m