diff --git a/apps/arr.yaml b/apps/arr.yaml index f03f886..9e8fc35 100644 --- a/apps/arr.yaml +++ b/apps/arr.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - project: default + project: applications source: path: apps/arr repoURL: https://github.com/vehagn/homelab diff --git a/apps/home-assistant.yaml b/apps/home-assistant.yaml index 18db948..9d66429 100644 --- a/apps/home-assistant.yaml +++ b/apps/home-assistant.yaml @@ -6,14 +6,14 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - destination: - namespace: home-assistant - name: in-cluster - project: default + project: applications source: path: apps/home-assistant repoURL: https://github.com/vehagn/homelab targetRevision: HEAD + destination: + namespace: home-assistant + name: in-cluster syncPolicy: automated: {} syncOptions: diff --git a/apps/plex.yaml b/apps/plex.yaml index 32a0ce6..f2b0ceb 100644 --- a/apps/plex.yaml +++ b/apps/plex.yaml @@ -6,14 +6,14 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - destination: - namespace: plex - name: in-cluster - project: default + project: applications source: path: apps/plex repoURL: https://github.com/vehagn/homelab targetRevision: HEAD + destination: + namespace: plex + name: in-cluster syncPolicy: automated: {} syncOptions: diff --git a/apps/whoami.yaml b/apps/whoami.yaml index bd83b03..ee0e030 100644 --- a/apps/whoami.yaml +++ b/apps/whoami.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - project: default + project: applications source: path: apps/whoami repoURL: https://github.com/vehagn/homelab diff --git a/infra/argocd/applications.yaml b/infra/argocd/applications.yaml index 517dba3..f2ef2b0 100644 --- a/infra/argocd/applications.yaml +++ b/infra/argocd/applications.yaml @@ -1,4 +1,22 @@ apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: applications + namespace: argocd +spec: + sourceRepos: + - 'https://github.com/vehagn/*' + destinations: + - namespace: 'arr' + server: '*' + - namespace: 'home-assistant' + server: '*' + - namespace: 'plex' + server: '*' + - namespace: 'whoami' + server: '*' +--- +apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: applications @@ -6,12 +24,13 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - project: default + project: app-of-apps source: path: apps repoURL: https://github.com/vehagn/homelab targetRevision: HEAD destination: + namespace: argocd name: in-cluster syncPolicy: automated: diff --git a/infra/argocd/infrastructure.yaml b/infra/argocd/infrastructure.yaml index 2296b6f..e57fbc4 100644 --- a/infra/argocd/infrastructure.yaml +++ b/infra/argocd/infrastructure.yaml @@ -1,17 +1,33 @@ apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: infrastructure + namespace: argocd +spec: + sourceRepos: + - 'https://github.com/vehagn/*' + destinations: + - namespace: 'metallb-system' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' +--- +apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: infra + name: infrastructure namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io spec: - project: infra + project: app-of-apps source: path: infra repoURL: https://github.com/vehagn/homelab targetRevision: HEAD destination: + namespace: argocd name: in-cluster syncPolicy: automated: diff --git a/infra/argocd/kustomization.yaml b/infra/argocd/kustomization.yaml index 1c4b9cf..80aa7d4 100644 --- a/infra/argocd/kustomization.yaml +++ b/infra/argocd/kustomization.yaml @@ -6,7 +6,8 @@ resources: - namespace.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - ingress.yaml - - infra.yaml + - project.yaml + - infrastructure.yaml - applications.yaml # Let Traefik manage TLS-termination diff --git a/infra/argocd/project.yaml b/infra/argocd/project.yaml new file mode 100644 index 0000000..a47b61d --- /dev/null +++ b/infra/argocd/project.yaml @@ -0,0 +1,11 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: app-of-apps + namespace: argocd +spec: + sourceRepos: + - 'https://github.com/vehagn/*' + destinations: + - namespace: 'argocd' + server: '*' \ No newline at end of file diff --git a/infra/metallb.yaml b/infra/metallb.yaml index e39defd..a6fe561 100644 --- a/infra/metallb.yaml +++ b/infra/metallb.yaml @@ -6,7 +6,7 @@ metadata: finalizers: - resources-finalizer.argocd.argoproj.io spec: - project: default + project: infrastructure source: path: infra/metallb repoURL: https://github.com/vehagn/homelab