Skip to content

Commit 396682f

Browse files
committed
try something
1 parent a3ea01f commit 396682f

3 files changed

Lines changed: 24 additions & 32 deletions

File tree

infrastructure/controllers/argocd/apps/appsets/infrastructure-appset.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,26 @@ spec:
1111
- git:
1212
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
1313
revision: HEAD
14-
# Discover any 'argo-app.yaml' file within the infrastructure directory.
15-
files:
16-
- path: "infrastructure/**/argo-app.yaml"
14+
# Discover any application directory within the infrastructure/*/* path.
15+
directories:
16+
- path: infrastructure/*/*
1717
template:
1818
metadata:
19-
name: '{{name}}'
19+
# Name is derived from the path, e.g., 'infra-cert-manager'
20+
name: 'infra-{{path.basename}}'
2021
namespace: argocd
21-
finalizers:
22-
- resources-finalizer.argocd.argoproj.io
2322
spec:
2423
project: infrastructure
2524
source:
2625
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
2726
targetRevision: HEAD
28-
# The path points directly to the directory containing the argo-app.yaml file.
29-
path: '{{path.directory}}'
30-
# Instruct Argo CD's Kustomize builder to enable Helm chart support.
27+
path: '{{path}}'
3128
kustomize:
3229
buildOptions: "--enable-helm"
3330
destination:
3431
server: https://kubernetes.default.svc
35-
namespace: '{{namespace}}'
32+
# Namespace is the directory name, e.g., 'cert-manager'
33+
namespace: '{{path.basename}}'
3634
syncPolicy:
3735
automated:
3836
prune: true

infrastructure/controllers/argocd/apps/appsets/monitoring-appset.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,26 @@ spec:
1111
- git:
1212
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
1313
revision: HEAD
14-
# Discover any 'argo-app.yaml' file within the monitoring directory.
15-
files:
16-
- path: "monitoring/**/argo-app.yaml"
14+
# Discover any application directory within the monitoring/* path.
15+
directories:
16+
- path: monitoring/*
1717
template:
1818
metadata:
19-
name: '{{name}}'
19+
# Name is derived from the path, e.g., 'monitoring-loki-stack'
20+
name: 'monitoring-{{path.basename}}'
2021
namespace: argocd
21-
finalizers:
22-
- resources-finalizer.argocd.argoproj.io
2322
spec:
2423
project: monitoring
2524
source:
2625
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
2726
targetRevision: HEAD
28-
# The path points directly to the directory containing the argo-app.yaml file.
29-
path: '{{path.directory}}'
30-
# Instruct Argo CD's Kustomize builder to enable Helm chart support.
27+
path: '{{path}}'
3128
kustomize:
3229
buildOptions: "--enable-helm"
3330
destination:
3431
server: https://kubernetes.default.svc
35-
namespace: '{{namespace}}'
32+
# Namespace is the directory name, e.g., 'loki-stack'
33+
namespace: '{{path.basename}}'
3634
syncPolicy:
3735
automated:
3836
prune: true

infrastructure/controllers/argocd/apps/appsets/my-apps-appset.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,26 @@ spec:
1111
- git:
1212
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
1313
revision: HEAD
14-
# Discover any 'argo-app.yaml' file within the my-apps directory.
15-
files:
16-
- path: "my-apps/**/argo-app.yaml"
14+
# Discover any application directory within the my-apps/*/* path.
15+
directories:
16+
- path: my-apps/*/*
1717
template:
1818
metadata:
19-
# The name is dynamically set from the 'name' field in each argo-app.yaml
20-
name: '{{name}}'
19+
# Name is derived from the path, e.g., 'ai-ollama'
20+
name: '{{path.elements[1]}}-{{path.basename}}'
2121
namespace: argocd
22-
finalizers:
23-
- resources-finalizer.argocd.argoproj.io
2422
spec:
2523
project: my-apps
2624
source:
2725
repoURL: https://github.com/mitchross/k3s-argocd-proxmox.git # TODO: Replace with your repo URL
2826
targetRevision: HEAD
29-
# The path points directly to the directory containing the argo-app.yaml file.
30-
path: '{{path.directory}}'
31-
# Instruct Argo CD's Kustomize builder to enable Helm chart support.
27+
path: '{{path}}'
3228
kustomize:
3329
buildOptions: "--enable-helm"
3430
destination:
3531
server: https://kubernetes.default.svc
36-
# The namespace is dynamically set from the 'namespace' field in each argo-app.yaml
37-
namespace: '{{namespace}}'
32+
# Namespace is the directory name, e.g., 'ollama'
33+
namespace: '{{path.basename}}'
3834
syncPolicy:
3935
automated:
4036
prune: true

0 commit comments

Comments
 (0)