Skip to content

Commit

Permalink
fix: skip ArgoCD Application plugin if not set (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebradil authored Dec 27, 2024
1 parent 375bd0a commit 302667e
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#@data/values
---
argocd:
app:
source:
plugin: null
2 changes: 2 additions & 0 deletions examples/integration-tests/envs/dev/env-data.ytt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ environment:
#! applications: # already defined one level above
#! - proto: httpbingo # already defined one level above
applications:
- proto: ytt-render-test
name: argocd-tests
- proto: helm-render-test
name: helm-installation
- proto: per-chart-override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-mykso-dev-argocd-tests
namespace: system-argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: env-mykso-dev
destination:
name: mykso-dev
namespace: argocd-tests
source:
path: examples/integration-tests/rendered/envs/mykso-dev/argocd-tests
repoURL: [email protected]:mykso/myks.git
targetRevision: main
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: rendering
metadata:
name: base
outputYaml:
fromPrototype: true
fromPrototypeAppData: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: rendering
metadata:
name: proto
outputYaml:
fromPrototypeOverride: true
fromPrototypeOverrideFromAppData: true
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ spec:
namespace: httpbingo
source:
path: examples/simple/rendered/envs/mykso-dev/httpbingo
plugin: null
repoURL: [email protected]:mykso/myks.git
targetRevision: main
syncPolicy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ spec:
namespace: httpbingo
source:
path: examples/simple/rendered/envs/mykso-prod/httpbingo
plugin: null
repoURL: [email protected]:mykso/myks.git
targetRevision: main
syncPolicy:
Expand Down
1 change: 1 addition & 0 deletions internal/myks/templates/argocd/application.ytt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
namespace: #@ a.app.destination.namespace or a.app.name
source:
path: #@ a.app.source.path
#@ if/end a.app.source.plugin:
plugin: #@ a.app.source.plugin
repoURL: #@ a.app.source.repoURL
targetRevision: #@ a.app.source.targetRevision
Expand Down

0 comments on commit 302667e

Please sign in to comment.