Skip to content

Commit

Permalink
feat: add support for go-templates in argocd yaml files (#27766)
Browse files Browse the repository at this point in the history
  • Loading branch information
lstoeferle committed Mar 7, 2024
1 parent 8dc8175 commit 10c8182
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/modules/manager/argocd/__fixtures__/validApplication.yml
Expand Up @@ -128,4 +128,13 @@ spec:
helm:
valueFiles:
- $foo/values.yaml

---
{{- if .Values.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: somechart
repoURL: https://git.example.com/foo/bar.git
targetRevision: 3.2.1
{{- end }}
6 changes: 6 additions & 0 deletions lib/modules/manager/argocd/extract.spec.ts
Expand Up @@ -165,6 +165,12 @@ spec:
depName: 'somechart',
registryUrls: ['https://foo.io/repo'],
},
{
currentValue: '3.2.1',
datasource: 'helm',
depName: 'somechart',
registryUrls: ['https://git.example.com/foo/bar.git'],
},
],
});
});
Expand Down
1 change: 1 addition & 0 deletions lib/modules/manager/argocd/extract.ts
Expand Up @@ -36,6 +36,7 @@ export function extractPackageFile(
definitions = parseYaml(content, null, {
customSchema: ApplicationDefinition,
failureBehaviour: 'filter',
removeTemplates: true,
});
} catch (err) {
logger.debug({ err, packageFile }, 'Failed to parse ArgoCD definition.');
Expand Down

0 comments on commit 10c8182

Please sign in to comment.