I would like to create an argoCD application right from the git repository, ie the gitOps way. I already created a CRD file for the application which looks like this:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-service
namespace: argocd
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
syncPolicy:
syncOptions:
- CreateNamespace=true
project: default
source:
path: clusters/helm-chart
repoURL: https://github.com/user/my-repo.git
targetRevision: HEAD
helm:
values: |
image:
repository: user/my-image
pullPolicy: Always
tag: xxx
My current workflow is to apply this CRD to my cluster with k apply -f application.yaml
.
Question: how can I instruct ArgoCD to go and sync/create the application I have defined at https://github.com/user/my-repo.git
without first creating that application "manually"?